函数原型:
int WideCharToMultiByte(
UINT CodePage, // code page
DWORD dwFlags, // performance and mapping flags
LPCWSTR lpWideCharStr, // wide-character string
int cchWideChar, // number of chars in string
LPSTR lpMultiByteStr, // buffer for new string
int cbMultiByte, // size of buffer
LPCSTR lpDefaultChar, // default for unmappable chars
LPBOOL lpUsedDefaultChar // set when default char used
); //将宽字符转换成多个窄字符
int MultiByteToWideChar(
UINT CodePage, // code page
DWORD dwFlags, // character-type options
LPCSTR lpMultiByteStr, // string to map
int cbMultiByte, // number of bytes in string
LPWSTR lpWideCharStr, // wide-character buffer
int cchWideChar // size of buffer
);//将多个窄字符转换成宽字符
需要用到的一些函数:
CString CXmlProcess::HexToBin(CString string)//将16进制数转换成2进制
{
if( string == \"0\")
return \"0000\";
if( string == \"1\")
return \"0001\";
if( string == \"2\")
return \"0010\";
if( string == \"3\")
return \"0011\";
if( string == \"4\")
return \"0100\";
if( string == \"5\")
return \"0101\";
if( string == \"6\")
return \"0110\";
if( string == \"7\")
return \"0111\";
if( string == \"8\")
return \"1000\";
if( string == \"9\")
return \"1001\";
if( string == \"a\")
return \"1010\";
if( string &#