DOCERR: WM_DEVICECHANGE Message Replaces WM_STARTSESSION

Last reviewed: June 20, 1996
Article ID: Q152542
The information in this article applies to:
  • Microsoft Win32 Device Driver Kit (DDK) for Windows 95, version 4.0

SUMMARY

The Windows 95 documentation erroneously contains references to the WM_STARTSESSION notification message, stating that this message informs VxDs that the Windows user interface component is now active and that the SHELL_CallAtAppyTime services will now work.

The WM_STARTSESSION message does not actually exist. Instead, you can use the WM_DEVICECHANGE message as listed in the \ddk\inc32\dbt.h header file. The following is an excerpt from dbt.h:

   /*
    * Message = WM_DEVICECHANGE
    * wParam  = DBT_APPYBEGIN
    * lParam  = (not used)
    *
    * 'Appy-time is now available.  This message is itself sent
    * at 'Appy-time.
    *
    * Message = WM_DEVICECHANGE
    * wParam  = DBT_APPYEND
    * lParam  = (not used)
    *
    * 'Appy-time is no longer available.  This message is *NOT* sent
    * at 'Appy-time. (It cannot be, because 'Appy-time is gone.)
    *
    * NOTE!  It is possible for DBT_APPYBEGIN and DBT_APPYEND to be sent
    * multiple times during a single Windows session. Each appearance of
    * 'Appy-time is bracketed by these two messages, but 'Appy-time may
    * momentarily become unavailable during otherwise normal Windows
    * processing. The current status of 'Appy-time availability can always
    * be obtained from a call to _SHELL_QueryAppyTimeAvailable.
    */

REFERENCES

See the Windows 95 DDK for more information on application time (Appy- time).


Additional reference words: 4.00
KBCategory: kbprg kbdocerr
KBSubcategory: DdkMisc



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: June 20, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.