How do you use PTSTR in C++

Status
Not open for further replies.

HerbertMunch

New Member
hi all,
does anyone know how to use the windows api type constructs such as PTSTR together with the normal C functions such as strcopy.

For instance strcopy requires strings defined as char* whereas the API returns strings defined with eg LPSTR.

Code:
char* str = "Hello";  // OK
LPSTR str = "Hello"; // Compiler error

If you declare LPSTR pszz; , how do you assign it to point to a string?

Thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…