#include <ntddk.h>
#include <portcls.h>
#include <debug.h>
Go to the source code of this file.
◆ INITGUID
◆ MAX_MINIPORTS
◆ PUT_GUIDS_HERE
◆ AddDevice()
Definition at line 92 of file adapter.cpp.
95{
96 DPRINT1(
"MPU401_KS AddDevice called\n");
101 0);
102}
NTSTATUS NTAPI PcAddAdapterDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject, IN PCPFNSTARTDEVICE StartDevice, IN ULONG MaxObjects, IN ULONG DeviceExtensionSize)
PDEVICE_OBJECT PhysicalDeviceObject
static BOOL StartDevice(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOL bEnable, IN DWORD HardwareProfile OPTIONAL, OUT BOOL *bNeedReboot OPTIONAL)
NTSTATUS(NTAPI * PCPFNSTARTDEVICE)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PRESOURCELIST ResourceList)
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
◆ DriverEntry()
Definition at line 107 of file adapter.cpp.
110{
112 DPRINT1(
"MPU401_KS DriverEntry\n");
113
117
118 DPRINT1(
"PcInitializeAdapterDriver result 0x%08x\n",
Status);
119
121};
NTSTATUS NTAPI PcInitializeAdapterDriver(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPathName, IN PDRIVER_ADD_DEVICE AddDevice)
DRIVER_ADD_DEVICE AddDevice
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
◆ StartDevice()
Definition at line 25 of file adapter.cpp.
29{
33
34 DPRINT1(
"MPU401_KS StartDevice called\n");
35
38
40 {
42 }
43
44
45 DPRINT1(
"Calling PcNewPort with CLSID_PortMidi\n");
47
49 {
52 }
53
54 DPRINT1(
"Calling PcNewMiniport with CLSID_MiniportDriverUart\n");
56
58 {
61 }
62
63 DPRINT1(
"Calling Init of port object\n");
65
67 {
70 }
71
72 DPRINT1(
"Registering subdevice via PcRegisterSubdevice\n");
74
76 {
77
78 DPRINT1(
"PcRegisterSubdevice FAILED with status 0x%08x\n",
Status);
79 }
80
81 miniport->Release();
83
85
87}
NTSTATUS NTAPI PcRegisterSubdevice(IN PDEVICE_OBJECT DeviceObject, IN PWCHAR Name, IN PUNKNOWN Unknown)
NTSTATUS NTAPI PcNewMiniport(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
#define NT_SUCCESS(StatCode)
_In_ PNDIS_STRING _In_ PNDIS_STRING _Out_ PDEVICE_OBJECT * pDeviceObject
#define STATUS_INVALID_PARAMETER_3
NTSTATUS NTAPI PcNewPort(OUT PPORT *OutPort, IN REFCLSID ClassId)
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
◆ DeviceName