ReactOS 0.4.15-dev-7834-g00c4b3d
sndsntry.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Base API Server DLL
4 * FILE: subsystems/win/basesrv/sndsntry.c
5 * PURPOSE: Sound Sentry Notifications
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include "basesrv.h"
12
13#define NDEBUG
14#include <debug.h>
15
16/* GLOBALS ********************************************************************/
17
20
22
23/* PRIVATE FUNCTIONS **********************************************************/
24
25BOOL
28{
29 /* In case the function can't be found/is unimplemented */
30 return FALSE;
31}
32
33BOOL
36{
37 UNICODE_STRING DllString = RTL_CONSTANT_STRING(L"winsrv");
38 STRING FuncString = RTL_CONSTANT_STRING("_UserSoundSentry");
39 HANDLE DllHandle;
41 PUSER_SOUND_SENTRY NewSoundSentry = FailSoundSentry;
42
43 /* Load winsrv manually */
44 Status = LdrGetDllHandle(NULL, NULL, &DllString, &DllHandle);
45 if (NT_SUCCESS(Status))
46 {
47 /* If it was found, get SoundSentry export */
49 &FuncString,
50 0,
51 (PVOID*)&NewSoundSentry);
52 }
53
54 /* Set it as the callback for the future, and call it */
55 _UserSoundSentry = NewSoundSentry;
56 return _UserSoundSentry();
57}
58
59/* PUBLIC SERVER APIS *********************************************************/
60
61CSR_API(BaseSrvSoundSentryNotification)
62{
63 /* Call the API and see if it succeeds */
65}
66
67/* EOF */
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
#define CSR_API(n)
Definition: csrsrv.h:176
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned int BOOL
Definition: ntddk_ex.h:94
std::wstring STRING
Definition: fontsub.cpp:33
Status
Definition: gdiplustypes.h:25
NTSTATUS NTAPI LdrGetDllHandle(_In_opt_ PWSTR DllPath, _In_opt_ PULONG DllCharacteristics, _In_ PUNICODE_STRING DllName, _Out_ PVOID *DllHandle)
Definition: ldrapi.c:810
NTSTATUS NTAPI LdrGetProcedureAddress(_In_ PVOID BaseAddress, _In_opt_ _When_(Ordinal==0, _Notnull_) PANSI_STRING Name, _In_opt_ _When_(Name==NULL, _In_range_(>, 0)) ULONG Ordinal, _Out_ PVOID *ProcedureAddress)
Definition: ldrapi.c:829
#define BOOL
Definition: nt_native.h:43
#define L(x)
Definition: ntvdm.h:50
#define STATUS_SUCCESS
Definition: shellext.h:65
BOOL NTAPI FirstSoundSentry(VOID)
Definition: sndsntry.c:35
BOOL NTAPI FailSoundSentry(VOID)
Definition: sndsntry.c:27
BOOL(NTAPI * PUSER_SOUND_SENTRY)(VOID)
Definition: sndsntry.c:18
static PUSER_SOUND_SENTRY _UserSoundSentry
Definition: sndsntry.c:21
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define NTAPI
Definition: typedefs.h:36
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145