Accessing Device Drivers from C#
By David Union, April 01, 2002
Device Drivers are written largely in C or C++. No explicit support for Device Driver communication is included in the current .NET framework. David implements support with C# and discusses how to access Win32 APIs using the Platform Invocation Services and how to make that reusable from within the .NET framework with Overloading.
April 2002/ Accessing Device Drivers from C#
Example 2
Exporting a drivers name to DosDevices
RtlInitUnicodeString(&usDriverName, L"\\DosDevices\\MyDriver");
...
status = IoCreateDevice(DriverObject,
sizeof(MYDEVICE_EXTENSION),
&usDriverName, FILE_DEVICE_UNKNOWN,
FILE_DEVICE_SECURE_OPEN, FALSE, &DeviceObject);