Tag: tchar string

Conversion between TCHAR to std::string

Incase you have some variables declared as below, and you would need to store a TCHAR into a string, you can use the below method: std::string objExeDir TCHAR szModulePath[_MAX_PATH]; char    *pMBBuffer = (char *)malloc( 100 ); wcstombs(pMBBuffer, szModulePath, 200 ); objExeDir = pMBBuffer;

Continue Reading →