Thread ID and Unmanaged DLLS

N

NEW2.NET

I have a .NET class library with some unmanaged DLLs inside that are based on
MFC. I'm hosting the class library in a web service. The first client of
the web service works fine, and the access class to the .NET class library is
set to 'nothing' when leaving the web method. The second client of the web
service gets a different thread ID which the unmanaged MFC stuff cannot
handle and crashes. I noticed that even though I'm setting the access class
to nothing in the web service method when I'm done with the first client,
when the second client request is processed, the unmanaged DLLs are not
reloaded (since they weren't unloaded). Some workaround thoughts:

1) How can I completely reinitiate the unmanaged DLLs for each client?

I looked into trying to unload the unmanged DLLs manually, but did not see
any success.

I thought about having two web services, one to queue up requests and the
second to host the problem class library. I thought I could then completely
close the second web service between processing client requests, thereby
unloading the problem DLLs by fully shutting it down. How do I completely
shutdown the second service from inside the first service?

2) How can I get the same thread ID for each client, or a different web
service instance?

Thanks for any help
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top