症状:运行后提示"无法定位程序输入点 initpwd 于动态连接库pwdll.dll"
上
我用vc写的dll,如下
extern "C" __declspec(dllexport) char* __stdcall initpwd(char* sendchar,int numpwd);
char* _stdcall initpwd(char* sendchar,int numpwd)
{
int sizesendchar = strlen(sendchar);
..........
......... return rechar;
}在delphi里调用如下:
implementation
function initpwd(aa:PChar ; b:integer) : string ;stdcall;external 'PWDLL5.dll' name 'initpwd';Edit1.Text := initpwd('w010',20);
上
我用vc写的dll,如下
extern "C" __declspec(dllexport) char* __stdcall initpwd(char* sendchar,int numpwd);
char* _stdcall initpwd(char* sendchar,int numpwd)
{
int sizesendchar = strlen(sendchar);
..........
......... return rechar;
}在delphi里调用如下:
implementation
function initpwd(aa:PChar ; b:integer) : string ;stdcall;external 'PWDLL5.dll' name 'initpwd';Edit1.Text := initpwd('w010',20);
上写错了,纠正一下。都是小写,函数名也对,不知道哪里的问题
用Exescope看看这个Dll文件中导出的函数名称是否是initpwd.
动态加载试试,看看是Dll不能加载还是找不到Dll函数.
exescope怎么用?
VC我不懂,如果你确定你的dll正确的话
implementation
function initpwd(aa:PChar ; b:integer) : string ;stdcall;external '.\pwdll5.dll' name 'initpwd';
试试
试试在delphi 里这样调用。
implementation
function initpwd(aa:PChar ; b:integer) : string ;stdcall;external 'PWDLL5.dll';
Edit1.Text := initpwd('w010',20);