Link to home
Start Free TrialLog in
Avatar of southmountain
southmountain

asked on

How to use my DLL writen by Visual C++ in ASP.NET?

Dear Experts:

I have a toolkit that is DLL writen in Visual C++.

Now I want to write web application in ASP.NET and want to invocate the functions in DLL.

I did some research and didn't find too much information on how to code ASP.NET using DLL.

Could anybody give me help, give me some links or tutorials?

Your help is highly appreciated!
-Southmountain
SOLUTION
Avatar of drichards
drichards

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of southmountain
southmountain

ASKER

Dear Experts:

I forgot to tell you that I have full source code for this DLL.
Do I have other options such as recompile it in Visual C++.NET?

If it is good choice I might considering migrating to Visual C++.NET.
Thanks,
-southmountain
Recompiling does not really help you.  Your options are still the same as I outlined previously.  Converting to managed C++ helps, but that is a lot more than merely recompiling.  Have a look at the managed extensions in VC++ .NET - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcconMCOverview.asp.  This would also be used to write a managed wrapper for the dll.
Thanks a lot for your comments.

I am not sure if it is a COM DLL. based on my document, I should copy this DLL to
my \WINNT\SYSTEM32 directory.

Based on your suggestion and I do write a managed C++ wrapper, how can I use it in ASP.NET?
Any more links for demo? my final goal is to write a web application.

Thanks,
-Southmountain

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You use the managed wrapper from ASP.NET just like you use any other assembly in .NET.  You add a reference to the managed dll to your web app project and then you have access to the components in the library.  Just right click on "References" in the Solution Explorer, select the ".NET" tab and then browse for the wrapper library file.