[vb.net] RPC Error - for each loop
Hi,
I am using CS5 Indesign Interop in vb.net to process.
In some cases, I am getting RPC Error. I tried with vs 2005 and vs 2008 with CS5 and result is the same.
On exploring it was found that, RPC error occurs while using the 'for each loop' instead of 'for loop'. This looks strange because it works for some cases and also fails in some cases.
I tried with different system, cleared the profile and the result is the same.
I have given the error below what I got:
The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED)) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant.MoveNext()
Is there any way to solve/fix this problem?
Thanks.