News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

COM with Easycode ?

Started by K_F, April 03, 2014, 12:57:18 AM

Previous topic - Next topic

K_F

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
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

rsala

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.
EC coder

K_F

Thanks..

AFAIK you can place it anywhere before you use it.. I think (must read  :biggrin:)
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

dedndave

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