Button2.Enabled :=False;
dllinstance:=LoadLibrary('e:\test\PreBlock.dll');
iRet:=GetLastError; //结果是零
ShowMessage(Format('Load library last error= %d',[iRet]));
if self.dllinstance=0 then
begin
Result:=-1;
exit;
end;
self.PreBlockBegin:=TDLLPreBlockBegin(GetProcAddress(dllinstance,'PreBlockBegin'));
iRet:=GetLastError; //是127,找不到相应的函数,难为知道大概是什么原因
ShowMessage(Format('load proc preBlockBegin last error= %d',[iRet]));
self.PreBlockSendPolicy:=GetProcAddress(dllinstance,'PreBlockSendPolicy');
self.PreBlockEnd:=GetProcAddress(dllinstance,'PreBlockEnd');
self.PreBlockEnd:=GetProcAddress(dllinstance,'PreBlockTest');
self.PreBlockEnd:=GetProcAddress(dllinstance,'PreBlockFree');
Button2.Enabled :=True;
Result:=0;入上面一段程序,我的函数名没错,为什么能装载动态库,却装载不了函数。
哪位知道,急坏了我了
dllinstance:=LoadLibrary('e:\test\PreBlock.dll');
iRet:=GetLastError; //结果是零
ShowMessage(Format('Load library last error= %d',[iRet]));
if self.dllinstance=0 then
begin
Result:=-1;
exit;
end;
self.PreBlockBegin:=TDLLPreBlockBegin(GetProcAddress(dllinstance,'PreBlockBegin'));
iRet:=GetLastError; //是127,找不到相应的函数,难为知道大概是什么原因
ShowMessage(Format('load proc preBlockBegin last error= %d',[iRet]));
self.PreBlockSendPolicy:=GetProcAddress(dllinstance,'PreBlockSendPolicy');
self.PreBlockEnd:=GetProcAddress(dllinstance,'PreBlockEnd');
self.PreBlockEnd:=GetProcAddress(dllinstance,'PreBlockTest');
self.PreBlockEnd:=GetProcAddress(dllinstance,'PreBlockFree');
Button2.Enabled :=True;
Result:=0;入上面一段程序,我的函数名没错,为什么能装载动态库,却装载不了函数。
哪位知道,急坏了我了
解决方案 »
- 请教个关于跨进程获取(修改)label的问题!
- 有何方法实现网页只能在twebbrowser中打开?
- 记录被其他表使用后,不允许删除,该如何处理?急急!
- Delphi6+SqlServer 编的软件用什么软件打包最好
- 请问FastReport2.5的报表设计器可否设计主从表性质的报表,注意数据集不是在程序中设定,而是对话框中设定。
- 怎样取消默认的菜单快捷键??
- 只有40分了,求两个数据库的问题。
- 请问大虾有没有深入介绍vcl运行机制的书??
- 将文本文件中的信息用程序读入access数据库
- ADO 2.1哪儿有下载?或有更高版本?
- 怎么在程序运行期间动态的改变某控件的名字?
- 怎么在程序运行期间动态的改变某控件的名字?
你把self.PreBlockBegin 这个的定义改成别的名称试试看。不要和'PreBlockBegin'相同。
我以前就遇到过。