CString sHandle; DWORD ClientHandle; sHandle = _T("134"); CStringA pszCharacterString (sHandle); ClientHandle = atoi(pszCharacterString); //client handle is 134
CString sHandle; DWORD ClientHandle; sHandle = _T("-134"); //a negative sign at front CStringA pszCharacterString (sHandle); ClientHandle = atoi(pszCharacterString); //this fails, client handle is 424967162
ClientHandle
DWORD
int
atoi()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)