ReactOS  0.4.13-dev-544-gede3fdd
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 #ifndef YDEBUG
12 #define NDEBUG
13 #endif
14 
15 #include <debug.h>
16 
18 NTAPI
20  OUT PMINIPORT* OutMiniport,
21  IN REFCLSID ClassId)
22 {
24 
25  DPRINT("PcNewMiniport entered\n");
27 
28  if (!OutMiniport)
29  {
30  DPRINT("PcNewMiniport was supplied a NULL OutPort parameter\n");
32  }
33 
34  if (IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverDMusUART) ||
35  IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverUart) ||
36  IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverDMusUARTCapture))
37  {
38  Status = NewMiniportDMusUART(OutMiniport, ClassId);
39  }
40  else if (IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverFmSynth) ||
41  IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverFmSynthWithVol))
42  {
43  Status = NewMiniportFmSynth(OutMiniport, ClassId);
44  }
45  else
46  {
48  }
49 
50  DPRINT("PcNewMiniport Status %x\n", Status);
51  return Status;
52 }
53 
#define IN
Definition: typedefs.h:38
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define REFCLSID
Definition: guiddef.h:112
LONG NTSTATUS
Definition: precomp.h:26
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:233
NTSTATUS NTAPI PcNewMiniport(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
Definition: miniport.cpp:19
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTSTATUS NewMiniportFmSynth(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
void DPRINT(...)
Definition: polytest.cpp:61
NTSTATUS NewMiniportDMusUART(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
#define PC_ASSERT_IRQL_EQUAL(x)
Definition: private.hpp:31
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
Status
Definition: gdiplustypes.h:24
#define OUT
Definition: typedefs.h:39