You build a virtual device by doing the following:
A virtual device is not compatible with Windows dynamic-link libraries. Windows-based applications cannot load and use virtual devices directly. However, Win32-based applications can use the CreateFile and DeviceIoControl functions to load and interact with dynamically loadable VxDs.
The module definition file for a virtual device has the following form:
LIBRARY VSAMPLED
DESCRIPTION 'VSAMPLED Device (Version 4.0)'
EXETYPE DEV386
SEGMENTS
_LTEXT PRELOAD NONDISCARDABLE
_LDATA PRELOAD NONDISCARDABLE
_ITEXT CLASS 'ICODE' DISCARDABLE
_IDATA CLASS 'ICODE' DISCARDABLE
_TEXT CLASS 'PCODE' NONDISCARDABLE
_DATA CLASS 'PCODE' NONDISCARDABLE
EXPORTS
VSAMPLED_DDB @1
The LIBRARY statement must specify the name of the virtual device, as given in the device description block (DBB) and the EXPORTS statement must specify the name of the DBB. In all cases, the export ordinal for the DDB is 1.