Explorar o código

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)

(cherry picked from commit d18ecfd84f53087cdec75e31943dd15d77e6e505)

Source commit: 99083ba68cba2a62cd03f2fbaac8288ed2bdb1d1
Martin Prikryl %!s(int64=7) %!d(string=hai) anos
pai
achega
40f672204f
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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