2009-09-11 06:33:55 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Kernel Streaming
|
|
|
|
* FILE: drivers/wdm/audio/backpln/portcls/version.cpp
|
|
|
|
* PURPOSE: Implements IPortClsVersion interface
|
|
|
|
* PROGRAMMER: Johannes Anderwald
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "private.hpp"
|
|
|
|
|
2014-01-03 17:10:56 +00:00
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
2009-09-11 06:33:55 +00:00
|
|
|
|
2022-02-15 22:25:25 +00:00
|
|
|
class CPortClsVersion : public CUnknownImpl<IPortClsVersion>
|
2009-09-11 06:33:55 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
|
|
|
|
|
|
|
|
IMP_IPortClsVersion;
|
|
|
|
|
|
|
|
CPortClsVersion(IUnknown *OuterUnknown)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
virtual ~CPortClsVersion()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
// IPortClsVersion interface functions
|
|
|
|
//
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
CPortClsVersion::QueryInterface(
|
|
|
|
IN REFIID refiid,
|
|
|
|
OUT PVOID* Output)
|
|
|
|
{
|
2011-12-11 10:51:37 +00:00
|
|
|
UNICODE_STRING GuidString;
|
|
|
|
|
2009-09-11 06:33:55 +00:00
|
|
|
if (IsEqualGUIDAligned(refiid, IID_IPortClsVersion) ||
|
|
|
|
IsEqualGUIDAligned(refiid, IID_IUnknown))
|
|
|
|
{
|
|
|
|
*Output = PVOID(PPORTCLSVERSION(this));
|
|
|
|
PUNKNOWN(*Output)->AddRef();
|
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
2011-12-11 10:51:37 +00:00
|
|
|
|
|
|
|
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
|
|
|
{
|
|
|
|
DPRINT1("CPortClsVersion::QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
|
|
|
RtlFreeUnicodeString(&GuidString);
|
|
|
|
}
|
|
|
|
|
2009-09-11 06:33:55 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
|
|
|
|
|
|
|
DWORD
|
|
|
|
NTAPI
|
|
|
|
CPortClsVersion::GetVersion()
|
|
|
|
{
|
|
|
|
return kVersionWinXP_UAAQFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NTSTATUS NewPortClsVersion(
|
|
|
|
OUT PPORTCLSVERSION * OutVersion)
|
|
|
|
{
|
|
|
|
CPortClsVersion * This = new(NonPagedPool, TAG_PORTCLASS) CPortClsVersion(NULL);
|
|
|
|
|
|
|
|
if (!This)
|
|
|
|
return STATUS_INSUFFICIENT_RESOURCES;
|
|
|
|
|
|
|
|
This->AddRef();
|
|
|
|
|
|
|
|
*OutVersion = (PPORTCLSVERSION)This;
|
|
|
|
|
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|