Win32 - Use COM object help
-
Been programming for too long, but always wanted to understand how to call a COM object from within a win32 c application. So I'm starting here hoping for some guidance. Although I have VS 2008, I would like to do this in Codeblocks. The COM object I want to use is for Sage 100. I currently load the COM object using Lazarus (DELPHI) like so: unit header_boi.pas const boi_so_err = 1; boi_data_path = '\\MM-2012-MAS-DEV\Sage\Sage 100 Advanced ERP\MAS90'; boi_script = 'ProvideX.Script'; boi_session = 'ProvideX.PvxDispatch'; unit boi_api.pas hboi_script := CreateOleObject(boi_script); In C, it is my understanding, I need to use CoCreateInstance?? Is this correct? Problem is, I just don't know. I have lots of books, but would love some guidance. Best in 2021, Good karma promised. Bret
-
Been programming for too long, but always wanted to understand how to call a COM object from within a win32 c application. So I'm starting here hoping for some guidance. Although I have VS 2008, I would like to do this in Codeblocks. The COM object I want to use is for Sage 100. I currently load the COM object using Lazarus (DELPHI) like so: unit header_boi.pas const boi_so_err = 1; boi_data_path = '\\MM-2012-MAS-DEV\Sage\Sage 100 Advanced ERP\MAS90'; boi_script = 'ProvideX.Script'; boi_session = 'ProvideX.PvxDispatch'; unit boi_api.pas hboi_script := CreateOleObject(boi_script); In C, it is my understanding, I need to use CoCreateInstance?? Is this correct? Problem is, I just don't know. I have lots of books, but would love some guidance. Best in 2021, Good karma promised. Bret
-
Take a look at this excellent article: COM in plain C[^].