See the following link:
Http://blog.sina.com.cn/s/blog_5d51f4e90100z86n.html
Http://bbs.csdn.net/topics/220074393
The lpctstr is not a type, but a type of two: one of the two types: lpcstr and the other. It will become one of the two based on whether your current program uses the Unicode Character Set. If the Unicode character set is used, the value of this parameter is "maid". Otherwise, the value of this parameter is "maid.
Converting the STD: string in the standard library to the lpcstr is simple: directly call c_str. Example:
STD: string a = "ABC ";
Lpcstr STR = A. c_str ();
The standard library also has a wstring, which represents the string of the wide character. Converting STD: wstring to lpcwstr is also very easy:
STD: wstring A = L "ABC ";
Lpcwstr STR = A. c_str ();
If you want to convert STD: string to lpcwstr or STD: wstring to lpcstr, you need to call multibytetowidechar or widechartomultibyte to convert character sets. However, in most cases, this type of cross conversion is not required. A program generally uses only one character set.