DOCERR: WM_DEVICECHANGE Message Replaces WM_STARTSESSION

ID: Q152542


The information in this article applies to:
  • Microsoft Win32 Device Driver Kit (DDK) Windows 95


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 query words: 4.00

Keywords : kbnokeyword kbDDK
Version : 4.00
Platform : WINDOWS
Issue type :


Last Reviewed: March 5, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.