• What's the purpose of dwHotkey in SHELLEXECUTEINFO?

    From JJ@21:1/5 to All on Sat Nov 6 17:45:05 2021
    The documentation states that it's for associating a hotkey to the
    (launched) application. Presumably, for activating the application window,
    as stated in the WM_SETHOTKEY documentation.

    But the given hotkey never work and has no effect even though the SEE_MASK_HOTKEY flag is already specified. I've already tried it by running executing NOTEPAD.EXE with VK_F12 hotkey and with/without the
    HOTKEYF_CONTROL flag.

    Is that what dwHotkey is supposed to be for? Cause I've never seen an
    article covering such feature. i.e. a hotkey to activate the window of an executed (specific) application. Or the application itself - just like the hotkey field of a program shortcut file. Also, the executor application
    never does receive any SC_HOTKEY code from a WM_SYSCOMMAND window message - assuming that the dwHotkey is a shortcut for the RegisterHotkey() API
    function.

    If it's not, what's the purpose of it, and how to use it? Or is it that,
    it's applicable for the desktop process only?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Nov 6 20:20:59 2021
    JJ,

    But the given hotkey never work and has no effect even though the SEE_MASK_HOTKEY flag is already specified. I've already tried it by
    running executing NOTEPAD.EXE with VK_F12 hotkey and with/without the HOTKEYF_CONTROL flag.

    mov [ebx].SEI_dwHotKey,VK_F8
    or [ebx].SEI_fMask,SEE_MASK_HOTKEY

    I've just added the above to a bit of code using ShellExecuteEx to open
    notepad under XPsp3. After I hid or iconified notepad pressing F8 brought
    it back up (at the front and focussed).

    IOW, I've got no idea why yours doesn't work.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to R.Wieser on Mon Nov 8 13:12:09 2021
    On Sat, 6 Nov 2021 20:20:59 +0100, R.Wieser wrote:
    JJ,

    But the given hotkey never work and has no effect even though the
    SEE_MASK_HOTKEY flag is already specified. I've already tried it by
    running executing NOTEPAD.EXE with VK_F12 hotkey and with/without the
    HOTKEYF_CONTROL flag.

    mov [ebx].SEI_dwHotKey,VK_F8
    or [ebx].SEI_fMask,SEE_MASK_HOTKEY

    I've just added the above to a bit of code using ShellExecuteEx to open notepad under XPsp3. After I hid or iconified notepad pressing F8 brought
    it back up (at the front and focussed).

    IOW, I've got no idea why yours doesn't work.

    Regards,
    Rudy Wieser

    *&^%$#@!!! Stupid Microsoft!

    Apparently, they broke it since NT6 (Vista) and up to the latest Windows 10 build. Tested on clean OS installations in VM. I'm using Win7, so it's the reason it doesn't work.

    It still works fine in Windows 2003 (i.e. NT5.2), Windows XP, and likely
    older versions too.

    I'm pretty sure it's still broken in the upcoming Windows 11 release build.
    I do have the beta builds in VM, but don't bother to test them.

    Thanks for the input, BTW.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Mon Nov 8 08:04:45 2021
    JJ,

    *&^%$#@!!! Stupid Microsoft!

    Apparently, they broke it since NT6 (Vista) and up to the latest
    Windows 10 build. Tested on clean OS installations in VM. I'm
    using Win7, so it's the reason it doesn't work.

    I just checked the docs.microsoft.com for the SHELLEXECUTEINFO structure and they do not even bother to mention it, even when that breakage is 15 years
    old. Stupid Microsoft indeed. :-(

    Thanks for the input, BTW.

    You're welcome. And thanks for the feedback.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)