VC++中调用例子:
HINSTANCE hdll=LoadLibrary("libPassChk.dll");
typedef BOOLEAN (_stdcall *lpPassCheck)(LPCSTR, LPCSTR); //函数声明
lpPassCheck IsValidPassword;
IsValidPassword=(lpPassCheck)::GetProcAddress(hdll,"IsValidPassword");
BOOLEAN a;
LPCSTR s1="";
LPCSTR s2="JES:2:Base64:AES:ECBKCS5Padding:UTF-8:";
a=IsValidPassword(s1,s2 );
if(a)
{
MessageBox("成功",0,0);
}else{
MessageBox("失败",0,0);
}
FreeLibrary(hdll); |