H
hjs2000
Unregistered / Unconfirmed
GUEST, unregistred user!
我希望在线程中创建一个引用AutoCad的OLE对象,但系统总是抛出EOleSysError异常,错误信息是“尚未调用 CoInitialize”,多谢指教!
线程类的Execute函数如下:
procedure TTestThread.Execute;
var
AutoCadApp: Variant;
//AutoCad对象
begin
try
AutoCadApp := CreateOleObject('AutoCAD.Application');
except
ShowMessage('创建对象失败!');
end;
end;
线程类的Execute函数如下:
procedure TTestThread.Execute;
var
AutoCadApp: Variant;
//AutoCad对象
begin
try
AutoCadApp := CreateOleObject('AutoCAD.Application');
except
ShowMessage('创建对象失败!');
end;
end;