This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] winsock related changes for w32api
- From: "Dmitry Timoshkov" <dmitry at baikal dot ru>
- To: "Bart Oldeman" <bart dot oldeman at btinternet dot com>, "Danny Smith" <danny_r_smith_2001 at yahoo dot co dot nz>
- Cc: <cygwin-patches at cygwin dot com>
- Date: Mon, 26 Aug 2002 11:37:25 +0900
- Subject: Re: [PATCH] winsock related changes for w32api
- References: <Pine.LNX.4.33.0208252247200.9978-100000@enm-bo-lt.enm.bris.ac.uk>
"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.