can someone help me to convert CString to const byte pointer. I try below code, but it does not work. My program uses Unicode setting.
Cstring hello = "MyApp";
const BYTE* pData = (const BYTE*)(LPCTSTR)hello;
thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From How to convert CString to BYTE pointer:
interpret it as ascii string:
or convert to bytes that represent the string in your local code page: