The function that is being called requires wchar_t* instead of char* when compiling a program for UNICODE. Typecasting will not make the conversion. Instead you should be using the macros provided in tchar.h to make the conversion. when compiling for UNICODE all character string literals need to be surrounded with either _T( "string literal here" ) or _TEXT("string literal"); Character arrays need to be declared with TCHAR macro instead of char* ( or UCHAR* in your code snipped), for example TCHAR* buffer . All the string manipulation functions in string.h also have UNICODE equivalents and you should use the portable UNICODE version as shown in MSDN, such as _tcscpy() instead of strcpy().
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343