I struggled with this, but now I use this: (UNICODE friendly)
CString strCommand ("My text to send to the DLL.");
**
char strPass[256];
strcpy_s( strPass, CStringA(strCommand).GetString() );
**
//CStringA - / CString
char strPass .
, DLL , :
const char * strParameter
char strParameter *
"" CStrings , .