An exception occurs in my application,when C# application try load one C++ DLL. it shows : System.DllNotFoundException: Unable to load DLL (Exception from HRESULT: 0x8007045A) . It's very strange , it's only occurs in such step:
1. A_user starts one tomcat server, in one webservice(A_web) of this server use java code "Runtime.getRuntime().exec(a.exe) " to run A program in A_PATH(all need c++ dll in this path)?Call the A_web service, so A program runs and loads
2?B_user starts B program in B_PATH(all need c++ dll in this path).when it try load dll, it will throw DllNotFoundException.
Both A and B are C# program in one PC. A and B can run without error when start in normal way(form cmd). And exchange steps above, run B first and A second, NO exception occurs.
It seems that java server adds something on DLL loading. Without such server, all is OK. But what? I use procmon try to find some reason, it shows two difference between two result(right B/wrong B):the wrong one will try twice on get *dll.manifest and *dll.config
and failed(the right one try each once and failed);the wrong one don't has ReadFile operation on dll but right one has and succeed.
Can anyone give some reason about this?
View Complete Post