CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Again! Member not found

    This is a repost of an two earlier posts, of which one with the erroneous title "Method not found".... I need some help desperately here....

    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








  2. #2
    Join Date
    Apr 1999
    Posts
    5

    Re: Again! Member not found

    The code looks ok. You may want to pass the second arg to the CreateDispatch, COleException and look at the status code for any leads.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured