Smart Device Functions:
Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than coredll, prefix the name with the module name and a period.
coredll is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for WaitForMultipleObjects in other DLLs exists, click on Find References to the right.
[DllImport("coredll.dll", EntryPoint = "WaitForMultipleObjects", SetLastError = true)]
Declare Function WaitForMultipleObjects Lib "coredll.dll" (ByVal nCount As Integer, ByVal lpHandles() As IntPtr, ByVal fWaitAll As Boolean, ByVal dwMilliseconds As Integer) As Integer
Alternative Managed API:
Do you know one? Please contribute it!
nCount: Specifies the number of object handles in the array pointed to by lpHandles. The maximum number of object handles is MAXIMUM_WAIT_OBJECTS.
lpHandles: Pointer to an array of object handles. For a list of the object types whose handles can be specified, see the Remarks section. The array can contain handles of objects of different types.
fWaitAll: Specifies the wait type. This parameter must be set to FALSE. This causes function to return when the state of any one of the objects set to is signaled. The return value indicates the object whose state caused the function to return.
dwMilliseconds: Specifies the time-out interval in milliseconds. The function returns if the interval elapses, even if the conditions specified by the bWaitAll parameter are not met. If dwMilliseconds is zero, the function tests the states of the specified objects and returns immediately. If dwMilliseconds is INFINITE, the function's time-out interval never elapses.
If the function succeeds, the return value indicates the event that caused the function to return. The following table shows possible values.
WAIT_OBJECT_0 to (WAIT_OBJECT_0 + nCount –1): the return value minus WAIT_OBJECT_0 indicates the lpHandles array index of the object that satisfied the wait. If more than one object became signaled during the call, this is the array index of the signaled object with the smallest index value of all the signaled objects.
WAIT_TIMEOUT : the time-out interval elapsed and the condition specified by the fWaitAll parameter is not satisfied.
WAIT_FAILED indicates failure. To get extended error information, call GetLastError.
Tips & Tricks:
The Handle property of .NET EventWaitHandle objects are pseudo-handles, and cannot be used with this P/Invoke function. You can only use handles obtained from the CreateEvent P/Invoke function.
IntPtr hNamedEvent1 = CreateEvent(IntPtr.Zero, false, false, "namedEvent1");
GetLastError- retrieves the last system error.
1/13/2012 10:04:10 AM - -220.127.116.11
Creates a new event handler.
2/6/2012 6:52:40 PM - -18.104.22.168
Please edit this page!
Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).