ReactOS  0.4.15-dev-3187-ge372f2b
pin_wavert.cpp File Reference
#include "private.hpp"
#include <debug.h>
Include dependency graph for pin_wavert.cpp:

Go to the source code of this file.

Classes

class  CPortPinWaveRT
 
struct  SETSTREAM_CONTEXT
 

Macros

#define NDEBUG
 

Typedefs

typedef struct SETSTREAM_CONTEXTPSETSTREAM_CONTEXT
 

Functions

VOID NTAPI CloseStreamRoutine (IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
 
NTSTATUS NewPortPinWaveRT (OUT IPortPinWaveRT **OutPin)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file pin_wavert.cpp.

Typedef Documentation

◆ PSETSTREAM_CONTEXT

Function Documentation

◆ CloseStreamRoutine()

VOID NTAPI CloseStreamRoutine ( IN PDEVICE_OBJECT  DeviceObject,
IN PVOID  Context 
)

Definition at line 382 of file pin_wavert.cpp.

385 {
388  ISubdevice *ISubDevice;
392 
393  This = (CPortPinWaveRT*)Ctx->Pin;
394 
395  if (This->m_Stream)
396  {
397  if (This->m_State != KSSTATE_STOP)
398  {
399  This->m_Stream->SetState(KSSTATE_STOP);
401  }
402  }
403 
404  Status = This->m_Port->QueryInterface(IID_ISubdevice, (PVOID*)&ISubDevice);
405  if (NT_SUCCESS(Status))
406  {
407  Status = ISubDevice->GetDescriptor(&Descriptor);
408  if (NT_SUCCESS(Status))
409  {
410  Descriptor->Factory.Instances[This->m_ConnectDetails->PinId].CurrentPinInstanceCount--;
411  }
412  ISubDevice->Release();
413  }
414 
415  if (This->m_Format)
416  {
417  FreeItem(This->m_Format, TAG_PORTCLASS);
418  This->m_Format = NULL;
419  }
420 
421  if (This->m_IrpQueue)
422  {
423  This->m_IrpQueue->Release();
424  }
425 
426  // complete the irp
427  Ctx->Irp->IoStatus.Information = 0;
430 
431  // free the work item
432  IoFreeWorkItem(Ctx->WorkItem);
433 
434  // free work item ctx
435  FreeItem(Ctx, TAG_PORTCLASS);
436 
437  if (This->m_Stream)
438  {
439  Stream = This->m_Stream;
440  This->m_Stream = NULL;
441  DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
442  Stream->Release();
443  }
444 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:339
#define TAG_PORTCLASS
Definition: private.hpp:24
IMiniportWaveRTStream * PMINIPORTWAVERTSTREAM
Definition: portcls.h:1809
LONG NTSTATUS
Definition: precomp.h:26
IO_STATUS_BLOCK IoStatus
if(dx==0 &&dy==0)
Definition: linetemp.h:174
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
VOID FreeItem(IN PVOID Item)
Definition: misc.c:43
#define IoCompleteRequest
Definition: irp.c:1240
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
nsrefcnt Release()
PIO_WORKITEM WorkItem
Definition: private.hpp:424
#define NULL
Definition: types.h:112
struct CLOSESTREAM_CONTEXT * PCLOSESTREAM_CONTEXT
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Definition: fltkernel.h:1092
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:96

◆ NewPortPinWaveRT()

NTSTATUS NewPortPinWaveRT ( OUT IPortPinWaveRT **  OutPin)

Definition at line 694 of file pin_wavert.cpp.

696 {
698 
700  if (!This)
702 
703  This->AddRef();
704 
705  // store result
706  *OutPin = (PPORTPINWAVERT)This;
707 
708  return STATUS_SUCCESS;
709 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define TAG_PORTCLASS
Definition: private.hpp:24
#define NULL
Definition: types.h:112
IPortPinWaveRT * PPORTPINWAVERT
Definition: interfaces.hpp:723
#define STATUS_SUCCESS
Definition: shellext.h:65