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 shared memory to exchange data between applications (processes)
CreateMutex
..msdn    Add comment     W32 Constants      Translate this page
Creates or opens a named or unnamed mutex object.
Code examples:
Using shared memory to exchange data between applications (processes)
Declaration:
HANDLE CreateMutex(
    LPSECURITY_ATTRIBUTES lpMutexAttributes,
    BOOL bInitialOwner,
    LPCTSTR lpName
);
FoxPro declaration:
DECLARE INTEGER CreateMutex IN kernel32;
    INTEGER lpMutexAttributes,;
    INTEGER bInitialOwner,;
    STRING  lpName
Parameters:
lpMutexAttributes
[in] Pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes. If lpMutexAttributes is NULL, the handle cannot be inherited.

bInitialOwner
[in] If this value is TRUE and the caller created the mutex, the calling thread obtains initial ownership of the mutex object.

lpName
[in] Pointer to a null-terminated string specifying the name of the mutex object. If lpName is NULL, the mutex object is created without a name.
Return value:
If the function succeeds, the return value is a handle to the newly created mutex object.
My comment:
If the mutex is a named mutex and the object existed before this function call, the return value is a handle to the existing object and GetLastError returns ERROR_ALREADY_EXISTS.

See also: ReleaseMutex, CloseHandle, CreateSemaphore, WaitForSingleObject.
Word Index links for the CreateMutex :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2005-10-28 12:42:48
Modified: 2005-10-28 12:46:09
Visited in last 7 days: 21
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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.82.79.109)
16 sec.Function: 'MAPISendDocuments'
32 sec.Function: 'CeMoveFile'
49 sec.Function: 'CharUpper'
1.1 min.Function: 'InitCommonControlsEx'
1.35 min.Function: 'NetApiBufferSize'
1.6 min.Function: 'OpenVirtualDisk'
1.88 min.Function: 'GdipCreateFontFamilyFromName'
2.17 min.Function: 'GetCompressedFileSize'
2.45 min.Function: 'GetFileTime'
2.73 min.Function: 'GdipDisposeImage'
Google
Advertise here!