ReactOS 0.4.15-dev-6068-g8061a6f
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#ifndef YDEBUG
13#define NDEBUG
14#endif
15
16#include <debug.h>
17
21 OUT PPORT* OutPort,
22 IN REFCLSID ClassId)
23{
26
27 DPRINT("PcNewPort entered\n");
28
30
31 if (!OutPort)
32 {
33 DPRINT("PcNewPort was supplied a NULL OutPort parameter\n");
35 }
36
37 if (IsEqualGUIDAligned(ClassId, CLSID_PortMidi))
38 Status = NewPortDMus(OutPort);
39 else if (IsEqualGUIDAligned(ClassId, CLSID_PortDMus))
40 Status = NewPortDMus(OutPort);
41 else if (IsEqualGUIDAligned(ClassId, CLSID_PortTopology))
42 Status = NewPortTopology(OutPort);
43 else if (IsEqualGUIDAligned(ClassId, CLSID_PortWaveCyclic))
44 Status = NewPortWaveCyclic(OutPort);
45 else if (IsEqualGUIDAligned(ClassId, CLSID_PortWavePci))
46 Status = NewPortWavePci(OutPort);
47 else if (IsEqualGUIDAligned(ClassId, CLSID_PortWaveRT))
48 Status = NewPortWaveRT(OutPort);
49 else
50 {
51
53 {
54 DPRINT("unknown interface %S\n", GuidString.Buffer);
56 }
57
59 return Status;
60 }
61 DPRINT("PcNewPort Status %lx\n", Status);
62
63 return Status;
64}
LONG NTSTATUS
Definition: precomp.h:26
#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)
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
NTSTATUS NTAPI PcNewPort(OUT PPORT *OutPort, IN REFCLSID ClassId)
Definition: port.cpp:20
NTSTATUS NewPortDMus(OUT PPORT *OutPort)
Definition: port_dmus.cpp:491
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:71
#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