ReactOS  0.4.15-dev-1018-g0695ecb
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
#define TAG_PORTCLASS
Definition: private.hpp:24
IMiniportWaveRTStream * PMINIPORTWAVERTSTREAM
Definition: portcls.h:1809
LONG NTSTATUS
Definition: precomp.h:26
IO_STATUS_BLOCK IoStatus
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()
Status
Definition: gdiplustypes.h:24
PIO_WORKITEM WorkItem
Definition: private.hpp:424
struct CLOSESTREAM_CONTEXT * PCLOSESTREAM_CONTEXT
#define IO_NO_INCREMENT
Definition: iotypes.h:570
return STATUS_SUCCESS
Definition: btrfs.c:3014
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Definition: fltkernel.h:1092
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:95
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PVOID * Descriptor
Definition: classpnp.h:1159

◆ 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
smooth NULL
Definition: ftsmooth.c:416
IPortPinWaveRT * PPORTPINWAVERT
Definition: interfaces.hpp:723
return STATUS_SUCCESS
Definition: btrfs.c:3014