ReactOS 0.4.15-dev-6656-gbbb33a6
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
415
416 // free work item ctx
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}
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:81
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
Status
Definition: gdiplustypes.h:25
ULONG Release()
nsrefcnt Release()
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
@ KSSTATE_STOP
Definition: ks.h:1215
VOID FreeItem(IN PVOID Item)
Definition: misc.c:43
if(dx< 0)
Definition: linetemp.h:194
static IStream Stream
Definition: htmldoc.c:1115
#define IoCompleteRequest
Definition: irp.c:1240
IMiniportWaveRTStream * PMINIPORTWAVERTSTREAM
Definition: portcls.h:1865
struct CLOSESTREAM_CONTEXT * PCLOSESTREAM_CONTEXT
#define TAG_PORTCLASS
Definition: private.hpp:24
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
PIO_WORKITEM WorkItem
Definition: private.hpp:424
IO_STATUS_BLOCK IoStatus
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
#define IO_NO_INCREMENT
Definition: iotypes.h:598

◆ 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}
IPortPinWaveRT * PPORTPINWAVERT
Definition: interfaces.hpp:724
#define NonPagedPool
Definition: env_spec_w32.h:307
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158