.Net Web Service and unmanaged DLL

P

P Chase

I am writing .Net Web Service using Visual Studio 2005. Part of its
functionality will be implemented by a C DLL, which I am also writing.
The Web Service and DLL are separate projects in one Visual Studio
Solution.

My question is how best to make the C DLL available to the Web
Service?

I have had success "manually" copying the the C DLL to the same
directory as the Web Service DLL. However, this is horrid for various
reasons, particularly that Visual Studio seems to keep the DLL open
all the time, so I cannot replace it with a new one until Visual
Studio is closed down. This would also seem to preclude simply
creating a custom build step to copy the C DLL to that directory, as
this would fall foul of the same problem as the "manual" copying.

How can I get Visual Studio to make the C DLL available to the Web
Service automatically?
 
C

Cowboy \(Gregory A. Beamer\)

Locking DLLs is a common issue with anything COM, which is the reason COM
based web solutions are best clustered. The only way to eliminate this is to
add another boundary, which means you will be trading off performance for
the convenience of being able to drop a DLL in place.

The only other way I know to make it easy is to put the DLLs in COM+, but I
have never tried the .NET route with this solution. We used this method,
years ago, with a traditional ASP application and it worked great, but it
would have to be tested with .NET.
 
P

P Chase

Locking DLLs is a common issue with anything COM, which is the reason COM
based web solutions are best clustered. The only way to eliminate this is to
add another boundary, which means you will be trading off performance for
the convenience of being able to drop a DLL in place.

The only other way I know to make it easy is to put the DLLs in COM+, but I
have never tried the .NET route with this solution. We used this method,
years ago, with a traditional ASP application and it worked great, but it
would have to be tested with .NET.


| Think outside the box!
|

Thanks for the reply.

I am not sure it helps me, though. My C DLL really is just a plain C
DLL, with some exported C functions. I has nothing to do with COM.

The main thing I want is for the Web Service project in Visual C++ to
locate the C DLL automatically. I'd think this should be possible, as
both the Web Service and the DLL projects are part of same Visual
Studio Solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top