locked
how to Add VB6 dll in C#.net and vb6 application RRS feed

  • Question

  • can u pls tell how should i add dll of vb6 in c#.net and vb6 application???

    Actually i tried to add dll in c#.net as well as in vb6 but i m getting error....

    when i try to register vdb6 dll then also i m getting error i.e : dll was loaded but the dllregisterserver entry point was not found

    in c#.net i m getting this error : A reference to the "....dll" could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component

    in vb6 i m getting this error : file not found

    Please guide me.

     

    • Moved by Chao Kuo Wednesday, October 6, 2010 10:58 AM VB6, interop and update should be better for this question. (From:Visual Basic General)
    Wednesday, September 29, 2010 6:05 AM

All replies

  • This is not a VB6 forum, but are you sure it is VB6 and not something like VB 10?
    Success
    Cor
    Wednesday, September 29, 2010 6:25 AM
  • i know its not vb6 forum..... but if u have any idea about my question then pls reply me.... thanks in advance.....
    Wednesday, September 29, 2010 6:28 AM
  • Hi,

    There is no issue with c# to add reference to any VB6 DLL. If any COM dll was not registered properly .NET will display the following error message.

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    A reference to 'xyz.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
    ---------------------------
    OK  
    ---------------------------

    So the problem in your case is DLL was not registered properly.  Using Vista / 2008 machine?.

    Read Explanation of Regsvr32 usage and error messages for more info

    -------
    Bharath S.

    • Marked as answer by myquestion123 Wednesday, September 29, 2010 7:05 AM
    • Unmarked as answer by myquestion123 Wednesday, September 29, 2010 7:06 AM
    Wednesday, September 29, 2010 6:41 AM
  • The error you are getting indicates that the DLL is not a COM or ActiveX DLL, which means it probably wasn't developed in Visual Basic 6.0. It sounds to me like it's a standard Windows DLL that exports functions. Do you have any documentation for this DLL? Can you identify what it is?

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, September 29, 2010 12:12 PM
  • Ah that is the same when you take a brilliant from a shop without to pay. 

    And then you tell, I know that I have to pay, but I wanted that brilliant so much.

    Can somebody help me to sell it?

    And some are even helping you with that.

     


    Success
    Cor
    Wednesday, September 29, 2010 4:20 PM