日期:2014-05-17 浏览次数:20858 次
CString strFileNamePath = _T(“LzCoUserClt4.dll”);
HMODULE hLib = LoadLibrary(strFileNamePath);
typedef int (*fun)(char*);
fun p = (fun)GetProcAddress(hLib,"_GetUserID");
if (p != NULL)
{
char szUserID[512];
memset(szUserID, 0, 512);
p(szUserID);
}
[DllImport(@"C:\Program Files\LiZheng\LzCoPlatClt(x64)\LzCoUserClt4.dll")]
public extern static int _GetUserID(string UserID);