WWGT
6-Jan-2023, 02:35 AM
Trying to translate an external api call from SHGetFileInfoA to SHGetFileInfoW.
According to MSDN that would return a SHFILEINFOW structure. https://learn.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shfileinfow
The old type was defined as this
Type SHFILEINFO
Field SHFILEINFO.hIcon as Handle
Field SHFILEINFO.iIcon as Integer
Field SHFILEINFO.dwAttributes as DWord
Field SHFILEINFO.szDisplayName as Char MAX_PATH
Field SHFILEINFO.szTypeName as Char 80
End_Type
How would one go about converting a structure that now expects WCHAR instead of CHAR?
According to MSDN that would return a SHFILEINFOW structure. https://learn.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shfileinfow
The old type was defined as this
Type SHFILEINFO
Field SHFILEINFO.hIcon as Handle
Field SHFILEINFO.iIcon as Integer
Field SHFILEINFO.dwAttributes as DWord
Field SHFILEINFO.szDisplayName as Char MAX_PATH
Field SHFILEINFO.szTypeName as Char 80
End_Type
How would one go about converting a structure that now expects WCHAR instead of CHAR?