Using vb6 dll in C++

This is a discussion on Using vb6 dll in C++ within the C++ Programming forums, part of the General Programming Boards category; Hi all, I have this ancient library written in Visual Basic 6 which I'd like to use in my C++ ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    4

    Using vb6 dll in C++

    Hi all,
    I have this ancient library written in Visual Basic 6 which I'd like to use in my C++ (.NET 2008) project. When I compile the vb code to a .dll it gives me a .lib as well. I can start a new C++ project and include the .lib, no problem. But say that I made a VB function like this:

    Code:
    public function bla()
        msgbox "Hi there!"
    end function
    I can't seem to be able to call this function from my C++ project like this:

    Code:
    void bla();
    
    void main() {
        bla();
    }
    Normally it links these things automatically. However it doesn't seem to find the function in the library.

    Is this even possible?

    Thanks in advance!

    The Vile Guy

    EDIT: c++ .net version added and vb function made public
    Last edited by vileguy; 05-18-2011 at 08:34 AM.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21