Discussion Locked

Register the VB DLL files in ASP.NET

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Dear Friends

I have created one DLL file In VB 6 when I m using in ASP.NET Application
I m getting the Error which I given below
System.Runtime.InteropServices.COMException
How to register the VB DLL file in application
You have idea friends
Thanks in Advance

4 replies

by bcasson

In your ASP.NET project's Solution Explorer, right click on References and then on Add Reference.

After a few moments, the Add Reference window appears. There are three tabs: .NET, COM and Project. Click the COM tab. If you have registered your COM on the computer it will appear in the list, if not, click Browse and path your way to where your DLL is located. Highlight the DLL and click Open (example: wdkSymposium.DLL). Then click OK.

Type an Import statement for your DLL, you will see the name of the DLL appear in the dropdown, when you type the word IMPORTS.

Imports wdkSymposium

Then use a DIM statement to instansiate it:

Dim ws As wdkSymposium.CdbIOClass = New wdkSymposium.CdbIOClass

You can then reference the various public methods and properties. Using the above example, you can reference a method like this:

If ws.addArchive(Guid) Then
.....
End If

by john

The 1st answer is correct but if you are using C# the syntax is:

Using wdkSymposium

there is no DIM keywork in C#:

by arti.gupta

Select From Start -> Run In run
just type regsvr full path + ur dll name with .dll extention
this way u can register ur dll.

This discussion is closed to new replies.