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

    How to make VB ActiveX Dll functions visible to VC++

    Hello,
    I am facing a problem. I am trying to call a dll file which is made in
    VB in VC++ but VC does not access the fuctions that are in VB dll. What is the
    problem. The DLL is a VB ActiveX DLL and when I view the dll through a DLL Viewer
    it only shows the functions

    1 0 DllCanUnloadNow (00002756)
    2 1 DllGetClassObject (0000272A)
    3 2 DllRegisterServer (00002740)
    4 3 DllUnregisterServer (00002714)

    which I think are added by VB wizard. and I can access these functions in VC.
    How can I make it possible that VC can also access my methods or functions which
    are defined in VB Dll.
    Waiting for your kind reply,
    Farhan Zia.



  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: How to make VB ActiveX Dll functions visible to VC++

    you have to call the methods of that VB ActiveX dll like any other COM object.
    (in VC 6) use ClassWizard to Add a new class, choose the "From Typelibrary" option and select the VB ActiveX DLL.
    That's it: Classwizard will have created a new class from your VB ActiveX Component.


  3. #3
    Join Date
    Jan 2000
    Posts
    2

    Re: How to make VB ActiveX Dll functions visible to VC++ with out MFC

    What if I am working with out using MFC and working as Win32 Project. in that case how can we call functions defined in VB Dll


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: How to make VB ActiveX Dll functions visible to VC++ with out MFC

    in that case you could call the VB DLL methods via the IDispatch interface.


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