On Mon, 26 Jun 2023, Marco van de Voort via fpc-pascal wrote:


On 26-6-2023 20:26, Michael Van Canneyt via fpc-pascal wrote:

I suspect COM is not properly initialized, and that Lazarus does this for you.
(it needs com for some components on windows)

So, try adding unit windows to the uses clause and add

CoInitialize(nil);

as the first statement of your program.


(afaik 3.2.2's comobj does this automatically, in older version YMMV).

Well, I checked prior to sending my answer. If it does this, it's well hidden. There seems to be some hook for it, though.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to