About the VxD Loader

A dynamically loadable VxD can be loaded and unloaded at any time. (By contrast, static VxDs can be loaded only when the system is initialized and cannot be unloaded.) A dynamically loadable VxD can be loaded by another VxD using the services provided by the dynamic VxD loader (VXDLDR), by a 16-bit, ring-3 application using protected- and virtual-86 mode API, or by a Win32 application using the DeviceIOControl function. For more information about DeviceIOControl, see the Guide to Programming Windows 95.

Dynamically loaded VxDs are new for this release of Windows. Dynamically loadable VxDs are useful when a VxD is needed only once, because when it is no longer needed it can be unloaded. If a device monopolizes many system resources but is used rarely or intermittently, the VxDs could be loaded and unloaded again whenever required. (Networks are a good example of this.) If a VxD is required to temporarily modify the capabilities of a device, it can be loaded and used without forcing the user to restart their computer. In addition, the Plug and Play architecture is dependent on dynamically loadable VxDs. When the system starts, it determines what devices are present, then uses the VxD loader to load VxDs for those devices. The protected-mode block-device driver model (Dragon) also requires dynamically loadable VxDs.

Dynamically loadable VxDs use the same file format as static VxDs. VxDs are labeled as dynamically loadable by using the module flags. The real-mode VxD loader accepts both static and dynamically loadable VxDs; this allows a VxD binary file to be both dynamically loadable and static. The VxD loader (VXDLDR) loads only VxDs that are marked as dynamically loadable.

Applications can use the VXDLDR_LoadDevice service to load a dynamically loadable VxD and the VXDLDR_UnloadDevice service to unload one. The VXDLDR_GetVersion service retrieves the version number of VXDLDR.