ReactOS  0.4.15-dev-4570-g4f8bbd1
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 364 of file pin_wavert.cpp.

367 {
370  ISubdevice *ISubDevice;
374 
375  This = (CPortPinWaveRT*)Ctx->Pin;
376 
377  if (This->m_Stream)
378  {
379  if (This->m_State != KSSTATE_STOP)
380  {
381  This->m_Stream->SetState(KSSTATE_STOP);
383  }
384  }
385 
386  Status = This->m_Port->QueryInterface(IID_ISubdevice, (PVOID*)&ISubDevice);
387  if (NT_SUCCESS(Status))
388  {
389  Status = ISubDevice->GetDescriptor(&Descriptor);
390  if (NT_SUCCESS(Status))
391  {
392  Descriptor->Factory.Instances[This->m_ConnectDetails->PinId].CurrentPinInstanceCount--;
393  }
394  ISubDevice->Release();
395  }
396 
397  if (This->m_Format)
398  {
399  FreeItem(This->m_Format, TAG_PORTCLASS);
400  This->m_Format = NULL;
401  }
402 
403  if (This->m_IrpQueue)
404  {
405  This->m_IrpQueue->Release();
406  }
407 
408  // complete the irp
409  Ctx->Irp->IoStatus.Information = 0;
412 
413  // free the work item
414  IoFreeWorkItem(Ctx->WorkItem);
415 
416  // free work item ctx
417  FreeItem(Ctx, TAG_PORTCLASS);
418 
419  if (This->m_Stream)
420  {
421  Stream = This->m_Stream;
422  This->m_Stream = NULL;
423  DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
424  Stream->Release();
425  }
426 }
#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:1863
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:81

◆ NewPortPinWaveRT()

NTSTATUS NewPortPinWaveRT ( OUT IPortPinWaveRT **  OutPin)

Definition at line 676 of file pin_wavert.cpp.

678 {
680 
682  if (!This)
684 
685  This->AddRef();
686 
687  // store result
688  *OutPin = (PPORTPINWAVERT)This;
689 
690  return STATUS_SUCCESS;
691 }
#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:722
#define STATUS_SUCCESS
Definition: shellext.h:65