Link to home
Start Free TrialLog in
Avatar of william007
william007

asked on

About LPSTR

I have seen a lot of type LPSTR(and other like LPCSTR, etc) when coding using MFC.

I just know it is equivalent to char*, but what LPSTR exactly is?
(ie, is it a native type in C++, or a macro in C++, or a typedef in C++, or...)


ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
^^^ BTW: The full set seems to be define dint here but there are quite a lot so I only copy/pasted the one you specifically mentioned.

NB. I am not convinced that these are necessarily typedefs in older versions of of Visual Studio (if memory serves, I think they are macros), but since I only have VS2005 to hand I cannot check for sure.
Oh, and CHAR is just a typedef of char
typedef char CHAR;
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of william007
william007

ASKER

Thanks, have just found the definition on MSDN website:)
>> Thanks, have just found the definition on MSDN website
Be aware that the definitions may differ for different versions of MSVC.