瀏覽代碼

Calling CoInitialize from thread used to access s Shell API (it's good idea in general, and might solve some problems, like not resolving icons)

Source commit: 8cedcfb3f1c5194d18fedb7d75d4b58fd30c821d
Martin Prikryl 7 年之前
父節點
當前提交
d18ecfd84f
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      source/packages/my/OperationWithTimeout.pas

+ 2 - 0
source/packages/my/OperationWithTimeout.pas

@@ -116,6 +116,8 @@ procedure TOperationWithTimeoutThread.Execute;
 var
   Operation: TOperation;
 begin
+  CoInitialize(nil);
+
   while WaitForSingleObject(FRequestEvent, INFINITE) = WAIT_OBJECT_0 do
   begin
     if Terminated then