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: 20 STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); 21 22 IMP_IPortClsVersion; 23 24 CPortClsVersion(IUnknown *OuterUnknown) 25 { 26 } 27 virtual ~CPortClsVersion() 28 { 29 30 } 31 }; 32 33 34 35 //--------------------------------------------------------------- 36 // IPortClsVersion interface functions 37 // 38 39 NTSTATUS 40 NTAPI 41 CPortClsVersion::QueryInterface( 42 IN REFIID refiid, 43 OUT PVOID* Output) 44 { 45 UNICODE_STRING GuidString; 46 47 if (IsEqualGUIDAligned(refiid, IID_IPortClsVersion) || 48 IsEqualGUIDAligned(refiid, IID_IUnknown)) 49 { 50 *Output = PVOID(PPORTCLSVERSION(this)); 51 PUNKNOWN(*Output)->AddRef(); 52 return STATUS_SUCCESS; 53 } 54 55 if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) 56 { 57 DPRINT1("CPortClsVersion::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); 58 RtlFreeUnicodeString(&GuidString); 59 } 60 61 return STATUS_UNSUCCESSFUL; 62 } 63 64 DWORD 65 NTAPI 66 CPortClsVersion::GetVersion() 67 { 68 return kVersionWinXP_UAAQFE; 69 } 70 71 NTSTATUS NewPortClsVersion( 72 OUT PPORTCLSVERSION * OutVersion) 73 { 74 CPortClsVersion * This = new(NonPagedPool, TAG_PORTCLASS) CPortClsVersion(NULL); 75 76 if (!This) 77 return STATUS_INSUFFICIENT_RESOURCES; 78 79 This->AddRef(); 80 81 *OutVersion = (PPORTCLSVERSION)This; 82 83 return STATUS_SUCCESS; 84 } 85