GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing learn.microsoft.com — WaitOnAddress function (synchapi.h) - Win32 apps Note Access to this page requires authorization. You can try signing in or changing directories. Access to this page requires authorization. You can try changing directories. WaitOnAddress function (synchapi.h)Waits for the value at the specified address to change. Syntax
Parameters
The address on which to wait. If the value at Address differs from the value at CompareAddress, the function returns immediately. If the values are the same, the function does not return until another thread in the same process signals that the value at Address has changed by calling WakeByAddressSingle or WakeByAddressAll or the timeout elapses, whichever comes first.
A pointer to the location of the previously observed value at Address. The function returns when the value at Address differs from the value at CompareAddress.
The size of the value, in bytes. This parameter can be
The number of milliseconds to wait before the operation times out. If this parameter is INFINITE, the thread waits indefinitely. Return value
RemarksMicrosoft Store app developers may need to obtain The WaitOnAddress function can be used by a thread to wait for a particular value to change from some undesired value to any other value. WaitOnAddress is more efficient than using the Sleep function inside a Any thread within the same process that changes the value at the address on which threads are waiting should call WakeByAddressSingle to wake a single waiting thread or WakeByAddressAll to wake all waiting threads. If WakeByAddressSingle is called, other waiting threads continue to wait. Note: WaitOnAddress is guaranteed to return when the address is signaled, but it is also allowed to return for other reasons. For this reason, after WaitOnAddress returns the caller should compare the new value with the original undesired value to confirm that the value has actually changed. For example, the following circumstances can result in waking the thread early:
ExamplesThe following example shows how to use WaitOnAddress.
Requirements
See alsoFeedbackWas this page helpful? NoAdditional resources
| ||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |