VXDLDR_LoadDevice


include vxdldr.inc

mov     edx, [Devicename]
mov     eax, [Flags]
VxDcall VXDLDR_LoadDevice
jc      errorhandler

Loads a VxD into memory. Uses EAX and EDX.

Value

Meaning

VXDLDR_ERR_BAD_DEVICE_FILE

Specified VxD file is not usable.

VXDLDR_ERR_DEVICE_REFUSED

Specified device operation not allowed.

VXDLDR_ERR_DUPLICATE_DEVICE

Specified operation has already occurred for the given device.

VXDLDR_ERR_FILE_OPEN_ERROR

Unable to open specified file.

VXDLDR_ERR_FILE_READ

Unable to read specified file.

VXDLDR_ERR_IN_DOS

System error.

VXDLDR_ERR_NO_SUCH_DEVICE

Specified device not found.

VXDLDR_ERR_OUT_OF_MEMORY

Out of memory.


Devicename

Address of a null-terminated string specifying the filename of the VxD.

Flags

Indicates whether the device is initialized by the system or by the calling VxD. If this parameter is VXDLDR_INIT_DEVICE, the device is initialized by the system. Otherwise, this parameter should be zero, and the calling VxD should initialize the device and send the SYS_DYNAMIC_DEVICE_INIT message.

If you call this function without specifying the VXDLDR_INIT_DEVICE flag, you must call either the VXDLDR_DevInitSucceeded or VXDLDR_DevInitFailed service to free system resources associated with the VxD before calling VXDLDR_UnloadDevice to unload the VxD.