ReactOS  0.4.14-dev-52-g6116262
helper.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel Streaming
4  * FILE: drivers/wdm/audio/legacy/stream/helper.c
5  * PURPOSE: irp helper routines
6  * PROGRAMMER: Johannes Anderwald
7  */
8 
9 
10 #include "stream.h"
11 
13 NTAPI
16  IN PIRP Irp,
18 {
19  if (Irp->PendingReturned != FALSE)
20  {
22  }
24 }
25 
26 
28 NTAPI
31  IN PIRP Irp)
32 {
33  KEVENT Event;
34  PSTREAM_DEVICE_EXTENSION DeviceExt;
36 
38 
39  /* initialize the notification event */
41 
43 
45 
46  /* now call the driver */
48  /* did the request complete yet */
49  if (Status == STATUS_PENDING)
50  {
51  /* not yet, lets wait a bit */
53  Status = Irp->IoStatus.Status;
54  }
55  return Status;
56 }
#define IN
Definition: typedefs.h:38
#define TRUE
Definition: types.h:120
#define STATUS_MORE_PROCESSING_REQUIRED
Definition: shellext.h:63
_In_ PIRP Irp
Definition: csq.h:116
LONG NTSTATUS
Definition: precomp.h:26
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
Definition: eventobj.c:159
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
FORCEINLINE VOID IoCopyCurrentIrpStackLocationToNext(_Inout_ PIRP Irp)
Definition: iofuncs.h:2820
NTSTATUS NTAPI ForwardIrpSynchronous(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: helper.c:29
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
PVOID DeviceExtension
Definition: env_spec_w32.h:418
smooth NULL
Definition: ftsmooth.c:416
#define STATUS_PENDING
Definition: ntstatus.h:82
struct STREAM_DEVICE_EXTENSION * PSTREAM_DEVICE_EXTENSION
NTSTATUS NTAPI CompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: helper.c:14
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define IO_NO_INCREMENT
Definition: iotypes.h:566
PDEVICE_OBJECT LowerDeviceObject
Definition: stream.h:27