PortCls adapter driver.
More...
#include <dxd_portcls_adapter.h>
|
| | adapter(::DRIVER_OBJECT* wdm_driver, ::UNICODE_STRING* registry, const wchar_t* name, const dxd::guid& guid= 0) |
| client* | client_create() override |
| | a client for an open of the driver itself: none where the platform gives the driver no access point of its own
|
| virtual os_result | ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) |
| | driver-wide control I/O: the version, and the log mask - the input sets it, the output reads it back
|
| | operator const ::HANDLE() const |
| template<typename type_t> |
| os_result | query(const ::UNICODE_STRING& key, type_t& value) |
| template<typename key_t, typename type_t> |
| os_result | query(key_t* key, type_t& value) |
| os_result | remove() |
| os_result | set(const ::UNICODE_STRING& key, const ::GUID& value) |
| os_result | set(const ::UNICODE_STRING& key, const ::UNICODE_STRING& value, unsigned long type= REG_SZ) |
| os_result | set(const ::UNICODE_STRING& key, const char* value) |
| os_result | set(const ::UNICODE_STRING& key, const wchar_t* value) |
| os_result | set(const ::UNICODE_STRING& key, unsigned int value) |
| template<typename key_t, typename type_t> |
| os_result | set(key_t* key, const type_t& value) |
| device* | start(::IOService* shell, ::IOService* provider) |
| | a device's shell starts on its provider: the device of the pending request, or of the hardware the OS matched, launched
|
| void | stop(::IOService* shell) |
| | a device's shell stops: it leaves the driver's devices
|
| template<typename type_t> |
| unsigned long | type() |
|
| static device* | hosted(::IOService* shell) |
| | the device a device shell hosts, the driver a driver shell hosts - the shells name no framework type, iig would take it for one of its own
|
| static driver* | hosting(::IOService* shell) |
| static driver* | owned(::IOService* shell) |
| | the driver a device shell on hardware owns: this one, a product composing dxd::power defines its own
|
|
| os_result | create(const void* request, size_t size) |
| device* | create(::DEVICE_OBJECT* wdm_device, ::DEVICE_OBJECT* wdm_pdo, ::DEVICE_OBJECT* wdm_bus) override= 0 |
| | device factory
|
| os_result | destroy(const char* id) |
| void | dispatch(::DRIVER_OBJECT* wdm_driver) |
| | installs the clients' dispatch and the removal over what the form's registration wrote
|
| ::IOService* | find(const char* id) const |
| | the shell hosting the device of the given id
|
| virtual os_result | started(device &) |
| | a device started, in every form: what a driver binds per device (dxd::power) binds here
|
|
| ::NTSTATUS | __cleanup(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | IRP_MJ_CLEANUP concludes the client, IRP_MJ_CLOSE deletes it and lets its device go.
|
| ::NTSTATUS | __close(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| ::NTSTATUS | __create(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | control opens carry no file name; a KS filter open carries its reference string
|
| ::NTSTATUS | __forward(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| ::NTSTATUS | __ioctl(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | METHOD_BUFFERED: SystemBuffer carries input and output.
|
| ::NTSTATUS | __plain(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | the plain form's PnP around the forms' own (__pnp) The start launches the device with its resources once the bus started it. A stop - a rebalance - retires the device as its clients see a removal: unplugged(), conclude(), removed; a successor takes its place, which the next start launches on the new resources, and the retired one goes with its last client. The resource requirements pass the device's filter on their way up, the capabilities state a surprise removal expected, the device object goes behind the remove.
|
| ::NTSTATUS | __pnp(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| static void | __unload(::DRIVER_OBJECT* wdm_driver) |
| ::NTSTATUS | complete(::IRP* irp, os_result status, size_t information= 0) |
| static device *& | context(::DEVICE_OBJECT* wdm_device) |
| static driver& | context(::DRIVER_OBJECT* wdm_driver) |
| static device::client *& | context(::FILE_OBJECT* wdm_file) |
| static bool | ours(::FILE_OBJECT* wdm_file) |
| | a control open: no file name, the device it opened in FsContext2 - which a rebalance may have retired since
|
|
| size_t | extension{} |
| | where a device's context sits in its device extension
|
PortCls adapter driver.
One adapter per driver object, one adapter::device per FDO. The WDM driver (dxd::platform::driver) carries the control clients' dispatch and the removal; PortCls owns the device extension's head (the device's context sits behind PORT_CLASS_DEVICE_EXTENSION_SIZE) and everything that is not a control client's goes to its own dispatch - KS never sees the control clients' file objects.
◆ adapter()
| dxd::portcls::adapter::adapter(::DRIVER_OBJECT* wdm_driver, ::UNICODE_STRING* registry, const wchar_t* name, const dxd::guid& guid= 0) |
|
inline |
- Parameters
-
| wdm_driver | A pointer to a DRIVER_OBJECT structure that represents the driver's WDM driver object. |
| registry | A pointer to an UNICODE_STRING structure that specifies the path to the driver's Parameters key in the registry. |
| name | An internal unique name |
◆ __cleanup()
| ::NTSTATUS dxd::platform::driver::__cleanup(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotectedinherited |
IRP_MJ_CLEANUP concludes the client, IRP_MJ_CLOSE deletes it and lets its device go.
◆ __close()
| ::NTSTATUS dxd::platform::driver::__close(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotectedinherited |
◆ __create()
| ::NTSTATUS dxd::platform::driver::__create(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotectedinherited |
control opens carry no file name; a KS filter open carries its reference string
◆ __forward()
| ::NTSTATUS dxd::platform::driver::__forward(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotectedinherited |
◆ __ioctl()
| ::NTSTATUS dxd::platform::driver::__ioctl(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotectedinherited |
METHOD_BUFFERED: SystemBuffer carries input and output.
◆ __plain()
| ::NTSTATUS dxd::platform::driver::__plain(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotectedinherited |
the plain form's PnP around the forms' own (__pnp) The start launches the device with its resources once the bus started it. A stop - a rebalance - retires the device as its clients see a removal: unplugged(), conclude(), removed; a successor takes its place, which the next start launches on the new resources, and the retired one goes with its last client. The resource requirements pass the device's filter on their way up, the capabilities state a surprise removal expected, the device object goes behind the remove.
◆ __pnp()
| ::NTSTATUS dxd::platform::driver::__pnp(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotectedinherited |
the device outlives the stack's own remove handling: what tears down below may still reach it. The surprise removal comes with the clients' handles open, the remove after their close: unplugged() and conclude() each go ahead of their IRP, the destructor frees memory alone, with the device's last reference. A form's stop is refused: its device launches once (dxd::device); the plain form rebalances (__plain)
◆ __unload()
| void dxd::platform::driver::__unload(::DRIVER_OBJECT* wdm_driver) |
|
inlinestaticprotectedinherited |
◆ client_create()
| client* dxd::platform::driver::client_create() |
|
inlineoverridevirtualinherited |
a client for an open of the driver itself: none where the platform gives the driver no access point of its own
Reimplemented from dxd::driver.
◆ complete()
| ::NTSTATUS dxd::platform::driver::complete(::IRP* irp, os_result status, size_t information= 0) |
|
inlinestaticprotectedinherited |
◆ context() [1/3]
| device *& dxd::platform::driver::context(::DEVICE_OBJECT* wdm_device) |
|
inlinestaticprotectedinherited |
◆ context() [2/3]
| driver& dxd::platform::driver::context(::DRIVER_OBJECT* wdm_driver) |
|
inlinestaticprotectedinherited |
◆ context() [3/3]
| device::client *& dxd::platform::driver::context(::FILE_OBJECT* wdm_file) |
|
inlinestaticprotectedinherited |
◆ create() [1/2]
| os_result dxd::platform::driver::create(const void* request, size_t size) |
|
inlineprotectedinherited |
◆ create() [2/2]
| device* dxd::portcls::adapter::create(::DEVICE_OBJECT* wdm_device, ::DEVICE_OBJECT* wdm_pdo, ::DEVICE_OBJECT* wdm_bus) |
|
overrideprotectedpure virtual |
◆ destroy()
| os_result dxd::platform::driver::destroy(const char* id) |
|
inlineprotectedinherited |
◆ dispatch()
| void dxd::platform::driver::dispatch(::DRIVER_OBJECT* wdm_driver) |
|
inlineprotectedinherited |
installs the clients' dispatch and the removal over what the form's registration wrote
◆ find()
| ::IOService* dxd::platform::driver::find(const char* id) const |
|
inlineprotectedinherited |
the shell hosting the device of the given id
◆ hosted()
the device a device shell hosts, the driver a driver shell hosts - the shells name no framework type, iig would take it for one of its own
◆ hosting()
◆ ioctl()
| virtual os_result dxd::driver::ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) |
|
inlinevirtualinherited |
driver-wide control I/O: the version, and the log mask - the input sets it, the output reads it back
◆ operator const ::HANDLE()
| dxd::wdm::registry::operator const ::HANDLE() const |
|
inlineinherited |
◆ ours()
| bool dxd::platform::driver::ours(::FILE_OBJECT* wdm_file) |
|
inlinestaticprotectedinherited |
a control open: no file name, the device it opened in FsContext2 - which a rebalance may have retired since
◆ owned()
| driver* dxd::platform::driver::owned(::IOService* shell) |
|
staticinherited |
the driver a device shell on hardware owns: this one, a product composing dxd::power defines its own
◆ query() [1/2]
template<typename type_t>
| os_result dxd::wdm::registry::query(const ::UNICODE_STRING& key, type_t& value) |
|
inlineinherited |
◆ query() [2/2]
template<typename key_t, typename type_t>
| os_result dxd::wdm::registry::query(key_t* key, type_t& value) |
|
inlineinherited |
◆ remove()
◆ set() [1/6]
| os_result dxd::wdm::registry::set(const ::UNICODE_STRING& key, const ::GUID& value) |
|
inlineinherited |
◆ set() [2/6]
| os_result dxd::wdm::registry::set(const ::UNICODE_STRING& key, const ::UNICODE_STRING& value, unsigned long type= REG_SZ) |
|
inlineinherited |
◆ set() [3/6]
| os_result dxd::wdm::registry::set(const ::UNICODE_STRING& key, const char* value) |
|
inlineinherited |
◆ set() [4/6]
| os_result dxd::wdm::registry::set(const ::UNICODE_STRING& key, const wchar_t* value) |
|
inlineinherited |
◆ set() [5/6]
| os_result dxd::wdm::registry::set(const ::UNICODE_STRING& key, unsigned int value) |
|
inlineinherited |
◆ set() [6/6]
template<typename key_t, typename type_t>
| os_result dxd::wdm::registry::set(key_t* key, const type_t& value) |
|
inlineinherited |
◆ start()
| device* dxd::platform::driver::start(::IOService* shell, ::IOService* provider) |
|
inlineinherited |
a device's shell starts on its provider: the device of the pending request, or of the hardware the OS matched, launched
◆ started()
|
|
inlineprotectedvirtualinherited |
◆ stop()
| void dxd::platform::driver::stop(::IOService* shell) |
|
inlineinherited |
a device's shell stops: it leaves the driver's devices
◆ type()
template<typename type_t>
| unsigned long dxd::wdm::registry::type() |
|
inherited |
◆ extension
| size_t dxd::platform::driver::extension{} |
|
protectedinherited |
where a device's context sits in its device extension
◆ guid
| const ::GUID dxd::platform::driver::guid |
|
inherited |
< the driver's, not the Parameters key's
the product's: the control clients' device interface and property key //////////////////////////////////////////////////////////////////////////// the plain form: its devices made on AddDevice, every IRP the driver's, its PnP the plain one's
◆ icon
endpoint icon: the driver binary's own icon resource 1
◆ log
◆ managed
| bool dxd::driver::managed{} |
|
inherited |
dxd::power binds the OS's power management to the devices' sleep() and wake()
◆ name
| const wchar_t* dxd::portcls::adapter::name |
◆ ports
| unsigned int dxd::portcls::adapter::ports{1} |
PcAddAdapterDevice MaxObjects: subdevice capacity per device.
◆ service
| ::IOService* dxd::platform::driver::service |
|
inherited |
◆ status
◆ version
The documentation for this class was generated from the following file: