T
TMXYB
Unregistered / Unconfirmed
GUEST, unregistred user!
几经周折,终于搞定了在DLL中动态调用数据查询窗口,但又有新的问题!DLL中的查询窗口关不了。
经调试是freelibrary();的问题,怪!
代码如下:
libhandle := loadlibrary('gzan_chax_dll.dll');
try
if libhandle = 0 then
raise exception.Create('对不起!查询的动态连接库文件‘gzan_chax_dll.dll’丢失,请重新安装该文件!');
@show_gzap_chax:= getprocaddress(libhandle,'show_gzap_chax');
if not (@show_gzap_chax= nil) then
show_gzap_chax(Application.Handle,Data_Module.Session)
else
raiselastwin32Error;
finally
showmessage('free the_library');
[red] freelibrary(libhandle);//通不过,信息:Access Violation at adress 0x053b0000,Read of address 0x053b0000[/red]
end;
请问是何故?
经调试是freelibrary();的问题,怪!
代码如下:
libhandle := loadlibrary('gzan_chax_dll.dll');
try
if libhandle = 0 then
raise exception.Create('对不起!查询的动态连接库文件‘gzan_chax_dll.dll’丢失,请重新安装该文件!');
@show_gzap_chax:= getprocaddress(libhandle,'show_gzap_chax');
if not (@show_gzap_chax= nil) then
show_gzap_chax(Application.Handle,Data_Module.Session)
else
raiselastwin32Error;
finally
showmessage('free the_library');
[red] freelibrary(libhandle);//通不过,信息:Access Violation at adress 0x053b0000,Read of address 0x053b0000[/red]
end;
请问是何故?