Fetching a string property

BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Fetching a string property

Postby BenBaron » Thu Aug 06, 2020 1:17 pm

Hi guys,

I am a little unsure regarding this function declaration:

Code: Select all

virtual HRESULT GetProperty( __in LPCWSTR pszPropertyName, __out LPWSTR pszProperty, __in UINT uLength, __in int index = 0 )const
If I want to fetch a string property into a wchar_t buffer[], is this method expecting me to put in the actual size of the buffer pointed to by pszProperty, or its length as uLength?

In other words, do I have to input

Code: Select all

sizeof(buffer)/sizeof(wchar_t)
or simply

Code: Select all

sizeof(buffer)
Greets,
Ben

Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 15 guests