PRB: Control Message Fails when Trying Dynamic VxDs as StaticID: Q141231
|
While developing a new dynamic VxD for Windows 95, developers sometimes put the VxD into the System.ini files's [386Enh] section as a "device=" line to test initialization or other basic function. During early testing, the .inf might not be generated or the loading application may not be working yet, so this seems a good way to temporarily test some functions. Yet, the initialization routines are never called.
This is due to the fact that the control messages that VMM sends out for static and dynamic VxDs are not the same. Refer to the library compact disc or Vmm.doc from the DDK. To summarize (from VMM.DOC):
Device_Init Virtual devices initializing (interrupts enabled).
Init_Complete All virtual devices have initialized.
Sys_Critical_Exit System is terminating (interrupt disabled).
Sys_Critical_Init Virtual devices initializing (interrupts disabled).
System_Exit System is terminating (interrupts enabled).
Sys_Dynamic_Device_Exit Dynamic VxD being unloaded (directed).
Sys_Dynamic_Device_Init Dynamic VxD being loaded (directed).
If you are planning to switch back and forth, you may want to include both
types of messages in your control message procedure, for example:
Control_Dispatch SYS_DYNAMIC_DEVICE_INIT, My_Init
Control_Dispatch DEVICE_INIT, My_Init
This behavior is by design.
Windows 95 DDK
MSDN Library Compact Disc October 1995
Additional query words: 4.00 VMM control message
Keywords :
Version : 4.00
Platform : WINDOWS
Issue type :
Last Reviewed: March 2, 1999