Unicode program:lstrcpyW' : cannot convert parameter 1 from 'char *' to 'unsigned short *'

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
 I  have the following statements which run well in  non-unicode program, but after I change it into a unicode program, it has the following error:
lstrcpyW : cannot convert parameter 1 from char * to unsigned short *
 HGLOBAL hHMLText;
LPTSTR lpsz   = NULL;
....................
hHMLText = ::GlobalAlloc(GPTR, lstrlen (lpsz) + 1);
  lstrcpy ((CHAR*)hHMLText, lpsz);
 
Please tell me how to change  this statement : lstrcpy ((CHAR*)hHMLText, lpsz);
I appreciate your help.

View the full article
 
Back
Top