ReactOS  0.4.14-dev-55-g2da92ac
audiosrv.h File Reference
#include <winsvc.h>
Include dependency graph for audiosrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PnP_AudioDevice
 
struct  PnP_AudioHeader
 

Macros

#define SERVICE_NAME   L"AudioSrv"
 
#define AUDIO_LIST_LOCK_NAME   L"Global\\AudioDeviceListLock"
 
#define AUDIO_LIST_NAME   L"Global\\AudioDeviceList"
 
#define AUDIO_LIST_MAX_SIZE   65536
 
#define WideStringSize(str)   ( (lstrlenW(str) + 1) * sizeof(WCHAR) )
 

Functions

BOOL InitializeAudioDeviceListLock (VOID)
 
VOID KillAudioDeviceListLock (VOID)
 
VOID LockAudioDeviceList (VOID)
 
VOID UnlockAudioDeviceList (VOID)
 

Macro Definition Documentation

◆ AUDIO_LIST_LOCK_NAME

#define AUDIO_LIST_LOCK_NAME   L"Global\\AudioDeviceListLock"

Definition at line 19 of file audiosrv.h.

◆ AUDIO_LIST_MAX_SIZE

#define AUDIO_LIST_MAX_SIZE   65536

Definition at line 25 of file audiosrv.h.

◆ AUDIO_LIST_NAME

#define AUDIO_LIST_NAME   L"Global\\AudioDeviceList"

Definition at line 22 of file audiosrv.h.

◆ SERVICE_NAME

#define SERVICE_NAME   L"AudioSrv"

Definition at line 15 of file audiosrv.h.

◆ WideStringSize

#define WideStringSize (   str)    ( (lstrlenW(str) + 1) * sizeof(WCHAR) )

Definition at line 45 of file audiosrv.h.

Function Documentation

◆ InitializeAudioDeviceListLock()

BOOL InitializeAudioDeviceListLock ( VOID  )

Definition at line 16 of file pnp_list_lock.c.

17 {
18  /* The security stuff is to make sure the mutex can be grabbed by
19  other processes - is this the best idea though ??? */
20 
21  SECURITY_DESCRIPTOR security_descriptor;
23 
25  SetSecurityDescriptorDacl(&security_descriptor, TRUE, 0, FALSE);
26 
27  security.nLength = sizeof(SECURITY_ATTRIBUTES);
28  security.lpSecurityDescriptor = &security_descriptor;
29  security.bInheritHandle = FALSE;
30 
32  FALSE,
34 
35  return (audio_device_list_lock != NULL);
36 }
#define TRUE
Definition: types.h:120
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
Definition: security.c:808
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416
#define AUDIO_LIST_LOCK_NAME
Definition: audiosrv.h:19
#define CreateMutex
Definition: winbase.h:3573
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
Definition: sec.c:262
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES

Referenced by CreateAudioDeviceList().

◆ KillAudioDeviceListLock()

VOID KillAudioDeviceListLock ( VOID  )

Definition at line 39 of file pnp_list_lock.c.

40 {
43 }
#define CloseHandle
Definition: compat.h:398
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416

Referenced by CreateAudioDeviceList(), and DestroyAudioDeviceList().

◆ LockAudioDeviceList()

VOID LockAudioDeviceList ( VOID  )

Definition at line 46 of file pnp_list_lock.c.

47 {
50 }
#define assert(x)
Definition: debug.h:53
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416
#define INFINITE
Definition: serial.h:102

Referenced by AppendAudioDeviceToList(), CreateAudioDeviceList(), and DestroyAudioDeviceList().

◆ UnlockAudioDeviceList()

VOID UnlockAudioDeviceList ( VOID  )

Definition at line 53 of file pnp_list_lock.c.

54 {
57 }
#define assert(x)
Definition: debug.h:53
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
Definition: synch.c:618

Referenced by AppendAudioDeviceToList(), CreateAudioDeviceList(), and DestroyAudioDeviceList().