ICMP
Defines | Functions
IcmpMutex.h File Reference

ICMP API: mutex implementation. More...

#include <windows.h>

Go to the source code of this file.

Defines

#define ICMP_MUTEX_NAME   "VERAX_ICMP_MUTEX"
 The name of mutex used by this library.
#define ICMP_MUTEX_RIGHTS   "D:(A;NP;0x001f0001;;;WD)"
 Security descriptor string for mutex creation.

Functions

HANDLE IcmpCreateMutex (void)
 Create mutex.
BOOL IcmpCloseMutex (HANDLE handle)
 Close mutex created by IcmpCreateMutex() function.
BOOL IcmpLockMutex (HANDLE handle)
 Obtain lock access on mutex.
BOOL IcmpUnlockMutex (HANDLE handle)
 Release lock to mutex object.

Detailed Description

ICMP API: mutex implementation.

File contains functions creating/releasing mutex with rights granted fro everyone. Such mutex may be used by all processes on computer.


Function Documentation

BOOL IcmpCloseMutex ( HANDLE  handle)

Close mutex created by IcmpCreateMutex() function.

Parameters:
handlemutex handle
Returns:
TRUE on success or FALSE on failure
Remarks:
HANDLE IcmpCreateMutex ( void  )

Create mutex.

Function creates or opens named mutex object. If new mutex is created it has assigned public name ICMP_MUTEX_NAME and proper access rights that allows anybody open the mutex. In order to release resources allocated by this function the IcmpCloseMutex() must be executed.

Returns:
handle to mutex object
BOOL IcmpLockMutex ( HANDLE  handle)

Obtain lock access on mutex.

Parameters:
handlethe handle to mutex object
Returns:
TRUE on success or FALSE on failure
BOOL IcmpUnlockMutex ( HANDLE  handle)

Release lock to mutex object.

Parameters:
handlethe handle to mutex object
Returns:
TRUE on success or FALSE on failure
 All Classes Files Functions Variables Defines