cpp
复制代码
string CConnectApi::GetProductList(char * a_szdata, int page, int pageSise)
{
try
{
int ipage = page;
int iSise = pageSise;
String ^s_key = System::Runtime::InteropServices::Marshal::PtrToStringAnsi((IntPtr)a_szdata);
Tool ^ s_helper = gcnew Tool();
////GetProductList(string uri,int page,int pageSise)
::System::String ^ s_encrypt = s_helper->GetProductList(s_key, ipage, iSise);
char* szretdata = (char*)(void*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(s_encrypt);
return szretdata;
}
catch (const std::exception&)
{
SaveInfoToFile("调用动态库,获取文件列表失败");
return "";
}
}