The MASM Forum

Projects => Easy Code IDE 32/64-bit => Topic started by: K_F on April 03, 2014, 12:57:18 AM

Title: COM with Easycode ?
Post by: K_F on April 03, 2014, 12:57:18 AM
Hi Ramon,
When using COM object with Easycode, where would I place the CoInitialize invoke.

I'm thinking in the WinMain -> Create Msg section.. would this be ok, or does Easycode do it automatically.
I cannot find anything relating to COM in the Help file

Thanks
Van
Title: Re: COM with Easycode ?
Post by: rsala on April 04, 2014, 10:16:00 AM
Hi Van,

No, Easy Code does not that automatically, so yes I think you should place the CoInitialize invoke in the WinMain WM_CREATE message.

Regards,

Ramon

BTW: No topic about COM in the help file.
Title: Re: COM with Easycode ?
Post by: K_F on April 05, 2014, 10:09:53 PM
Thanks..

AFAIK you can place it anywhere before you use it.. I think (must read  :biggrin:)
Title: Re: COM with Easycode ?
Post by: dedndave on April 05, 2014, 11:59:44 PM
yah - before you use it, and after you're done, couninitialize

you can put in the WndMain routine (before window create/after message loop exit)
or in the main window WndProc (WM_CREATE/WM_DESTROY)

i prefer the WndMain method
if the window fails creation for some reason, WM_CREATE is executed, but WM_DESTROY is not