Home >
Back-end > Windows 7 multi-threaded concurrent invocations Dcom remote component failure, return to the "r
Windows 7 multi-threaded concurrent invocations Dcom remote component failure, return to the "r
Windows 7 client multi-threaded concurrent invocations VxWorks server-side Dcom remote component, when the number of threads more than six, the client will abort, return:
"Untreated exception:
Untreated Exception: System.Runtime.InteropServices.COM Exception: remote procedure call failed
And did not perform, (exception from HRESULT: 0 x800706bf). "
Dcom interface class is with VxWorks dcomwizard lead generation, a very simple interface, was introduced into the int value,
Virtual HRESULT MintIn para (INT *)=0;
//implementation
Para STDMETHODIMP IntinoutImpl: : MintIn (INT *) {
Printf (" printf % d ", * para);
Return S_OK.
}
Windows client multithreaded call
System. The Guid Guid=new Guid (" {x3x60 0 xeee5xx90, 0, 0 x11x6 {0 x00 to 0 xx9, 0 x00 to 0 x00 to 0 x00 to 0 x00 to 0 x00 to 0 x00}} ");
System. The Type t=Type. GetTypeFromCLSID (guid, remoteIP, true);
The object COMObject=System. The Activator. CreateInstance (t);
BstrLib. Istr co=COMObject as bstrLib. Istr;
//multi-threaded call
for (int i=1; i <=10; I++)//more than 6 threads can sometimes call succeeds, in most cases failure
{
Thread the Thread=new Thread (new ParameterizedThreadStart (RConnect));
Thread. The Start (I);
}
Private static void RConnect object (k)
{
for (int i=1; i <=5000; I++)
{
//Thread. Sleep (300);
Com. Co. MinIn (I);
}
}
Someone used the remote invocation Dcom components, Daniel, please help see what reason, thank you,