LPTSTR indicates that the string buffer may be ANSI or UNICODE depending on the macro definition: UNICODE .LPCOLESTR was invented by the OLE team because it switches its behavior between char and wchar_t based on the definition of OLE2ANSILPCWSTR - string wchar_tBSTR is an LPOLESTR that has been allocated by SysAllocString.LPCWCHAR is a pointer to one constant wide character.
They are actually all different. Or at least they were at different times. Ole was designed and needed - wide lines, while the Windows API was still Win16 and did not support wide lines at all.
In addition, earlier versions of the Windows SDK did not use wchar_t for WCHAR, but unsigned. The GCC SDK window becomes interesting because - im led to the belief that GCC 32bit has 32-bit wchar_t - on compilers with 32-bit wchar_t, WCHAR will be defined as unsigned short or some other type that has 16 bits in it the compiler.
Chris becke
source share