Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.93 KB

WaitForSingleObject.md

File metadata and controls

57 lines (42 loc) · 1.93 KB

Home

Function name : WaitForSingleObject

Group: Synchronization - Library: kernel32


The WaitForSingleObject function returns when the specified object is in the signaled state or when the time-out interval elapses


Code examples:

Using the Semaphore object
Monitoring changes in a directory
Using an Event Object. Part B: running an application responding to events
Starting external program from VFP and waiting for its termination
Pocket PC: base class
Pocket PC: custom RAPI class for operating with the System Registry
Pocket PC: custom RAPI class for operating with files and folders on mobile device
PocketPC: custom RAPI class for executing routines on remote Windows CE device
Using Change Notification Objects to monitor changes to the printer or print server
How to prevent users from accessing the Windows Desktop and from switching to other applications
Using shared memory to exchange data between applications (processes)

Declaration:

DWORD WaitForSingleObject(
    HANDLE  hObject,	// handle of object to wait for
    DWORD  dwTimeout 	// time-out interval in milliseconds
   );  

FoxPro declaration:

DECLARE INTEGER WaitForSingleObject IN kernel32;
	INTEGER hHandle,;
	INTEGER dwMilliseconds
  

Parameters:

hObject Identifies the object

dwTimeout Specifies the time-out interval, in milliseconds


Return value:

If the function succeeds, the return value indicates the event that caused the function to return