ReactOS  0.4.14-dev-604-gcfdd483
beep.c File Reference
#include <ntddk.h>
#include <ntddbeep.h>
#include <debug.h>
Include dependency graph for beep.c:

Go to the source code of this file.

Classes

struct  _BEEP_DEVICE_EXTENSION
 

Macros

#define NDEBUG
 

Typedefs

typedef struct _BEEP_DEVICE_EXTENSION DEVICE_EXTENSION
 
typedef struct _BEEP_DEVICE_EXTENSIONPDEVICE_EXTENSION
 

Functions

VOID NTAPI BeepDPC (IN PKDPC Dpc, IN PDEVICE_OBJECT DeviceObject, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
 
NTSTATUS NTAPI BeepCreate (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI BeepClose (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
VOID NTAPI BeepCancel (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI BeepCleanup (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI BeepDeviceControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
VOID NTAPI BeepUnload (IN PDRIVER_OBJECT DriverObject)
 
VOID NTAPI BeepStartIo (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 

Variables

DRIVER_DISPATCH BeepCreate
 
DRIVER_DISPATCH BeepClose
 
DRIVER_CANCEL BeepCancel
 
DRIVER_DISPATCH BeepCleanup
 
DRIVER_DISPATCH BeepDeviceControl
 
DRIVER_UNLOAD BeepUnload
 
DRIVER_STARTIO BeepStartIo
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 15 of file beep.c.

Typedef Documentation

◆ DEVICE_EXTENSION

◆ PDEVICE_EXTENSION

Function Documentation

◆ BeepCancel()

VOID NTAPI BeepCancel ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 118 of file beep.c.

120 {
121  /* Check if this is the current request */
122  if (Irp == DeviceObject->CurrentIrp)
123  {
124  /* Clear it */
125  DeviceObject->CurrentIrp = NULL;
126 
127  /* Release the cancel lock and start the next packet */
128  IoReleaseCancelSpinLock(Irp->CancelIrql);
130  }
131  else
132  {
133  /* Otherwise, remove the packet from the queue and release the lock */
135  &Irp->Tail.Overlay.DeviceQueueEntry);
136  IoReleaseCancelSpinLock(Irp->CancelIrql);
137  }
138 
139  /* Complete the request */
140  Irp->IoStatus.Status = STATUS_CANCELLED;
141  Irp->IoStatus.Information = 0;
143 }
#define TRUE
Definition: types.h:120
_In_ PIRP Irp
Definition: csq.h:116
smooth NULL
Definition: ftsmooth.c:416
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_CANCELLED
Definition: udferr_usr.h:170
BOOLEAN NTAPI KeRemoveEntryDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue, IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry)
Definition: devqueue.c:348
VOID NTAPI IoReleaseCancelSpinLock(IN KIRQL Irql)
Definition: util.c:150
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
#define IO_NO_INCREMENT
Definition: iotypes.h:566
VOID NTAPI IoStartNextPacket(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN Cancelable)
Definition: device.c:1847

◆ BeepCleanup()

NTSTATUS NTAPI BeepCleanup ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 148 of file beep.c.

150 {
151  KIRQL OldIrql, CancelIrql;
153  PIRP CurrentIrp;
154 
155  /* Raise IRQL and acquire the cancel lock */
157  IoAcquireCancelSpinLock(&CancelIrql);
158 
159  /* Get the current IRP */
160  CurrentIrp = DeviceObject->CurrentIrp;
161  DeviceObject->CurrentIrp = NULL;
162  while (CurrentIrp)
163  {
164  /* Clear its cancel routine */
165  (VOID)IoSetCancelRoutine(CurrentIrp, NULL);
166 
167  /* Cancel the IRP */
168  CurrentIrp->IoStatus.Status = STATUS_CANCELLED;
169  CurrentIrp->IoStatus.Information = 0;
170 
171  /* Release the cancel lock and complete it */
172  IoReleaseCancelSpinLock(CancelIrql);
173  IoCompleteRequest(CurrentIrp, IO_NO_INCREMENT);
174 
175  /* Reacquire the lock and get the next queue packet */
176  IoAcquireCancelSpinLock(&CancelIrql);
177  Packet = KeRemoveDeviceQueue(&DeviceObject->DeviceQueue);
178  if (Packet)
179  {
180  /* Get the IRP */
181  CurrentIrp = CONTAINING_RECORD(Packet,
182  IRP,
183  Tail.Overlay.DeviceQueueEntry);
184  }
185  else
186  {
187  /* No more IRPs */
188  CurrentIrp = NULL;
189  }
190  }
191 
192  /* Release lock and go back to low IRQL */
193  IoReleaseCancelSpinLock(CancelIrql);
195 
196  /* Complete the IRP */
197  Irp->IoStatus.Status = STATUS_SUCCESS;
198  Irp->IoStatus.Information = 0;
200 
201  /* Stop and beep and return */
202  HalMakeBeep(0);
203  return STATUS_SUCCESS;
204 }
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
BOOLEAN NTAPI HalMakeBeep(IN ULONG Frequency)
Definition: beep.c:22
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1548
_In_ PIRP Irp
Definition: csq.h:116
VOID NTAPI IoAcquireCancelSpinLock(OUT PKIRQL Irql)
Definition: util.c:56
IRP
Definition: iotypes.h:2463
IoSetCancelRoutine(Irp, CancelRoutine)
UCHAR KIRQL
Definition: env_spec_w32.h:591
smooth NULL
Definition: ftsmooth.c:416
#define IoCompleteRequest
Definition: irp.c:1240
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
#define STATUS_CANCELLED
Definition: udferr_usr.h:170
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
#define VOID
Definition: acefi.h:82
VOID NTAPI IoReleaseCancelSpinLock(IN KIRQL Irql)
Definition: util.c:150
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
Definition: ketypes.h:566
PKDEVICE_QUEUE_ENTRY NTAPI KeRemoveDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue)
Definition: devqueue.c:153
#define IO_NO_INCREMENT
Definition: iotypes.h:566
return STATUS_SUCCESS
Definition: btrfs.c:2938

◆ BeepClose()

NTSTATUS NTAPI BeepClose ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 81 of file beep.c.

83 {
85 
86  /* Acquire the mutex and decrease reference count */
87  ExAcquireFastMutex(&DeviceExtension->Mutex);
88  if (!(--DeviceExtension->ReferenceCount))
89  {
90  /* Check for active timer */
91  if (DeviceExtension->TimerActive)
92  {
93  /* Cancel it */
94  if (KeCancelTimer(&DeviceExtension->Timer))
95  {
96  /* Mark it as cancelled */
97  InterlockedDecrement(&DeviceExtension->TimerActive);
98  }
99  }
100 
101  /* Page the driver */
102  MmUnlockPagableImageSection(DeviceExtension->SectionHandle);
103  }
104 
105  /* Release the lock */
106  ExReleaseFastMutex(&DeviceExtension->Mutex);
107 
108  /* Complete the request */
109  Irp->IoStatus.Status = STATUS_SUCCESS;
110  Irp->IoStatus.Information = 0;
112  return STATUS_SUCCESS;
113 }
_In_ PIRP Irp
Definition: csq.h:116
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
PVOID DeviceExtension
Definition: env_spec_w32.h:418
#define IoCompleteRequest
Definition: irp.c:1240
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
Definition: timerobj.c:206
#define InterlockedDecrement
Definition: armddk.h:52
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
FAST_MUTEX Mutex
Definition: beep.c:24
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
PVOID SectionHandle
Definition: beep.c:27
#define IO_NO_INCREMENT
Definition: iotypes.h:566
return STATUS_SUCCESS
Definition: btrfs.c:2938

◆ BeepCreate()

NTSTATUS NTAPI BeepCreate ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 55 of file beep.c.

57 {
59 
60  /* Acquire the mutex and increase reference count */
61  ExAcquireFastMutex(&DeviceExtension->Mutex);
62  if (++DeviceExtension->ReferenceCount == 1)
63  {
64  /* First reference, lock the data section */
65  DeviceExtension->SectionHandle = MmLockPagableDataSection(BeepCreate);
66  }
67 
68  /* Release it */
69  ExReleaseFastMutex(&DeviceExtension->Mutex);
70 
71  /* Complete the request */
72  Irp->IoStatus.Status = STATUS_SUCCESS;
73  Irp->IoStatus.Information = 0;
75  return STATUS_SUCCESS;
76 }
_In_ PIRP Irp
Definition: csq.h:116
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
PVOID DeviceExtension
Definition: env_spec_w32.h:418
#define IoCompleteRequest
Definition: irp.c:1240
DRIVER_DISPATCH BeepCreate
Definition: beep.c:52
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
FAST_MUTEX Mutex
Definition: beep.c:24
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
PVOID SectionHandle
Definition: beep.c:27
#define IO_NO_INCREMENT
Definition: iotypes.h:566
return STATUS_SUCCESS
Definition: btrfs.c:2938

◆ BeepDeviceControl()

NTSTATUS NTAPI BeepDeviceControl ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 209 of file beep.c.

211 {
212  PIO_STACK_LOCATION Stack;
213  PBEEP_SET_PARAMETERS BeepParam;
215 
216  /* Get the stack location and parameters */
218  BeepParam = (PBEEP_SET_PARAMETERS)Irp->AssociatedIrp.SystemBuffer;
219 
220  /* We only support one IOCTL */
221  if (Stack->Parameters.DeviceIoControl.IoControlCode != IOCTL_BEEP_SET)
222  {
223  /* Unsupported command */
225  }
226  else
227  {
228  /* Validate the input buffer length */
229  if (Stack->Parameters.DeviceIoControl.InputBufferLength <
230  sizeof(BEEP_SET_PARAMETERS))
231  {
232  /* Invalid buffer */
234  }
235  else if ((BeepParam->Frequency != 0) && !(BeepParam->Duration))
236  {
237  /* No duration, return immediately */
239  }
240  else
241  {
242  /* We'll queue this request */
244  }
245  }
246 
247  /* Set packet information */
248  Irp->IoStatus.Status = Status;
249  Irp->IoStatus.Information = 0;
250 
251  /* Check if we're completing or queuing a packet */
252  if (Status == STATUS_PENDING)
253  {
254  /* Start the queue */
257  }
258  else
259  {
260  /* Complete the request */
262  }
263 
264  /* Return */
265  return Status;
266 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI IoStartPacket(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PULONG Key, IN PDRIVER_CANCEL CancelFunction)
Definition: device.c:1876
smooth NULL
Definition: ftsmooth.c:416
#define IoCompleteRequest
Definition: irp.c:1240
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define STATUS_PENDING
Definition: ntstatus.h:82
DRIVER_CANCEL BeepCancel
Definition: beep.c:115
struct _BEEP_SET_PARAMETERS * PBEEP_SET_PARAMETERS
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
#define IO_NO_INCREMENT
Definition: iotypes.h:566
#define IOCTL_BEEP_SET
Definition: ntddbeep.h:31
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
return STATUS_SUCCESS
Definition: btrfs.c:2938
IoMarkIrpPending(Irp)

◆ BeepDPC()

VOID NTAPI BeepDPC ( IN PKDPC  Dpc,
IN PDEVICE_OBJECT  DeviceObject,
IN PVOID  SystemArgument1,
IN PVOID  SystemArgument2 
)

Definition at line 34 of file beep.c.

38 {
40 
44 
45  /* Stop the beep */
46  HalMakeBeep(0);
47 
48  /* Disable the timer */
49  InterlockedDecrement(&DeviceExtension->TimerActive);
50 }
BOOLEAN NTAPI HalMakeBeep(IN ULONG Frequency)
Definition: beep.c:22
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
PVOID DeviceExtension
Definition: env_spec_w32.h:418
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
_In_ LARGE_INTEGER _In_opt_ PKDPC Dpc
Definition: kefuncs.h:524
#define InterlockedDecrement
Definition: armddk.h:52
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560

Referenced by DriverEntry().

◆ BeepStartIo()

VOID NTAPI BeepStartIo ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 298 of file beep.c.

300 {
302  KIRQL CancelIrql;
303  PIO_STACK_LOCATION IoStack;
304  PBEEP_SET_PARAMETERS BeepParam;
307 
308  /* Acquire the cancel lock and make sure the IRP is valid */
309  IoAcquireCancelSpinLock(&CancelIrql);
310  if (!Irp)
311  {
312  /* It's not, release the lock and quit */
313  IoReleaseCancelSpinLock(CancelIrql);
314  return;
315  }
316 
317  /* Remove the cancel routine and release the lock */
319  IoReleaseCancelSpinLock(CancelIrql);
320 
321  /* Get the I/O Stack and make sure the request is valid */
322  BeepParam = (PBEEP_SET_PARAMETERS)Irp->AssociatedIrp.SystemBuffer;
324  if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_BEEP_SET)
325  {
326  /* Check if we have an active timer */
327  if (DeviceExtension->TimerActive)
328  {
329  /* Cancel it */
330  if (KeCancelTimer(&DeviceExtension->Timer))
331  {
332  /* Set the state */
333  InterlockedDecrement(&DeviceExtension->TimerActive);
334  }
335  }
336 
337  /* Make the beep */
338  if (HalMakeBeep(BeepParam->Frequency))
339  {
340  /* Beep successful, queue a DPC to stop it */
342  DueTime.QuadPart = BeepParam->Duration * -10000LL;
343  InterlockedIncrement(&DeviceExtension->TimerActive);
344  KeSetTimer(&DeviceExtension->Timer, DueTime, &DeviceObject->Dpc);
345  }
346  else
347  {
348  /* Beep has failed */
350  }
351  }
352  else
353  {
354  /* Invalid request */
356  }
357 
358  /* Complete the request and start the next packet */
359  Irp->IoStatus.Status = Status;
360  Irp->IoStatus.Information = 0;
363 }
#define TRUE
Definition: types.h:120
#define LL
Definition: tui.h:85
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
Definition: timerobj.c:281
BOOLEAN NTAPI HalMakeBeep(IN ULONG Frequency)
Definition: beep.c:22
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_In_ LARGE_INTEGER DueTime
Definition: kefuncs.h:524
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI IoAcquireCancelSpinLock(OUT PKIRQL Irql)
Definition: util.c:56
IoSetCancelRoutine(Irp, CancelRoutine)
UCHAR KIRQL
Definition: env_spec_w32.h:591
PVOID DeviceExtension
Definition: env_spec_w32.h:418
smooth NULL
Definition: ftsmooth.c:416
#define IoCompleteRequest
Definition: irp.c:1240
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
Definition: timerobj.c:206
#define InterlockedDecrement
Definition: armddk.h:52
#define VOID
Definition: acefi.h:82
struct _BEEP_SET_PARAMETERS * PBEEP_SET_PARAMETERS
VOID NTAPI IoReleaseCancelSpinLock(IN KIRQL Irql)
Definition: util.c:150
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
#define InterlockedIncrement
Definition: armddk.h:53
#define IO_NO_INCREMENT
Definition: iotypes.h:566
#define IOCTL_BEEP_SET
Definition: ntddbeep.h:31
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
return STATUS_SUCCESS
Definition: btrfs.c:2938
LONGLONG QuadPart
Definition: typedefs.h:112
VOID NTAPI IoStartNextPacket(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN Cancelable)
Definition: device.c:1847

◆ BeepUnload()

VOID NTAPI BeepUnload ( IN PDRIVER_OBJECT  DriverObject)

Definition at line 271 of file beep.c.

272 {
273  PDEVICE_EXTENSION DeviceExtension;
275 
276  /* Get DO and DE */
278  DeviceExtension = DeviceObject->DeviceExtension;
279 
280  /* Check if the timer is active */
281  if (DeviceExtension->TimerActive)
282  {
283  /* Cancel it */
284  if (KeCancelTimer(&DeviceExtension->Timer))
285  {
286  /* All done */
287  InterlockedDecrement(&DeviceExtension->TimerActive);
288  }
289  }
290 
291  /* Delete the object */
293 }
PVOID DeviceExtension
Definition: env_spec_w32.h:418
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
Definition: timerobj.c:206
#define InterlockedDecrement
Definition: armddk.h:52
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2169

◆ DriverEntry()

NTSTATUS NTAPI DriverEntry ( IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegistryPath 
)

Definition at line 367 of file beep.c.

369 {
370  PDEVICE_EXTENSION DeviceExtension;
372  UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Beep");
374 
376 
377  /* Create the device */
379  sizeof(DEVICE_EXTENSION),
380  &DeviceName,
382  0,
383  FALSE,
384  &DeviceObject);
385  if (!NT_SUCCESS(Status)) return Status;
386 
387  /* Make it use buffered I/O */
389 
390  /* Setup the Driver Object */
397 
398  /* Set up device extension */
399  DeviceExtension = DeviceObject->DeviceExtension;
400  DeviceExtension->ReferenceCount = 0;
401  DeviceExtension->TimerActive = FALSE;
403  KeInitializeTimer(&DeviceExtension->Timer);
404  ExInitializeFastMutex(&DeviceExtension->Mutex);
405 
406  /* Page the entire driver */
408  return STATUS_SUCCESS;
409 }
DRIVER_DISPATCH BeepClose
Definition: beep.c:78
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
Definition: iofuncs.h:2792
DRIVER_STARTIO BeepStartIo
Definition: beep.c:295
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
LONG NTSTATUS
Definition: precomp.h:26
WCHAR DeviceName[]
Definition: adapter.cpp:21
#define FILE_DEVICE_BEEP
Definition: winioctl.h:106
DRIVER_DISPATCH BeepDeviceControl
Definition: beep.c:206
NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
Definition: beep.c:367
PVOID DeviceExtension
Definition: env_spec_w32.h:418
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
Definition: timerobj.c:233
DRIVER_DISPATCH BeepCreate
Definition: beep.c:52
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define DO_BUFFERED_IO
Definition: env_spec_w32.h:394
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
PVOID NTAPI MmPageEntireDriver(IN PVOID AddressWithinSection)
Definition: sysldr.c:3370
IO_DPC_ROUTINE * PIO_DPC_ROUTINE
Definition: iotypes.h:2492
VOID NTAPI BeepDPC(IN PKDPC Dpc, IN PDEVICE_OBJECT DeviceObject, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: beep.c:34
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
static const WCHAR L[]
Definition: oid.c:1250
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2180
DRIVER_DISPATCH BeepCleanup
Definition: beep.c:145
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
FAST_MUTEX Mutex
Definition: beep.c:24
DRIVER_UNLOAD BeepUnload
Definition: beep.c:268
#define IRP_MJ_CLEANUP
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2181
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
PDRIVER_STARTIO DriverStartIo
Definition: iotypes.h:2179
return STATUS_SUCCESS
Definition: btrfs.c:2938
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14

Referenced by DriverEntry().

Variable Documentation

◆ BeepCancel

DRIVER_CANCEL BeepCancel

Definition at line 115 of file beep.c.

Referenced by BeepDeviceControl().

◆ BeepCleanup

DRIVER_DISPATCH BeepCleanup

Definition at line 145 of file beep.c.

Referenced by DriverEntry().

◆ BeepClose

DRIVER_DISPATCH BeepClose

Definition at line 78 of file beep.c.

Referenced by DriverEntry().

◆ BeepCreate

DRIVER_DISPATCH BeepCreate

Definition at line 52 of file beep.c.

Referenced by BeepCreate(), and DriverEntry().

◆ BeepDeviceControl

DRIVER_DISPATCH BeepDeviceControl

Definition at line 206 of file beep.c.

Referenced by DriverEntry().

◆ BeepStartIo

DRIVER_STARTIO BeepStartIo

Definition at line 295 of file beep.c.

Referenced by DriverEntry().

◆ BeepUnload

DRIVER_UNLOAD BeepUnload

Definition at line 268 of file beep.c.

Referenced by DriverEntry().