April 16th, 1999, 09:48 AM
This is a repost of an earlier post with the erroneous title "Method not found"...
I'm trying to wrap an in-process COM DLL using Visual C++ and MFC. I've created a class using the classwizard from the DLL (the only thing available to me, no TLB or anything else), and the classwizard neatly created 4 new classes from the DLL, which correlate with the classes that should be available from the documentation.
I've added AfxOleInit to the instation of the application and then try to run the following code:
// begin of code
ISession ceSession;
BOOL bSuccess = ceSession.CreateDispatch("ComHpceWl.Session");
if (!bSuccess) AfxMessageBox("Error...");
// now I'm calling any of the methods of the ceSession object
ceSession.SetSource("http://localhost/adminflow/cgi/bin/afwls.cgi")
// end of example code
But any of the methods I call returns back "Membernot found". The CreateDispatch call returns nozero (which is ok), but I can't seem to access any of the methods of my wrapped COM DLL.
Looking in the MSKB, all the references to this problem, don't really apply to this situation.
I have the suspicious feeling I'm overlooking something.
Any help urgently appreciated.
Regards,
Rob
I'm trying to wrap an in-process COM DLL using Visual C++ and MFC. I've created a class using the classwizard from the DLL (the only thing available to me, no TLB or anything else), and the classwizard neatly created 4 new classes from the DLL, which correlate with the classes that should be available from the documentation.
I've added AfxOleInit to the instation of the application and then try to run the following code:
// begin of code
ISession ceSession;
BOOL bSuccess = ceSession.CreateDispatch("ComHpceWl.Session");
if (!bSuccess) AfxMessageBox("Error...");
// now I'm calling any of the methods of the ceSession object
ceSession.SetSource("http://localhost/adminflow/cgi/bin/afwls.cgi")
// end of example code
But any of the methods I call returns back "Membernot found". The CreateDispatch call returns nozero (which is ok), but I can't seem to access any of the methods of my wrapped COM DLL.
Looking in the MSKB, all the references to this problem, don't really apply to this situation.
I have the suspicious feeling I'm overlooking something.
Any help urgently appreciated.
Regards,
Rob