Thread: Lpcstr

  1. #1
    Registered User Gwargh's Avatar
    Join Date
    Aug 2001
    Posts
    7

    Lpcstr

    This might sound like a strange question but what does LPCTSTR really stand for. I have used it plenty of times and see it in msdn all the time. But what does it mean?
    There also is a number of variations. Is there any good place to look it up?
    ~Barjor

  2. #2
    Barjor
    Guest
    Just for clearification(sp) I am not Gwargh. Something got messed up on the log in.
    ~BArjor

  3. #3
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    long pointer to a constant unicode portable string (or something along those lines).

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Gotta love all those Winapi typedefs

  5. #5
    Registered User Esss's Avatar
    Join Date
    Aug 2001
    Posts
    133
    long pointer to a constant unicode portable string
    Actually, it's a long pointer (LP) to a constant (C) text (T) string (STR). 'Text', in this case, meaning either ANSI or Unicode, depending on whether you compiled with UNICODE defined or not.

    It resolves to 'const wchar_t *' if UNICODE is defined, and 'const char *' otherwise.
    Ess
    Like a rat in a maze who says,
    "Watch me choose my own direction"
    Are you under the illusion
    The path is winding your way?
    - Rush

  6. #6
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Smile Yeah

    Even simpler than that is basically:

    Pointer To A string.



    SPH

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. LPCSTR to LPCWSTR
    By stanlvw in forum Windows Programming
    Replies: 7
    Last Post: 07-20-2008, 09:58 AM
  2. copy LPCSTR type
    By Gordon in forum Windows Programming
    Replies: 3
    Last Post: 10-17-2007, 09:33 PM
  3. LPCSTR and LPCWSTR
    By George2 in forum C Programming
    Replies: 2
    Last Post: 08-20-2007, 02:46 PM
  4. <string> to LPCSTR? Also, character encoding: UNICODE vs ?
    By Kurisu33 in forum C++ Programming
    Replies: 7
    Last Post: 10-09-2006, 12:48 AM
  5. number to LPCSTR!!!!!!?
    By Unregisterred in forum C++ Programming
    Replies: 5
    Last Post: 10-02-2002, 02:23 PM