ReactOS  0.4.15-dev-5640-g0dde428
version.cpp
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel Streaming
4  * FILE: drivers/wdm/audio/backpln/portcls/version.cpp
5  * PURPOSE: Implements IPortClsVersion interface
6  * PROGRAMMER: Johannes Anderwald
7  */
8 
9 #include "private.hpp"
10 
11 #ifndef YDEBUG
12 #define NDEBUG
13 #endif
14 
15 #include <debug.h>
16 
17 class CPortClsVersion : public CUnknownImpl<IPortClsVersion>
18 {
19 public:
21 
23 
24  CPortClsVersion(IUnknown *OuterUnknown)
25  {
26  }
27  virtual ~CPortClsVersion()
28  {
29 
30  }
31 };
32 
33 
34 
35 //---------------------------------------------------------------
36 // IPortClsVersion interface functions
37 //
38 
40 NTAPI
42  IN REFIID refiid,
43  OUT PVOID* Output)
44 {
46 
47  if (IsEqualGUIDAligned(refiid, IID_IPortClsVersion) ||
49  {
50  *Output = PVOID(PPORTCLSVERSION(this));
51  PUNKNOWN(*Output)->AddRef();
52  return STATUS_SUCCESS;
53  }
54 
56  {
57  DPRINT1("CPortClsVersion::QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
59  }
60 
61  return STATUS_UNSUCCESSFUL;
62 }
63 
64 DWORD
65 NTAPI
67 {
68  return kVersionWinXP_UAAQFE;
69 }
70 
72  OUT PPORTCLSVERSION * OutVersion)
73 {
75 
76  if (!This)
78 
79  This->AddRef();
80 
81  *OutVersion = (PPORTCLSVERSION)This;
82 
83  return STATUS_SUCCESS;
84 }
static PWSTR GuidString
Definition: apphelp.c:93
#define IN
Definition: typedefs.h:39
#define REFIID
Definition: guiddef.h:118
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
#define TAG_PORTCLASS
Definition: private.hpp:24
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NewPortClsVersion(OUT PPORTCLSVERSION *OutVersion)
Definition: version.cpp:71
virtual ~CPortClsVersion()
Definition: version.cpp:27
DWORD WINAPI GetVersion(VOID)
Definition: version.c:22
CPortClsVersion(IUnknown *OuterUnknown)
Definition: version.cpp:24
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define STDMETHODIMP
Definition: basetyps.h:43
void * PVOID
Definition: retypes.h:9
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: version.cpp:41
const GUID IID_IUnknown
unsigned long DWORD
Definition: ntddk_ex.h:95
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
ULONG AddRef()
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
Definition: arc.h:85
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
#define OUT
Definition: typedefs.h:40
#define STATUS_SUCCESS
Definition: shellext.h:65
IPortClsVersion * PPORTCLSVERSION
Definition: portcls.h:2263