Group: Synchronization - Library: kernel32
Using the Semaphore object
Using the Semaphore object to allow only one instance of VFP application running
HANDLE CreateSemaphore(
LPSECURITY_ATTRIBUTES lpSemaphoreAttrib, //security attrib. address
LONG lInitialCount, //initial count
LONG lMaximumCount, //maximum count
LPCTSTR lpName //address of semaphore-object name
); DECLARE INTEGER CreateSemaphore IN kernel32;
STRING @ lpSemaphoreAttrib,;
INTEGER lInitialCount,;
INTEGER lMaximumCount,;
STRING lpName
lpSemaphoreAttributes Points to a SECURITY_ATTRIBUTES structure
lInitialCount Specifies an initial count for the semaphore object
lMaximumCount Specifies the maximum count for the semaphore object
lpName Points to a null-terminated string specifying the name of the semaphore object
If the function succeeds, the return value is a handle of the semaphore object
Home