How to Load the Generic Plug and Play VxD Sample in Windows 95

ID: Q140731


The information in this article applies to:


SUMMARY

The Windows 95 DDK contains a generic Plug and Play VxD sample for developers who want to support a device that does not fit into any of Windows 95's predefined device classes (COMM, SCSI, MOUSE, and so on). The sample does not, however, document how to load this generic Plug and Play VxD driver. This article explains how to load it.


MORE INFORMATION

Windows 95 supports the dynamic arrival and removal of devices (PCMCIA cards, and so on). Therefore it also supports the dynamic loading and unloading of drivers for these devices. Initial Installation of these drivers is accomplished by using a Device Information File (.inf), as documented in Pnp.doc in the Windows 95 DDK. One of the registry entries defined in an .inf file is the DevLoader for the device.

A DevLoader is a VxD that is responsible for loading a driver that fits into a specific Windows 95 device class. For example, VCOMM acts as the DevLoader for VCOMM port drivers, IOS is the DevLoader for IOS port drivers and SCSI miniports, and VMOUSE is the DevLoader for mouse mini-drivers. In most cases, however, developers have no reason to develop a DevLoader just to load their generic Plug and Play VxD. In this case, a developer can specify that Configuration Manager act as the DevLoader for the device. This can be accomplished by adding the following two entries to the AddReg section of the device's .inf file (where Mydevice.vxd is the name of the VxD to be loaded):


    HKR,,DevLoader,,*CONFIGMG
    HKR,,DeviceDriver,,MYDEVICE.VXD 

Once Configuration Manager loads the VxD, it will send a PNP_NEW_DEVNODE message to the VxD's control procedure with EBX containing the handle to the device's devnode. The VxD can then register with Configuration Manager using CONFIGMG_Register_Device_Driver to receive CONFIG_xxx notifications.


REFERENCES

For more information, please refer to Pnp.doc and the Plug and Play samples in the Windows 95 DDK.

Additional query words: 4.00 PnP


Keywords          : 
Version           : 4.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: March 2, 1999