How to check if OleInitialize has already been called?

I want to write a Delphi function to register a dll. I want the function to check if OleInitialize has already been called before it does it. I guess I'm trying to avoid the consequences of initialization twice, because I'm not sure what they can be. I am worried that my function will not process many different DLLs like regsvr32.exe.

+3
source share
1 answer

Take a look at the documentation :

Return Value
[...]
S_FALSE- The COM library is already initialized in this apartment.

... and:

COM . , concurrency, S_FALSE.

+8

Source: https://habr.com/ru/post/1755243/


All Articles