ReactOS  0.4.14-dev-49-gfb4591c
CPortDMus Class Reference
Inheritance diagram for CPortDMus:
Collaboration diagram for CPortDMus:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
 CPortDMus (IUnknown *OuterUnknown)
 
virtual ~CPortDMus ()
 

Public Attributes

 IMP_IPortDMus
 
 IMP_ISubdevice
 

Protected Attributes

BOOL m_bInitialized
 
IMiniportDMus * m_pMiniport
 
IMiniportMidi * m_pMiniportMidi
 
DEVICE_OBJECTm_pDeviceObject
 
PSERVICEGROUP m_ServiceGroup
 
PPINCOUNT m_pPinCount
 
PPOWERNOTIFY m_pPowerNotify
 
PPORTFILTERDMUS m_Filter
 
PPCFILTER_DESCRIPTOR m_pDescriptor
 
PSUBDEVICE_DESCRIPTOR m_SubDeviceDescriptor
 
LONG m_Ref
 

Friends

VOID GetDMusMiniport (IN IPortDMus *iface, IN PMINIPORTDMUS *Miniport, IN PMINIPORTMIDI *MidiMiniport)
 

Detailed Description

Definition at line 17 of file port_dmus.cpp.

Constructor & Destructor Documentation

◆ CPortDMus()

CPortDMus::CPortDMus ( IUnknown OuterUnknown)
inline

Definition at line 41 of file port_dmus.cpp.

41 {}

◆ ~CPortDMus()

virtual CPortDMus::~CPortDMus ( )
inlinevirtual

Definition at line 42 of file port_dmus.cpp.

42 {}

Member Function Documentation

◆ QueryInterface()

NTSTATUS NTAPI CPortDMus::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 108 of file port_dmus.cpp.

