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
Printable View
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
vb.net or vb6 dll?
vb6 dll .. ..
but can u plz explain me how to use both??..
thanX in advance
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.
.. 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
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.