Results 1 to 6 of 6

Thread: call a vb dll from the asp.net

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342

    call a vb dll from the asp.net

    I need to call a vb dll from the asp.net. Is there any examples for the dll and the aspx code?

    thanX in advance
    ksm

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    vb.net or vb6 dll?
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342
    vb6 dll .. ..

    but can u plz explain me how to use both??..

    thanX in advance
    ksm

  4. #4
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    Well for a vb.net dll just place it in your application's bin directory and add imports MyDllName.MyClassName at the top of your code behind and you're good to go.
    For vb6 dlls you need to create an interop wrapper dll and place it in your bin directory. The easiest way would be to reference it in vs.net and it will automatically create the required wrapper for you. With vb6.dll's I'm not sure how the security would work though.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342

    thanQ..

    .. but i dont hav vs.net at home.. i hav SDK development tool kit and web matrix.. can u plz tell me how to proceed with vb6 dlls .. thanx in advance
    ksm

  6. #6
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    ok you need to use a tool that comes with the .net sdk called Tlbimp.exe - it should be in your .net directory with all the other .net exes.
    Now ensure your vb6 dll is registered on the machine you will be using it and run the above tool like so:-

    tlbimp myvb6.dll /out:interop.myvb6.dll

    This will create a dll called interop.myvb6.dll - copy it to your aps.net bin directory and then add imports interop.myvb6.myvb6class
    It should now be available to use in the .net project. Search for docs on interop/interoperability for more information on how to do this in the .net sdk documentation.

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