ReactOS 0.4.15-dev-8131-g4988de4
miniport.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/miniport.cpp
5 * PURPOSE: Miniport construction api
6 * PROGRAMMER: Andrew Greenwood
7 */
8
9#include "private.hpp"
10
11#define NDEBUG
12#include <debug.h>
13
16operator new(
17 size_t Size,
19 ULONG Tag)
20{
22 if (P)
24 return P;
25}
26
27void
29operator delete(
30 PVOID ptr)
31{
33}
34
35void
37operator delete(
39{
41}
42
46 OUT PMINIPORT* OutMiniport,
47 IN REFCLSID ClassId)
48{
50
51 DPRINT("PcNewMiniport entered\n");
53
54 if (!OutMiniport)
55 {
56 DPRINT("PcNewMiniport was supplied a NULL OutPort parameter\n");
58 }
59
60 if (IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverDMusUART) ||
61 IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverUart) ||
62 IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverDMusUARTCapture))
63 {
64 Status = NewMiniportDMusUART(OutMiniport, ClassId);
65 }
66 else if (IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverFmSynth) ||
67 IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverFmSynthWithVol))
68 {
69 Status = NewMiniportFmSynth(OutMiniport, ClassId);
70 }
71 else
72 {
74 }
75
76 DPRINT("PcNewMiniport Status %x\n", Status);
77 return Status;
78}
#define __cdecl
Definition: accygwin.h:79
NTSTATUS NTAPI PcNewMiniport(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
Definition: miniport.cpp:45
LONG NTSTATUS
Definition: precomp.h:26
#define P(row, col)
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
Status
Definition: gdiplustypes.h:25
NTSTATUS NewMiniportDMusUART(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
NTSTATUS NewMiniportFmSynth(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
static PVOID ptr
Definition: dispmode.c:27
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define PC_ASSERT_IRQL_EQUAL(x)
Definition: private.hpp:31
#define REFCLSID
Definition: guiddef.h:117
#define DPRINT
Definition: sndvol32.h:73
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235