CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    54

    Directions for using VB DLL in C++/MFC

    I have a DLL that I need to integrate to. From the documentation that came with this DLL, it looks like this was made to work with VB, but I am using C++ and MFC. The DLL contains type information that I can see in the OLE/COM Object Viewer. The DLL contains functions that I want my application to call, and events that I want my application to process.

    I have been having a terrible time trying to look up information for how to integrate with this DLL because I don't really know what it's called. I have been searching for terms such as: Visual C++ MFC VB DLL ActiveX COM automation client class events handler sink references #import... but I haven't managed to find anything that tells me how to use this DLL in my project. Can somebody please point me in the right direction?

    I am using Visual C++ 2005. Several times I have come across directions related to VC6.0, but I haven't been able to follow those directions.

  2. #2
    Join Date
    Oct 2006
    Posts
    216

    Added in Reference?

    Did you add the dll in Project->Reference?

  3. #3
    Join Date
    Nov 2004
    Posts
    54

    Re: Added in Reference?

    Quote Originally Posted by visharad
    Did you add the dll in Project->Reference?
    I know how to do that, but I don't know what to do after that. I don't see any new classes in the class view. Does adding a reference define a class that I should be able to create an instance of? Does it make a class I can somehow derive from that I can override some functions for the events that I need to handle?

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Added in Reference?

    You have to register the dll in your system and make a wrapper classes from dll coclasses: either #import it or make "MFC class from Type Library".
    Best regards,
    Igor

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