请大侠请教:Delphi做的IE控件(OCX)无法调用DLL的问题
描述如下,请大侠帮忙解决,万分感谢,网上搜了很,少这方面的资料。
1、代码本身没有问题,单独执行一切正常;
2、在IE下面无法调用时提示"库D:\TEMP\Low\ICDrv\dculc.dll加载失败:ErrorCode = 1114."
3、用Delphi自带的WebBrowser调用也正常。
可用分太少,后期补上,谢谢,源码键接:http://download.csdn.net/detail/yuetianbao/9448005
调用OCX控件部分代码如下:
加载DLL部分源码如下:
1、代码本身没有问题,单独执行一切正常;
2、在IE下面无法调用时提示"库D:\TEMP\Low\ICDrv\dculc.dll加载失败:ErrorCode = 1114."
3、用Delphi自带的WebBrowser调用也正常。
可用分太少,后期补上,谢谢,源码键接:http://download.csdn.net/detail/yuetianbao/9448005
调用OCX控件部分代码如下:
<div>
<OBJECT
id=TestAX
codebase="MyActiveX.ocx"
classid="clsid:32C6DD96-596F-452D-97F9-9A0256260B9F"
width=560
height=359
align=center
hspace=0
vspace=0
>
</OBJECT>
</div>
加载DLL部分源码如下:
var
P: Pointer;
fDrvLibHnd: LongInt;
fn: string;
Method: TIC_InitComm;
begin
fn := PChar(IncludeTrailingPathDelimiter(GetEnvironmentVariable('temp')) + 'ICDrv\dculc.dll');
if FileExists(fn) then
begin
fDrvLibHnd := Windows.LoadLibrary(PChar(fn)); //在这里报错 库D:\TEMP\Low\ICDrv\dculc.dll加载失败:ErrorCode = 1114.
if (fDrvLibHnd <= 0) then
raise Exception.CreateFmt('库%s加载失败:ErrorCode = %d', [fn, GetLastError])
else
begin
@Method := Windows.GetProcAddress(fDrvLibHnd, 'IC_InitComm');
Method(-1);
end;
end;
end;
...全文


