函数调用dll后参数问题
typedef int (*pUpdateClient)(int , TCHAR* []);
int argc = 5;
TCHAR* pstr_ip = str_ip.GetBuffer(str_ip.GetLength());
TCHAR* pstr_file_type = str_file_type.GetBuffer(str_file_type.GetLength());
TCHAR* pstr_file_path = str_file_path.GetBuffer(str_file_path.GetLength());
TCHAR* pstr_modify_type = str_modify_type.GetBuffer(str_modify_type.GetLength());
TCHAR* pstr_file_name = str_file_name.GetBuffer(str_file_name.GetLength());
TCHAR* argv[] = {pstr_file_name,pstr_ip,pstr_file_type,pstr_file_path,pstr_modify_type};
str_ip.ReleaseBuffer();
...
hDll = LoadLibrary(_T("UpdateClient.dll"));
UpdateClientFunc = (pUpdateClient)GetProcAddress(hDll, "Client_main");
int ret = 0;
ret = (UpdateClientFunc)(argc,argv);
程序在_MBCS下正常,该在unicode下参数传递就失败,程序调用dll,但别人写的dll里函数为int Client_main(int argc, char *argv[]),跟踪进dll后发现传递的只是头字母,比如pstr_file_name参数应为"WEB_Device.cgi",dll里接收的是"W"。我知道应该是dll里char *argv[]问题,请问在unicode下我的主程序应该怎么修改?