2 ReactOS Kernel Streaming
3 Port Class API: Adapter initialization
5 Author: Andrew Greenwood
14 IN PDEVICE_OBJECT DeviceObject
,
17 /* Internal function */
18 return STATUS_UNSUCCESSFUL
;
23 IN PDRIVER_OBJECT DriverObject
)
25 /* Internal function */
26 return STATUS_UNSUCCESSFUL
;
33 PORTCLASSAPI NTSTATUS NTAPI
34 PcInitializeAdapterDriver(
35 IN PDRIVER_OBJECT DriverObject
,
36 IN PUNICODE_STRING RegistryPathName
,
37 IN PDRIVER_ADD_DEVICE AddDevice
)
40 This is effectively a common DriverEntry function for PortCls drivers.
41 So it has similar responsibilities to a normal driver.
43 First 2 parameters are from DriverEntry.
44 Installs the supplied AddDevice routine in the driver object?s driver extension and installs the PortCls driver?s IRP handlers in the driver object itself.
47 DriverObject
->DriverExtension
->AddDevice
= AddDevice
;
50 TODO: (* = implement here, otherwise KS default)
60 * IRP_MJ_SYSTEM_CONTROL
66 return STATUS_SUCCESS
;
72 PORTCLASSAPI NTSTATUS NTAPI
74 IN PDRIVER_OBJECT DriverObject
,
75 IN PDEVICE_OBJECT PhysicalDeviceObject
,
76 IN PCPFNSTARTDEVICE StartDevice
,
78 IN ULONG DeviceExtensionSize
)
81 Note - after this has been called, we can
82 handle IRP_MN_START_DEVICE by calling StartDevice
86 return STATUS_UNSUCCESSFUL
;