[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Unmanaged DLL from .Net Svc via interop

jeff.boone

5/18/2007 9:27:00 PM

I have a project that's giving me a fit. I have a Windows service
written in C#, that calls into an out-of-proc COM DLL written in
unmanaged C++. The service provides a database access API to client
applications via .Net RMI. The meat of the data access code is in the
DLL; the service itself is really nothing more than a request broker.
The problem is, every so often the service will unexpectedly shut down
either during or after a call from it to the DLL. The call appears to
be successful, and the returned data is correct, but on the next
attempt the client app throws an exception stating (paraphrased):"The
service actively refused the connection."

The kicker is, if I build the DLL in Debug mode, everything works
fine. Normally, that fact indicates the presence of some un-
initialized data item in the DLL, that makes it fail when you build it
in Release mode. But, not only have I been unsuccessful in
identifying any such data item, but I can run the same DLL, in Release
mode, from a VB 6 test harness all day long and it just keeps running.

I'm relatively new to .Net development, and interop in particular is a
black box to me. Is there some peculiarity of COM interop that could
explain what I'm seeing?

Jeff