ReactOS 0.4.16-dev-336-gb667d82
port.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/port.cpp
5 * PURPOSE: Port construction API
6 * PROGRAMMER: Johannes Anderwald
7 * Andrew Greenwood
8 */
9
10#include "private.hpp"
11
12#define NDEBUG
13#include <debug.h>
14
18 OUT PPORT* OutPort,
19 IN REFCLSID ClassId)
20{
23
24 DPRINT("PcNewPort entered\n");
25
27
28 if (!OutPort)
29 {
30 DPRINT("PcNewPort was supplied a NULL OutPort parameter\n");
32 }
33
34 if (IsEqualGUIDAligned(ClassId, CLSID_PortMidi))
35 Status = NewPortDMus(OutPort);
36 else if (IsEqualGUIDAligned(ClassId, CLSID_PortDMus))
37 Status = NewPortDMus(OutPort);
38 else if (IsEqualGUIDAligned(ClassId, CLSID_PortTopology))
39 Status = NewPortTopology(OutPort);
40 else if (IsEqualGUIDAligned(ClassId, CLSID_PortWaveCyclic))
41 Status = NewPortWaveCyclic(OutPort);
42 else if (IsEqualGUIDAligned(ClassId, CLSID_PortWavePci))
43 Status = NewPortWavePci(OutPort);
44 else if (IsEqualGUIDAligned(ClassId, CLSID_PortWaveRT))
45 Status = NewPortWaveRT(OutPort);
46 else
47 {
48
50 {
51 DPRINT("unknown interface %S\n", GuidString.Buffer);
53 }
54
56 return Status;
57 }
58 DPRINT("PcNewPort Status %lx\n", Status);
59
60 return Status;
61}
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
Status
Definition: gdiplustypes.h:25
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
static PWSTR GuidString
Definition: apphelp.c:93
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSTATUS NTAPI PcNewPort(OUT PPORT *OutPort, IN REFCLSID ClassId)
Definition: port.cpp:17
NTSTATUS NewPortDMus(OUT PPORT *OutPort)
Definition: port_dmus.cpp:482
NTSTATUS NewPortTopology(OUT PPORT *OutPort)
NTSTATUS NewPortWaveCyclic(OUT PPORT *OutPort)
NTSTATUS NewPortWavePci(OUT PPORT *OutPort)
NTSTATUS NewPortWaveRT(OUT PPORT *OutPort)
IPort * PPORT
Definition: portcls.h:1105
#define PC_ASSERT_IRQL_EQUAL(x)
Definition: private.hpp:31
#define REFCLSID
Definition: guiddef.h:117
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235