CString not converted directly to std::string , but it is an approximate equivalent.
BYTE really an unsigned char , and DWORD is an unsigned int . WORD unsigned short .
You must definitely use typedef actual_type WINDOWS_NAME; To fix the code, do not go everywhere to replace types. I would add a new header file, which is called something like "wintypes.h", and includes that "windows.h" is used everywhere.
Edit comment: With CString it really depends on how it is used (and whether the code uses what MS calls "Unicode" or "ASCII"). I would have a desire to create a CString class, and then use std::string inside this. Most of them can probably be done simply by calling the equivalent function std::string , but some functions may need a bit more programming - again, it depends on which member functions from CString actually used.
For LP<type> is just a pointer to <type> , so typedef BYTE* LPBYTE; and typedef DWORD* LPDWORD; will do it.
source share