Dll 代码

var OldDllProc: TDLLProc; procedure ThisDllProc(Reason: Integer); begin if Reason = DLL_THREAD_ATTACH then IsMultiThread := True; // for FastMM // for ADO case Reason of DLL_PROCESS_ATTACH, DLL_THREAD_ATTACH:CoInitialize(nil); DLL_PROCESS_DETACH, DLL_THREAD_DETACH:CoUninitialize; end; if Assigned(OldDllProc) then OldDllProc(Reason); end; begin OldDllProc := DllProc; DllProc := ThisDllProc; ThisDllProc(DLL_PROCESS_ATTACH); end.

你可能感兴趣的:(thread,Integer,dll)