A
Alfred B. Thordarson
I'm trying to use a 3rd party DLL, which I have no control over, in my
WebService (written in C#). However, every time my WebService tries to
call one of the dllimport-ed methods it simply never returns from the
call. I know the DLL is there and it works well in many console and
windows applications I have done.
I have been able to create a console application that fails in the
same way, at least I think it does!?!? It fails if I take the
[STAThread] from the main method. Then I get a message dialog saying
"The operating system cannot load the DLL module. Please check that
the DLL module exists, and that any other DLL modules that it will use
also exist." The DLL is there and it works if I put the [STAThread]
back on the main method.
How do I make part of my WebService use the STAThread model instead of
the multi-threaded model? I realize I don't want to do this all over,
just partially?!?!
I have seen some discussions about using dllimport and WebServices
together but nothing that can help me. All your help is highly
appreciated.
Looking forward to hearing from you.
Thanks.
WebService (written in C#). However, every time my WebService tries to
call one of the dllimport-ed methods it simply never returns from the
call. I know the DLL is there and it works well in many console and
windows applications I have done.
I have been able to create a console application that fails in the
same way, at least I think it does!?!? It fails if I take the
[STAThread] from the main method. Then I get a message dialog saying
"The operating system cannot load the DLL module. Please check that
the DLL module exists, and that any other DLL modules that it will use
also exist." The DLL is there and it works if I put the [STAThread]
back on the main method.
How do I make part of my WebService use the STAThread model instead of
the multi-threaded model? I realize I don't want to do this all over,
just partially?!?!
I have seen some discussions about using dllimport and WebServices
together but nothing that can help me. All your help is highly
appreciated.
Looking forward to hearing from you.
Thanks.