PRB: Control Message Fails when Trying Dynamic VxDs as Static

Last reviewed: December 14, 1995
Article ID: Q141231
The information in this article applies to:
  • Microsoft Win32 Device Development Kit (DDK) for Windows 95

SYMPTOMS

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.

CAUSE

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):

Static messages:

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).

Dynamic messages:

Sys_Dynamic_Device_Exit   Dynamic VxD being unloaded (directed).
Sys_Dynamic_Device_Init   Dynamic VxD being loaded (directed).

RESOLUTION

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

Also, don't forget to finally remove the System.ini "device" line when your dynamic loading is working.

STATUS

This behavior is by design.

REFERENCES

Windows 95 DDK MSDN Library Compact Disc October 1995


Additional reference words: 4.00 VMM control message
KBCategory: kbprg kbprb
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 14, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.