My target OS is not any of the newer ones, as these require driver signing (by MS, not self-signed) for any driver installation (even when only testing). My target OSes are Windows 2000 (no signing required, you just get a warning that the driver is unsigned when you install it), and Windows XP (signing is normally required but you can disable this requirement with a certain system configuration for driver testing, or via a self-signed driver with a self-signed certificate).
I'm not wanting to support plug and play devices (it will need to be installed manually, rather than when Windows detects a device). I want my driver to be a virtual device, not a real one, as I only need it to experiment with kernel mode, not control a specific piece of hardware.
What I already know is that NASM can set the subsystem flag of a Windows executable to NATIVE, meaning that it should allow compiling of a driver. What I need to know is 2 things.
1: How do I get Windows itself to install/recognize the driver? Do I need to make an INF file, and if so what is the correct syntax for a driver INF file?
2: How do I call the driver's function from my main program that will access the driver? Do I just import functions like from a DLL, and then call those? Or do I need to do something else?