ReactOS 0.4.16-dev-91-g764881a
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 11 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 359 of file pin_wavert.cpp.

362{
365 ISubdevice *ISubDevice;
369
370 This = (CPortPinWaveRT*)Ctx->Pin;
371
372 if (This->m_Stream)
373 {
374 if (This->m_State != KSSTATE_STOP)
375 {
376 This->m_Stream->SetState(KSSTATE_STOP);
378 }
379 }
380
381 Status = This->m_Port->QueryInterface(IID_ISubdevice, (PVOID*)&ISubDevice);
382 if (NT_SUCCESS(Status))
383 {
384 Status = ISubDevice->GetDescriptor(&Descriptor);
385 if (NT_SUCCESS(Status))
386 {
387 Descriptor->Factory.Instances[This->m_ConnectDetails->PinId].CurrentPinInstanceCount--;
388 }
389 ISubDevice->Release();
390 }
391
392 if (This->m_Format)
393 {
394 FreeItem(This->m_Format, TAG_PORTCLASS);
395 This->m_Format = NULL;
396 }
397
398 if (This->m_IrpQueue)
399 {
400 This->m_IrpQueue->Release();
401 }
402
403 // complete the irp
404 Ctx->Irp->IoStatus.Information = 0;
407
408 // free the work item
410
411 // free work item ctx
413
414 if (This->m_Stream)
415 {
416 Stream = This->m_Stream;
417 This->m_Stream = NULL;
418 DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
419 Stream->Release();
420 }
421}
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#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:37
if(dx< 0)
Definition: linetemp.h:194
#define KeStallExecutionProcessor(MicroSeconds)
Definition: precomp.h:27
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:73
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 670 of file pin_wavert.cpp.

672{
674
676 if (!This)
678
679 This->AddRef();
680
681 // store result
682 *OutPin = (PPORTPINWAVERT)This;
683
684 return STATUS_SUCCESS;
685}
IPortPinWaveRT * PPORTPINWAVERT
Definition: interfaces.hpp:724
#define NonPagedPool
Definition: env_spec_w32.h:307
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158