EDN Admin
Well-known member
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
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