flags and commandId depend on the menu tier. The v2 tree and the v1
HMENU tier emit both,
but flags means different bits on each: raw SDK display flags on the v2
tree, raw Win32 MENUITEMINFO state bits on the HMENU tier. The flat
fallback tier (fallback: true) emits flags and no commandId, because
it enumerates commands without creating a menu. Check these optional
fields before using them.
guid is the ONLY stable way to run the command. commandId is a Win32
menu id that dies with the transient menu it was generated from, so it must
never be persisted or passed back as an address.
Main-menu source reflects the provider's node kind; a dynamic leaf without
its subGuid remains dynamic and cannot be executed. Context-menu sources
distinguish dynamic leaves by subGuid presence. Every
leaf of the v1 HMENU tier reports hmenu_fallback whether or not a
subGuid was back-filled for it.
Menu command — invokable leaf node.
flagsandcommandIddepend on the menu tier. The v2 tree and the v1 HMENU tier emit both, butflagsmeans different bits on each: raw SDK display flags on the v2 tree, raw Win32MENUITEMINFOstate bits on the HMENU tier. The flat fallback tier (fallback: true) emitsflagsand nocommandId, because it enumerates commands without creating a menu. Check these optional fields before using them.guidis the ONLY stable way to run the command.commandIdis a Win32 menu id that dies with the transient menu it was generated from, so it must never be persisted or passed back as an address.Main-menu
sourcereflects the provider's node kind; a dynamic leaf without its subGuid remains dynamic and cannot be executed. Context-menu sources distinguish dynamic leaves by subGuid presence. Every leaf of the v1 HMENU tier reportshmenu_fallbackwhether or not asubGuidwas back-filled for it.