This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] winsock related changes for w32api


"Bart Oldeman" <bart.oldeman@btinternet.com> wrote:

> > Shouldn't structs and protos  be Unicoded properly, rather than using LPTSTR
> 
> LPTSTR should be fine, since:
> <winnt.h>:
> typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR;
> and
> #ifdef UNICODE
> typedef WCHAR TCHAR;
> #else
> typedef CHAR TCHAR;
> #endif

No, LPTSTR is not enough in order to use ANSI and Unicode APIs simultaneously.
Have a look at the Platform SDK headers how to do it properly.

-- 
Dmitry.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]