Results 1 to 4 of 4

Thread: VB ActiveX DLL - Possible to use ic C++?

  1. #1

    Thread Starter
    Lively Member Radar's Avatar
    Join Date
    Apr 2001
    Posts
    70

    Question

    Hi All........
    I'm kinda new at C++, but I need to build a simple demo app that will (hopefully) show some features of an ActiveX DLL that was written in VB. Is it possible to declare/use a VB ActiveX DLL in C++? I realize that the VB runtimes will need to be installed for the demo - no problem there. It seems that what I'm trying to do may be a bit backwards - I've heard alot about C++ DLL usage in VB, but almost nothing the other way around. If it helps, I'm using VC++ v6.0. Anyway, any help would be appreciated, and thanks alot in advance

    - Radar

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The #import directive is what you need...for specifics you'd need to check the documentation

    Basically, you just use:
    Code:
    #import "dllname.dll"
    ...and the compiler makes a load of other files to define the interfaces and so forth.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Lively Member Radar's Avatar
    Join Date
    Apr 2001
    Posts
    70
    Thanks Parksie.......
    Just wondering though - does anyone know if it is or is not relatively common for users of languages such as C++ to use VB components in their apps? wondering if its worth mentioning in this DLL's docs that it can be used in C++. Anyway, thanks again.....I'll look closely at the #import directive

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It's not common, but if a component's written in VB and you HAVE to use it. Normally VB programmers use components written in C++.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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