试试修改 Dll 的工程文件:
library ProjectDll;
uses Windows, ..., ActiveX;
...
procedure DLLEntryProc(Reason: Integer);
begin
if (Reason = DLL_PROCESS_ATTACH) or (Reason = DLL_THREAD_ATTACH) then
CoInitialize(nil)
else
CoUnInitialize;
end;
exports ...;
begin
DLLProc := @DLLEntryProc;
DLLProc(DLL_PROCESS_ATTACH);
end.