Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
d18ecfd84f
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  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