ReactOS 0.4.16-dev-300-g2aadf2e
audiosrv.h File Reference
#include <winsvc.h>
Include dependency graph for audiosrv.h:

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 15 of file pnp_list_lock.c.

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

Referenced by CreateAudioDeviceList().

◆ KillAudioDeviceListLock()

VOID KillAudioDeviceListLock ( VOID  )

Definition at line 38 of file pnp_list_lock.c.

39{
42}
#define CloseHandle
Definition: compat.h:739

Referenced by CreateAudioDeviceList(), and DestroyAudioDeviceList().

◆ LockAudioDeviceList()

VOID LockAudioDeviceList ( VOID  )

Definition at line 45 of file pnp_list_lock.c.

46{
49}
#define assert(x)
Definition: debug.h:53
#define INFINITE
Definition: serial.h:102
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82

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

◆ UnlockAudioDeviceList()

VOID UnlockAudioDeviceList ( VOID  )

Definition at line 52 of file pnp_list_lock.c.

53{
56}
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
Definition: synch.c:618

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