|
|
Home Connectivity Software
Support
WinDriver Support
Technical Documents
Technical Document #62
| Doc ID: |
62 |
| Product: |
WinDriver |
| Version: |
-- |
Kernel PlugIn Driver Installation - General Guidelines
|
When using WinDriver's Kernel Plug feature you are creating your own driver file, which is used in addition to the windrvr6/.sys/.vxd/.o/.ko driver (or "windrvr" - until version 6.00), which implements WinDriver's kernel module.
Please be sure to diligently follow the instructions in the WinDriver User's Manual for building and installing your Kernel PlugIn driver.
You should specifically pay attention to the following points:
- If you have used WinDriver's Kernel PlugIn sample driver (KP_PCI / KPTEST in v6.23-) as the basis for your Kernel PlugIn application, be sure to replace the driver name ("KP_PCI" / "KPTEST") in all locations in the sample files with your chosen driver name.
The driver name should be indicated in the code in Capital Letters and without the sys/vxd/o/ko extension.
In v7.00+ of WinDriver, verify specifically that you have specified the driver name correctly in the definition of KP_PCI_DRIVER_NAME in the equivalent of the sample's pci_lib.h file.
For earlier versions of WinDriver (v6.23-), modify the equivalent of the following line in KP_Init():
strcpy(kpInit->cDriverName, "KPTEST");
and change the assignment to the pcDriverName member of the WD_KERNEL_PLUGIN structure, which is passed to WD_KernelPlugInOpen() in the user-mode project.
- When developing a SYS driver for Windows Vista/Server 2003/XP/2000/NT/Me/98, remember to install Microsoft's DDK and set the BASEDIR environment variable to the location of your DDK library before attempting to build your Kernel PlugIn SYS driver (as explained in the manual). [For version 5.05 of WinDriver and earlier, it is recommended to build your code with the NT DDK.]
For Windows NT 4.0 you also need to install the NT SDK.
For earlier versions of WinDriver (v6.0x-), which supported development of VxD drivers on Windows 95/98/Me, when developing a VxD driver you do not need to install the DDK (unless you added your own DDK function calls to the Kernel PlugIn code). When using the compile.bat file from the KPTEST sample to compile your VxD driver, comment-out or remove the following line:
nmake %1 /f kptest.mak
leaving only the line:
nmake %1 /f kptest.mak WIN95=1
Beginning with v5.20 of WinDriver, the DriverWizard can also be used to generate Kernel PlugIn code and a compatible user-mode application for your device, including the required project or makefiles for building the code (depending on the target OS).
For Windows, you can build the generated MSDEV (Visual C++) project into a SYS driver on a Windows Vista / Server 2003 / XP / 2000 / NT machine by simply opening the generated worksapce/solution file - xxx.dsw/sln - and building the code, after setting the Active Build Configuration according to the OS for which you are developing. (SYS drivers for Windows 98/Me should be built on a Windows Vista/Server 2003/XP/2000/NT machine).
- Verify that the WinDriver kernel module (windrvr6/.sys/.vxd/.o/.ko, or "windrvr" until version 6.00) is installed, before installing your Kernel PlugIn driver, since the Kernel PlugIn module depends on the WinDriver module for its successful operation. (You can run the Debug Monitor to verify WinDriver is loaded).
- Install your Kernel PlugIn driver:
- Remember to copy your Kernel PlugIn driver (my_kp/.sys/.vxd/.o/.ko) to the operating system's drivers/modules directory before attempting to install the driver. On Linux, beginning with v6.23 of WinDriver you do not need to copy the driver file, since the driver installation (make install) will handle this for you.
- Don't forget to install your Kernel PlugIn driver before running your application:
On Windows: Use the wdreg installation utility (or wdreg_gui/wdreg16 - depending on the WinDriver version and OS that you are using) to install the driver:
To install a my_kp.sys driver, run:
wdreg -name MY_KP install
To install a my_kp.vxd driver (in the WinDriver versions that support this driver type), use the -vxd flag:
wdreg -name -vxd MY_KP install
On Linux: For v6.23+ of WinDriver, from the Kernel PlugIn's kermode/ directory run:
make install
For earlier versions of WinDriver, use insmod to install the driver module.
On Solaris: Use add_drv to install the driver.
Back to Top
|
|