Tuesday, July 03, 2007

Convert CString to LPBYTE

CString str = "la-la-la";
LPBYTE pByte = new BYTE[str.GetLength() + 1];
memcpy(pByte, (VOID*)LPCTSTR(str), str.GetLength());

No comments: