Author Topic: COM with Easycode ?  (Read 2493 times)

K_F

  • Member
  • *****
  • Posts: 1388
  • Anybody out there?
COM with Easycode ?
« 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
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

rsala

  • Moderator
  • Member
  • *****
  • Posts: 271
    • Easy Code
Re: COM with Easycode ?
« Reply #1 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.
EC coder

K_F

  • Member
  • *****
  • Posts: 1388
  • Anybody out there?
Re: COM with Easycode ?
« Reply #2 on: April 05, 2014, 10:09:53 PM »
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

  • Member
  • *****
  • Posts: 8801
  • Still using Abacus 2.0
    • DednDave
Re: COM with Easycode ?
« Reply #3 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