wdhough
asked on
IMPLEMENT_OLECREATE & Automation
Hi,
I am trying to enable OLE automation in one of my applications. I want to use the IMPLEMENT_OLECREATE macro, however i am having difficulty.
this is the macro as mentioned on the msdn website.
IMPLEMENT_OLECREATE(class_ name, external_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8 )
I have several questions.
1. class_name - What class my CWinApp Derived class?
2. i understand the " l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8 " part is the clsid of the application. How do i find out what my clsid for my app is?
thanks, also if you can point me in the direction of a good how to do on this that would appreciated
I am trying to enable OLE automation in one of my applications. I want to use the IMPLEMENT_OLECREATE macro, however i am having difficulty.
this is the macro as mentioned on the msdn website.
IMPLEMENT_OLECREATE(class_
I have several questions.
1. class_name - What class my CWinApp Derived class?
2. i understand the " l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8 " part is the clsid of the application. How do i find out what my clsid for my app is?
thanks, also if you can point me in the direction of a good how to do on this that would appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Aplogies,
I left out the DECLARE_OLECREATE(name) in the .h file.
I left out the DECLARE_OLECREATE(name) in the .h file.
ASKER
Mahesh, I know have most of the application up and running (so to speak). My application is an Exe that has interfaces in it that external applications can access and use for automation. I have added a new interface for my new class. I have written a quick app (in c#), litterally a form with a button on it, that when clicked should instantiate my application object.
The problem i am receiving is
An unhandled exception of type 'System.Runtime.InteropSer vices.COME xception' occurred in WindowsApplication1.exe
Additional information: COM object with CLSID {157A834E-77AD-4012-8437-3 BB3C9007E2 E} is either not valid or not registered.
I have checked through the object browser and it can see the object i am trying to instantiate, i have taken this project over from someone else who set up the other interfaces and i dont know how they "registered" them. Any ideas
Many thanks
Will
The problem i am receiving is
An unhandled exception of type 'System.Runtime.InteropSer
Additional information: COM object with CLSID {157A834E-77AD-4012-8437-3
I have checked through the object browser and it can see the object i am trying to instantiate, i have taken this project over from someone else who set up the other interfaces and i dont know how they "registered" them. Any ideas
Many thanks
Will
ASKER
Thanks for your response. I have managed to do that. but when compiling now it says
c:\test\apps\MyApp.cpp(54)
c:\test\apps\MyApp.cpp(54)
c:\test\apps\MyApp.h(7) : see declaration of 'MyApp'
c:\test\apps\MyApp.cpp(54)
c:\test\apps\MyApp.cpp(54)
c:\test\apps\MyApp.h(7) : see declaration of 'MyApp'
c:\test\apps\MyApp.cpp(54)