111 {
113 
114  if (IsEqualGUIDAligned(refiid, IID_IPortDMus) ||
115  IsEqualGUIDAligned(refiid, IID_IPortMidi) ||
116  IsEqualGUIDAligned(refiid, IID_IPort) ||
118  {
119  *Output = PVOID(PUNKNOWN((IPortDMus*)this));
120  PUNKNOWN(*Output)->AddRef();
121  return STATUS_SUCCESS;
122  }
123  else if (IsEqualGUIDAligned(refiid, IID_ISubdevice))
124  {
125  *Output = PVOID(PSUBDEVICE(this));
126  PUNKNOWN(*Output)->AddRef();
127  return STATUS_SUCCESS;
128  }
129  else if (IsEqualGUIDAligned(refiid, IID_IDrmPort) ||
130  IsEqualGUIDAligned(refiid, IID_IDrmPort2))
131  {
132  return NewIDrmPort((PDRMPORT2*)Output);
133  }
134  else if (IsEqualGUIDAligned(refiid, IID_IPortClsVersion))
135  {
137  }
138  else if (IsEqualGUIDAligned(refiid, IID_IUnregisterSubdevice))
139  {
141  }
142  else if (IsEqualGUIDAligned(refiid, IID_IUnregisterPhysicalConnection))
143  {
145  }
146 
148  {
149  DPRINT("IPortMidi_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
151  }
152  return STATUS_UNSUCCESSFUL;
153 }
static PWSTR GuidString
Definition: apphelp.c:91
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
IUnregisterSubdevice * PUNREGISTERSUBDEVICE
Definition: portcls.h:633
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:233
void DPRINT(...)
Definition: polytest.cpp:61
void * PVOID
Definition: retypes.h:9
IUnregisterPhysicalConnection * PUNREGISTERPHYSICALCONNECTION
Definition: portcls.h:675
IDrmPort2 * PDRMPORT2
Definition: portcls.h:2172
const GUID IID_IUnknown
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
ULONG AddRef()
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
Definition: arc.h:85
NTSTATUS NTAPI NewIUnregisterSubdevice(OUT PUNREGISTERSUBDEVICE *OutDevice)
Definition: unregister.cpp:143
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
ISubdevice * PSUBDEVICE
Definition: interfaces.hpp:305
NTSTATUS NewPortClsVersion(OUT PPORTCLSVERSION *OutVersion)
Definition: version.cpp:93
NTSTATUS NTAPI NewIUnregisterPhysicalConnection(OUT PUNREGISTERPHYSICALCONNECTION *OutConnection)
Definition: connection.cpp:148
NTSTATUS NewIDrmPort(OUT PDRMPORT2 *OutPort)
Definition: drm_port.cpp:145
return STATUS_SUCCESS
Definition: btrfs.c:2966
IPortClsVersion * PPORTCLSVERSION
Definition: portcls.h:2209

◆ STDMETHODIMP_() [1/2]

CPortDMus::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 23 of file port_dmus.cpp.

24  {
26  return m_Ref;
27  }
LONG m_Ref
Definition: port_dmus.cpp:58
#define InterlockedIncrement
Definition: armddk.h:53

◆ STDMETHODIMP_() [2/2]

CPortDMus::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 28 of file port_dmus.cpp.

29  {
31 
32  if (!m_Ref)
33  {
34  delete this;
35  return 0;
36  }
37  return m_Ref;
38  }
#define InterlockedDecrement
Definition: armddk.h:52
LONG m_Ref
Definition: port_dmus.cpp:58

Friends And Related Function Documentation

◆ GetDMusMiniport

VOID GetDMusMiniport ( IN IPortDMus *  iface,
IN PMINIPORTDMUS Miniport,
IN PMINIPORTMIDI MidiMiniport 
)
friend

Definition at line 533 of file port_dmus.cpp.

537 {
538  CPortDMus * This = (CPortDMus*)iface;
539 
540  *Miniport = This->m_pMiniport;
541  *MidiMiniport = This->m_pMiniportMidi;
542 }

Member Data Documentation

◆ IMP_IPortDMus

CPortDMus::IMP_IPortDMus

Definition at line 39 of file port_dmus.cpp.

◆ IMP_ISubdevice

CPortDMus::IMP_ISubdevice

Definition at line 40 of file port_dmus.cpp.

◆ m_bInitialized

BOOL CPortDMus::m_bInitialized
protected

Definition at line 46 of file port_dmus.cpp.

◆ m_Filter

PPORTFILTERDMUS CPortDMus::m_Filter
protected

Definition at line 53 of file port_dmus.cpp.

◆ m_pDescriptor

PPCFILTER_DESCRIPTOR CPortDMus::m_pDescriptor
protected

Definition at line 55 of file port_dmus.cpp.

◆ m_pDeviceObject

DEVICE_OBJECT* CPortDMus::m_pDeviceObject
protected

Definition at line 49 of file port_dmus.cpp.

◆ m_pMiniport

IMiniportDMus* CPortDMus::m_pMiniport
protected

Definition at line 47 of file port_dmus.cpp.

◆ m_pMiniportMidi

IMiniportMidi* CPortDMus::m_pMiniportMidi
protected

Definition at line 48 of file port_dmus.cpp.

◆ m_pPinCount

PPINCOUNT CPortDMus::m_pPinCount
protected

Definition at line 51 of file port_dmus.cpp.

◆ m_pPowerNotify

PPOWERNOTIFY CPortDMus::m_pPowerNotify
protected

Definition at line 52 of file port_dmus.cpp.

◆ m_Ref

LONG CPortDMus::m_Ref
protected

Definition at line 58 of file port_dmus.cpp.

Referenced by STDMETHODIMP_().

◆ m_ServiceGroup

PSERVICEGROUP CPortDMus::m_ServiceGroup
protected

Definition at line 50 of file port_dmus.cpp.

◆ m_SubDeviceDescriptor

PSUBDEVICE_DESCRIPTOR CPortDMus::m_SubDeviceDescriptor
protected

Definition at line 56 of file port_dmus.cpp.


The documentation for this class was generated from the following file: