LoadLibrary("WTclient.dll")调用失败
大家好,我最近下载了Wintech公司开发的OPC客户端开发工具包,打算使用其带有的DLL,可是我在
使用的过程中却出现了错误,不知为什么?使用的是VC6, Win32 app,simple project,代码如下:
// RegTest.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
//#include "WTclientAPI.h"
//#include "RegTest.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
typedef BOOL(*pReg) (LPCSTR Authorization);
BOOL bReg;
HINSTANCE hReg;
pReg Regno;
hReg=LoadLibrary("WTclient.dll");
if(hReg==NULL)
MessageBox(NULL,"error","learnwhen",NULL);
// Regno=(pReg)GetProcAddress(hReg,"Disable30MinTimer");
// bReg=Regno("kake");
FreeLibrary(hReg);
return 0;
}
我要用的WTclient.dll也拷贝到了文件目录下,但是就是无法使用,执行DEBUG文件下生成的文件,就显示“error",
这说明是没用调用成功。