Menu

#302 MSG_WM_WTSSESSION_CHANGE should crack lParam as session Id

v1.0 (example)
closed-fixed
None
5
2019-04-23
2018-05-22
No

MSG_WM_WTSSESSION_CHANGE cracks lParam as PWTSSESSION_NOTIFICATION, which is only used in the service control handler callback function. The correct type to cast to is simply a DWORD.

Discussion

  • klaus triendl

    klaus triendl - 2018-05-22

    ... or ULONG

     
  • Nenad Stefanovic

    • assigned_to: Nenad Stefanovic
     
  • Nenad Stefanovic

    • status: open --> closed-fixed
     
  • Nenad Stefanovic

    It is probably DWORD, at least according to the WTS_SESSION_INFO structure

    The confusion here was because of WTSSESSION_NOTIFICATION struct defined in WinUser.h

    Fixed now.

    Commit: https://sourceforge.net/p/wtl/git/ci/622dcae573a4c3eb7329e6c6eaac854f119dd4af/

     
  • klaus triendl

    klaus triendl - 2018-06-13

    Thanks and already in use :)

     
  • Anonymous

    Anonymous - 2018-06-21

    Not DWORD but LPARAM. (DWORD - unsigned but LPARAM - signed)
    Because LPARAM is declared as

    #typedef LONG_PTR LPARAM;
    

    And LONG_PTR as

    #if defined (_WIN64)
         typedef __int64 LONG_PTR;
    #else
         typedef long LONG_PTR;
    #endif
    

    There will be problems in 64-bit system

     
  • Nenad Stefanovic

    I don't think that will be a problem, WPARAM and LPARAM can be anything

     
  • Anonymous

    Anonymous - 2018-06-24

    It can be anything if it is passed as a pointer, and here is the value.

     
  • Nenad Stefanovic

    Why would this be different than WM_ACTIVATEAPP? Look for it in windowsx.h

     
  • Anonymous

    Anonymous - 2018-06-25

    Sorry. You right.

    typedef unsigned long DWORD;
    

    and

    typedef long LONG_PTR;
    

    The same.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB