L
Lee Chapman
Hi,
I'm creating a ManualResetEvent in one AppDomain and then passing it
to a second AppDomain. (WaitHandle derives from MarshalByRefObject.)
If I call WaitOne() on my wait handle's remoting proxy, it works just
fine. If I pass the proxy to WaitHandle.WaitAny(), however, I get an
ArgumentNullException (see below).
The ManualResetEvent is obviously remoting okay because WaitOne()
works. Does anyone know why I can't seemt to use the same object
reference in a call to WaitHandle.WaitAny()?
Thanks,
- Lee
System.ArgumentNullException: Value cannot be null.
Parameter name: info
at
System.IntPtr.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo
info, StreamingContext context)
at System.Threading.WaitHandle.WaitMultiple(WaitHandle[]
waitHandles, Int32 millisecondsTimeout, Boolean exitContext, Boolean
WaitAll)
at System.Threading.WaitHandle.WaitAny(WaitHandle[] waitHandles,
Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitAny(WaitHandle[] waitHandles)
at App.Smtp.RelayThread.Run(EventWaitHandle shutdownEvent) in
RelayThread.cs:line 43
at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)
I'm creating a ManualResetEvent in one AppDomain and then passing it
to a second AppDomain. (WaitHandle derives from MarshalByRefObject.)
If I call WaitOne() on my wait handle's remoting proxy, it works just
fine. If I pass the proxy to WaitHandle.WaitAny(), however, I get an
ArgumentNullException (see below).
The ManualResetEvent is obviously remoting okay because WaitOne()
works. Does anyone know why I can't seemt to use the same object
reference in a call to WaitHandle.WaitAny()?
Thanks,
- Lee
System.ArgumentNullException: Value cannot be null.
Parameter name: info
at
System.IntPtr.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo
info, StreamingContext context)
at System.Threading.WaitHandle.WaitMultiple(WaitHandle[]
waitHandles, Int32 millisecondsTimeout, Boolean exitContext, Boolean
WaitAll)
at System.Threading.WaitHandle.WaitAny(WaitHandle[] waitHandles,
Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitAny(WaitHandle[] waitHandles)
at App.Smtp.RelayThread.Run(EventWaitHandle shutdownEvent) in
RelayThread.cs:line 43
at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)