SYS_DYNAMIC_DEVICE_INIT


mov     eax, SYS_DYNAMIC_DEVICE_INIT
call    [VSAMPLED_Control]
jc      error_handler

Notifies a dynamically loadable VxD that it is being loaded and that it should perform any required initialization.

VSAMPLED_Control

The address of the device control procedure, as specified in the Declare_Virtual_Device macro.

This message is sent by the system when the VXDLDR_LoadDevice service is called with the Flags parameter equal to VXDLDR_INIT_DEVICE. Otherwise, this message is sent by the application that initializes the VxD.

While processing this message, dynamically loadable virtual devices typically initialize any critical functions needed to support interrupts and claim any V86 pages required to support the device.

Control dispatches for dynamically loadable VxDs should be in locked memory, such as memory locked using the VxD_LOCKED_CODE_SEG macro.