Results 1 to 4 of 4

Thread: data types

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 1999
    Location
    Cincinnati, OH
    Posts
    66
    What is the difference between a LPTSTR and a LPWSTR???
    How can I convert between the two?
    If you drop a blond and a UNIX box out a window, which one lands first?

  2. #2
    Guest
    I think LPWSTR is a unicode data type...

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    LPTSTR -- An LPWSTR ifUNICODE is defined, an LPSTR otherwise.

    LPWSTR -- Pointer to a null-terminated string of 16-bit Unicode characters. For more information, seeCharacter Sets Used By Fonts.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Is it just me or does anyone else find this confusing?
    Code:
    LPTSTR szString = TEXT("String");
    // as opposed to this
    TCHAR *szString = TEXT("String");
    I find the second method much more readable, because it shows the indirection levels
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width