接到一個項目,對方提供了一個dll和動態庫函數說明文檔,文檔內的 參數類型為string ,請問下各位。string 類型對應C++ 什么類型啊,char wchar_t 等都試過了不對。C++代碼typedef int (WINAPI *tool)(int port,const wchar_t *userid[]);
HMODULE hDLL = LoadLibrary(L"IcCard.dll");
if(hDLL != NULL)
{
tool too = tool(GetProcAddress(hDLL, "ic_test")); if(too != NULL)
{
const wchar_t * userid = L"123456"; //char userid[] = "123456";
int ss = too(1,&userid);
printf("%d",ss);
}
}Delphi 動態庫函數function ic_test(port: integer;
userid: string;
): integer;stdcall; 幫幫忙啊
- 1 回答
- 0 關注
- 987 瀏覽
添加回答
舉報
0/150
提交
取消