Using Win32 functions in Visual FoxPro Image Gallery
Synchronization
..msdn
CreateEvent
CreateMutex
CreateSemaphore
CreateWaitableTimer
OpenEvent
OpenSemaphore
OpenWaitableTimer
ReleaseMutex
ReleaseSemaphore
ResetEvent
SetEvent
SetWaitableTimer
WaitForSingleObject
Code examples:
Using the Semaphore object
Using the Semaphore object to allow only one instance of VFP application running
CreateSemaphore
    Add comment     W32 Constants      Translate this page
The CreateSemaphore function creates a named or unnamed semaphore object
Code examples:
Using the Semaphore object
Using the Semaphore object to allow only one instance of VFP application running
Declaration:
HANDLE CreateSemaphore(
    LPSECURITY_ATTRIBUTES  lpSemaphoreAttrib, //security attrib. address
    LONG  lInitialCount,    //initial count 
    LONG  lMaximumCount,    //maximum count 
    LPCTSTR  lpName     //address of semaphore-object name  
   );
FoxPro declaration:
DECLARE INTEGER CreateSemaphore IN kernel32;
    STRING @ lpSemaphoreAttrib,;
    INTEGER  lInitialCount,;
    INTEGER  lMaximumCount,;
    STRING   lpName

Parameters:
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
Return value:
If the function succeeds, the return value is a handle of the semaphore object
Word Index links for the CreateSemaphore :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-12 12:00:00
Modified: 2001-11-26 16:01:58
Visited in last 7 days: 28
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.75.202)
4 sec.Function: 'DPtoLP'
8 sec.Function: 'CeGetTempPath'
12 sec.Function: 'GdipDeleteFontFamily'
17 sec.Function: 'CreateService'
23 sec.
Function group: 'Icon'
29 sec.Function: 'DeleteDC'
37 sec.Function: 'CeCreateDatabase'
45 sec.Function: 'CeRegCloseKey'
51 sec.
Function group: 'Time'
58 sec.Function: 'CeOpenDatabase'
Google
Advertise here!