Someone help me make this dll project in c++ able to be referenced in vb.net?

I have this c++ dll project but i cant figure out how to get it able to be referenced in vb.net it always says it cant be referenced. Please Help and post a link to the project you edited or send me a copy of it at josh@winmxunlimited.net

The Project source - http://www.winmxunlimited.net/source.zip



Answer this question

Someone help me make this dll project in c++ able to be referenced in vb.net?

  • Lance P. Smith

    that makes no sense.


  • Large_Goose

    There could be several reasons for this.

    What version of C++ is it written in

    If it has the correct entry points, and it's written in VS2005 you can do the following:

    Put the DLL in the directory where you want it to be.

    In the same directory open a file in notepad. save this in it:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm.exe YOURDLLFILENAME.dll /tlb

    (one line)

    Execute the batch file. You should be able to see the DLL and or tlb in the references under COM or at least browse. Add the references. I hope it's a framework V2.0 Image.

    Goodluck



  • adinaronson

    That's different.

    where ever your dll is, create a text file with notepad. Cut and paste that line in it. Change the filename in read to the name of your dll.

    Save the file name ...ummmm call it regasm.bat.

    Open a command window. Set your default to the directory of your dll. In the command window, type Regasm

    This should process your file and produce a type library IF.....

    If the DLL has been written in VS2005.

    If it has been marked correctly internally.

    And if it was written to be COM visible.

    Once you've regasm'ed the DLL. in VS2005, select the Project | Properties | references option. Select "browse" to be safe, go to the directory of the dll.

    Click on the DLL an if that doesn't work, click on the TLB.

    If your DLL was written to be a resource for VS2005 it's classes, methods and properties should be visible after instantiating the class.

    Good Luck



  • TonyP

    it was written in c++6 for c++6


  • Jesse Arnold

    well i dont get what to do.


  • RickBoogher

     

    I didn't say it had to make sense.

    Regasm is the utility that is used to register Framwork 2.0  DLLs and make TLBs.

    I've done this several times and it works whether it makes sense or not. That's what regasm is for.



  • Andrei Gavra

     

    did you try registering it with regsvr32

    Do you have source code for the project

    Here's something else that may help. Get a copy of depends.exe. I don't know it it comes with VBExpress or not. When you get a copy of depends, run it against this dll to see if it has any entry points at all.

    It you see some you might be in luck. It will all depend up how the dll is written as to whether you can call the routines because it rememeber correctly the  V6.0 C++ and vb interface were not all that compatible without doing special things inside the DLL with arguments.



  • Someone help me make this dll project in c++ able to be referenced in vb.net?