The easiest way to write a Kernel PlugIn driver is to use DriverWizard to generate the Kernel PlugIn code for your hardware (see sections 11.6.3 and 11.6.4.2). Alternatively, you can use the sample KP_PCI PCI Kernel PlugIn driver, found under the WinDriver/samples/pci_diag/kp_pci directory, as the basis for your Kernel PlugIn driver development (see sections 11.6.3 and 11.6.4.1). You can also develop your code "from scratch", if you wish.
The following is a step-by-step guide to creating your Kernel PlugIn driver.