ReactOS  0.4.13-dev-544-gede3fdd
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 374 of file pin_wavert.cpp.

377 {
380  ISubdevice *ISubDevice;
384 
385  This = (CPortPinWaveRT*)Ctx->Pin;
386 
387  if (This->m_Stream)
388  {
389  if (This->m_State != KSSTATE_STOP)
390  {
391  This->m_Stream->SetState(KSSTATE_STOP);
393  }
394  }
395 
396  Status = This->m_Port->QueryInterface(IID_ISubdevice, (PVOID*)&ISubDevice);
397  if (NT_SUCCESS(Status))
398  {
399  Status = ISubDevice->GetDescriptor(&Descriptor);
400  if (NT_SUCCESS(Status))
401  {
402  Descriptor->Factory.Instances[This->m_ConnectDetails->PinId].CurrentPinInstanceCount--;
403  }
404  ISubDevice->Release();
405  }
406 
407  if (This->m_Format)
408  {
409  FreeItem(This->m_Format, TAG_PORTCLASS);
410  This->m_Format = NULL;
411  }
412 
413  if (This->m_IrpQueue)
414  {
415  This->m_IrpQueue->Release();
416  }
417 
418  // complete the irp
419  Ctx->Irp->IoStatus.Information = 0;
420  Ctx->Irp->IoStatus.Status = STATUS_SUCCESS;
422 
423  // free the work item
424  IoFreeWorkItem(Ctx->WorkItem);
425 
426  // free work item ctx
427  FreeItem(Ctx, TAG_PORTCLASS);
428 
429  if (This->m_Stream)
430  {
431  Stream = This->m_Stream;
432  This->m_Stream = NULL;
433  DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
434  Stream->Release();
435  }
436 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define TAG_PORTCLASS
Definition: private.hpp:24
IMiniportWaveRTStream * PMINIPORTWAVERTSTREAM
Definition: portcls.h:1809
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
VOID FreeItem(IN PVOID Item)
Definition: misc.c:43
smooth NULL
Definition: ftsmooth.c:416
#define IoCompleteRequest
Definition: irp.c:1240
void DPRINT(...)
Definition: polytest.cpp:61
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
nsrefcnt Release()
PIO_WORKITEM WorkItem
Definition: private.hpp:417
Status
Definition: gdiplustypes.h:24
struct CLOSESTREAM_CONTEXT * PCLOSESTREAM_CONTEXT
#define IO_NO_INCREMENT
Definition: iotypes.h:565
return STATUS_SUCCESS
Definition: btrfs.c:2777
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Definition: fltkernel.h:1092
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:99
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966

◆ NewPortPinWaveRT()

NTSTATUS NewPortPinWaveRT ( OUT IPortPinWaveRT **  OutPin)

Definition at line 686 of file pin_wavert.cpp.

688 {
690 
692  if (!This)
694 
695  This->AddRef();
696 
697  // store result
698  *OutPin = (PPORTPINWAVERT)This;
699 
700  return STATUS_SUCCESS;
701 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define TAG_PORTCLASS
Definition: private.hpp:24
smooth NULL
Definition: ftsmooth.c:416
IPortPinWaveRT * PPORTPINWAVERT
Definition: interfaces.hpp:723
return STATUS_SUCCESS
Definition: btrfs.c:2777