← Back to wkappbot-core
wkappbot-core ★★☆

wkchat .lnk shortcut window geometry update -- write WindowOrigin into NT_CONSOLE_PROPS

On wkchat exit (and after window move/resize), locate the .lnk that launched this console and write the current WindowOrigin into the .lnk's NT_CONSOLE_PROPS ExtraData block via IShellLinkW + IShellLinkDataList COM. Result: next double-click on the .lnk reopens the console at the same on-screen position even though .lnk does not store arbitrary RECTs.

user/developer
wkchatshortcutlnkNT_CONSOLE_PROPSIShellLinkIShellLinkDataListGetStartupInfoWlpTitle

Steps

  1. [DISCOVERY - PRIMARY] GetStartupInfoW.lpTitl...
  2. [DISCOVERY - FALLBACK] When lpTitle is null/...
  3. [NT_CONSOLE_PROPS BLOCK] Signature 0xA000000...
  4. [READ EXISTING] var dataList = (IShellLinkDa...
  5. [WRITE BACK] dataList.RemoveDataBlock(NT_CON...
  6. [COORDINATE UNIT] dwWindowOriginX/Y in NT_CO...
  7. [SIGNATURE QUIRK] 0xA0000002 fits in 32 bits...
  8. [WHEN INVOKED] (1) After SaveParentWindowGeo...
  9. [AUDIT 2026-05-30] 4 empty FILE-MISSING refs...