G
Guest
Can EventWaitHandle in OpenNetcf replace ManualResetEvent.WaitOne(
int millisecondsTimeout,bool exitContext)?
Thanks.
int millisecondsTimeout,bool exitContext)?
Thanks.
Sergey Bogdanov said:Yes, it can.
EventWaitHandle ewh = new EventWaitHandle(false,
EventResetMode.ManualReset); // equals to ManualResetEvent
--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com
John said:Can EventWaitHandle in OpenNetcf replace ManualResetEvent.WaitOne(
int millisecondsTimeout,bool exitContext)?
Thanks.
John Olbert said:One other question if possible. Is there a Netcf1.0 replacement for the
WaitAny() method below. I have searched the OpenNetcf. Also I found the
C++
function in Ce called "int WaitForMultipleObjects(uint nCount, IntPtr[]
lpHandles, Int32 fWaitAll, uint dwMilliseconds);" which could be used to
construct the needed function. Unfortunately the lpHandles are not the
handles returned by ManualResetEvent.Handle. The WaitForMultipleObjects()
returns an error. The GetLastError() indicates invalid handle. Others on
this
newsgroup have indicated that the ManualResetEvent.Handle is a
pseudo-handle.
ManualResetEvent [] commands = { channelEvent, killEvent };
Int32 eventThatFired = WaitHandle.WaitAny(commands);
Any help would be appreciated.
--
John Olbert
Sergey Bogdanov said:Yes, it can.
EventWaitHandle ewh = new EventWaitHandle(false,
EventResetMode.ManualReset); // equals to ManualResetEvent
--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com
John said:Can EventWaitHandle in OpenNetcf replace ManualResetEvent.WaitOne(
int millisecondsTimeout,bool exitContext)?
Thanks.