Browse Source

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 years ago
parent
commit
d18ecfd84f
1 changed files with 2 additions and 0 deletions
  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