ReactOS 0.4.16-dev-2293-g4d8327b
sklhdaudbus.cpp
Go to the documentation of this file.
1#include "driver.h"
2
6 _In_ WDFDRIVER Driver,
8)
9{
12
13 //
14 // Initialize all the properties specific to the device.
15 // Framework has default values for the one that are not
16 // set explicitly here. So please read the doc and make sure
17 // you are okay with the defaults.
18 //
19 WdfDeviceInitSetDeviceType(DeviceInit, FILE_DEVICE_BUS_EXTENDER);
20
22 return status;
23}
24
25extern "C" NTSTATUS
30)
31{
34 WDFDRIVER wdfDriver;
35
36 SklHdAudBusPrint(DEBUG_LEVEL_INFO, DBG_INIT,
37 "Driver Entry\n");
38
39 //
40 // Default to NonPagedPoolNx for non paged pool allocations where supported.
41 //
42
43#ifndef __REACTOS__
44 // FIXME: disabled for now, since it's unimplemented in ReactOS
45 ExInitializeDriverRuntime(DrvRtPoolNxOptIn);
46#endif
47
49
50 status = WdfDriverCreate(DriverObject,
53 &config,
54 &wdfDriver
55 );
56 if (!NT_SUCCESS(status))
57 {
58 SklHdAudBusPrint(DEBUG_LEVEL_ERROR, DBG_INIT,
59 "WdfDriverCreate failed %x\n", status);
60 }
61
62 return status;
63}
LONG NTSTATUS
Definition: precomp.h:26
#define __in
Definition: dbghelp.h:35
struct config_s config
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
#define SklHdAudBusPrint(dbglevel, fmt,...)
Definition: driver.h:111
NTSTATUS NTAPI Fdo_Create(_Inout_ PWDFDEVICE_INIT DeviceInit)
Definition: fdo.cpp:29
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
#define FILE_DEVICE_BUS_EXTENDER
Definition: winioctl.h:87
NTSTATUS NTAPI SklHdAudBusEvtDeviceAdd(_In_ WDFDRIVER Driver, _Inout_ PWDFDEVICE_INIT DeviceInit)
Definition: sklhdaudbus.cpp:5
Definition: ps.c:97
#define NTAPI
Definition: typedefs.h:36
_Must_inspect_result_ _In_ WDFDRIVER Driver
Definition: wdfcontrol.h:83
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
FORCEINLINE VOID WDF_DRIVER_CONFIG_INIT(_Out_ PWDF_DRIVER_CONFIG Config, _In_opt_ PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd)
Definition: wdfdriver.h:148
#define WDF_NO_OBJECT_ATTRIBUTES
Definition: wdftypes.h:105