procedure TfrmPlayMain.RunMode;
var
actcmd:string;
dllName:string;
dllH:THandle;
appPath:string;
ActionCmd:TActionCmd;
i:integer;
CmdLoc:TCmd;
begin
appPath:=extractFilePath(application.ExeName);
for i:=0 to Length(DLLInfo)-1 do
begin
dllH := loadlibrary(pchar(appPath+DLLInfo[i].DLLName));
DLLInfo[i].handle:= dllH;
@CmdLoc:= windows.getProcAddress(dllH,pchar('CreateForm'));
try
CmdLoc(DLLInfo[i].LocX,DLLInfo[i].LocY,Application,conAdo);
finally
CmdLoc := nil;
end;
end;
end;
想通过多线程调用一组DLL,不知道如何调用?谢谢
var
actcmd:string;
dllName:string;
dllH:THandle;
appPath:string;
ActionCmd:TActionCmd;
i:integer;
CmdLoc:TCmd;
begin
appPath:=extractFilePath(application.ExeName);
for i:=0 to Length(DLLInfo)-1 do
begin
dllH := loadlibrary(pchar(appPath+DLLInfo[i].DLLName));
DLLInfo[i].handle:= dllH;
@CmdLoc:= windows.getProcAddress(dllH,pchar('CreateForm'));
try
CmdLoc(DLLInfo[i].LocX,DLLInfo[i].LocY,Application,conAdo);
finally
CmdLoc := nil;
end;
end;
end;
想通过多线程调用一组DLL,不知道如何调用?谢谢
解决方案 »
- spcomm怎么接收一段时间的数据后,就不再接收了
- 高分相送,急急...各位帮个忙!
- 关于COMBOBOX的问题?
- 全国各地搞软件销售的底薪是什么水平?在没有业绩的情况下,怎么维持基本生活,了解的,麻烦说两句
- 表格与数据库控件的问题?
- 再次请教高手!!100分关于网络数据传输
- 如何避免MDI子窗口创建、切换时的闪烁?
- 如何将listview中的列表信息通过quickreport报表打印出来?
- 关于RegisterHotKey
- 各位高人,请教一个关于打印的问题?(printer.textrect)
- 求助:我的 SaveDialog1 ,我保存了,为什么没有保存成功呢?
- *****请问如何根据窗体名来结束应用程序*********
在Execute里去调用这个函数
begin
dllH := loadlibrary(pchar(appPath+DLLInfo[i].DLLName));
DLLInfo[i].handle:= dllH;
TDllThread.Create(dllh,true);
end;把Handle当成TThread的子类的参数传入
TDllThread = class(TThread)
private
FHandle: THandle;
public
constructor Create(AHandle: THandle; B: Boolean);
procedure Execute;override;
end;procedure TDllThread.Execute;
begin
...
end;
begin
FHandle:= AHandle;****end;
请问这里为什么不能赋值?会报错
with message 'Access violation at address 00403721 in module
'PlayScreen.exe'. Read of address 0000000 Process stopped.
Use Step or Run to continue谢谢