U
unknown;
Hi,
i need to write a module in C++ (unmanaged) witch i can use in VB.NET.
The C++ module doesn't have a GUI.
In VB i need to create an instace of the C++ class. I understand the
only way to do this is to make a COM object from my C++ class.
So i searched on the internet and i found so much different stuff about
Active X, COM, OLE, Automation, ATL that i just don't know where to
start to solve my problem.
for example.. if i create a VB project i can add a COM reference (right
click on project -> add refference) and use it in my code like:
Dim Excel As Excel.Application
Excel = New Excel.Application
this is what i want. how do i create such a COM object in C++
all i can find is that i need to use CoCreateInstance to get a pointer
to my CoClass from the COM object
and about QueryInterface, release and the IUnknown interface but when i
create an instance of my the Excel application COM object i don't.. i
don't understand
I understand that there are more than one ways to create a COM object.
(using ATL (with or without using Attributes) )and not using ATL).
I'm lost. Can anybody tell me how to create a C++ module witch i can
use in VB like the Excel example or what words i should search on.
Also, i don't get the ATL Attributes thing. I understand it's supposed
to make a COM object less complicated.
I'm using Visual Studio 2005
Hoping you can help me.
i need to write a module in C++ (unmanaged) witch i can use in VB.NET.
The C++ module doesn't have a GUI.
In VB i need to create an instace of the C++ class. I understand the
only way to do this is to make a COM object from my C++ class.
So i searched on the internet and i found so much different stuff about
Active X, COM, OLE, Automation, ATL that i just don't know where to
start to solve my problem.
for example.. if i create a VB project i can add a COM reference (right
click on project -> add refference) and use it in my code like:
Dim Excel As Excel.Application
Excel = New Excel.Application
this is what i want. how do i create such a COM object in C++
all i can find is that i need to use CoCreateInstance to get a pointer
to my CoClass from the COM object
and about QueryInterface, release and the IUnknown interface but when i
create an instance of my the Excel application COM object i don't.. i
don't understand
I understand that there are more than one ways to create a COM object.
(using ATL (with or without using Attributes) )and not using ATL).
I'm lost. Can anybody tell me how to create a C++ module witch i can
use in VB like the Excel example or what words i should search on.
Also, i don't get the ATL Attributes thing. I understand it's supposed
to make a COM object less complicated.
I'm using Visual Studio 2005
Hoping you can help me.