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

    How to call a MFC dll from a COM dll

    Hi, Everyone:
    Could you tell me how to create a COM dll and use this COM dll to call a MFC dll? It is urgent. I appreciate any help from you in advance!

    charlie


  2. #2
    Join Date
    Apr 1999
    Location
    Philadelphia, PA, US
    Posts
    138

    Re: How to call a MFC dll from a COM dll

    Do u know how to use COM dlls ?? If yes then i think it should work in same way in u r dll too. Like import type library, get interfase pointer and call functions ...

    Are you facing specific problem or u want to know general method of calling a COM dll ??



  3. #3
    Guest

    Re: How to call a MFC dll from a COM dll

    Hi, Mahesh Beniwal:
    Thanks a lot for your response! I know how to use a COM dll, know how to call another COM dll or Win32 dll (using lib and dll) from a COM dll without any problem. However, I can not figure out how to call a MFC dll from a COM dll. I am going to try using LoadLibrary functions. Could you tell me your idea with more details. I appreciate your great help and your time.

    Charlie


  4. #4
    Join Date
    Apr 1999
    Location
    Philadelphia, PA, US
    Posts
    138

    Re: How to call a MFC dll from a COM dll

    Well Charlie,
    You have to use LoadLibrary function. And if your MFC dll is extension dll ( that means mfc dll exports classes ) then you have to import classes in your dll else u have to import functions by using #import directive
    if your dll is extension then you have to defien AFX_EXT.. see help in msdn for extension dll OR
    BEST is Inside VC++ from microsoft press , dll chepter .. it's pretty easy


  5. #5
    Guest

    Re: How to call a MFC dll from a COM dll

    Hi, Mahesh Beniwal:
    I already solved this problem. Thanks a lot for your help and time!

    Charlie


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