From 276fc3a4d85ee008f87dd905e1bbe4544110f4d5 Mon Sep 17 00:00:00 2001 From: Whindmar Saksit Date: Sat, 20 Apr 2024 04:37:44 +0200 Subject: [PATCH 1/3] Clarify return value It is very unhelpful to use 5 for both idCmdFirst and the menu id in the example. --- .../nf-shobjidl_core-icontextmenu-querycontextmenu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md b/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md index ec926d00b775..fecb5dee69bc 100644 --- a/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md +++ b/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md @@ -198,7 +198,7 @@ This value is not available. Type: HRESULT -If successful, returns an HRESULT value that has its severity value set to SEVERITY_SUCCESS and its code value set to the offset of the largest command identifier that was assigned, plus one. For example, if idCmdFirst is set to 5 and you add three items to the menu with command identifiers of 5, 7, and 8, the return value should be MAKE_HRESULT(SEVERITY_SUCCESS, 0, 8 - 5 + 1). Otherwise, it returns a COM error value. +If successful, returns an HRESULT value that has its severity value set to SEVERITY_SUCCESS and its code value set to the offset of the largest command identifier that was assigned, plus one. For example, if idCmdFirst is set to 20 and you add three items to the menu with command identifiers of 5, 7, and 8, the return value should be MAKE_HRESULT(SEVERITY_SUCCESS, 0, 8 - 5 + 1). Otherwise, it returns a COM error value. ## -remarks From a762b3b6370344d9910be6f625b83d7eb6fe0b8a Mon Sep 17 00:00:00 2001 From: Whindmar Saksit Date: Sat, 20 Apr 2024 06:24:36 +0200 Subject: [PATCH 2/3] Make the id not be 5 --- .../nf-shobjidl_core-icontextmenu-querycontextmenu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md b/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md index fecb5dee69bc..909a578cdb0c 100644 --- a/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md +++ b/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md @@ -198,7 +198,7 @@ This value is not available. Type: HRESULT -If successful, returns an HRESULT value that has its severity value set to SEVERITY_SUCCESS and its code value set to the offset of the largest command identifier that was assigned, plus one. For example, if idCmdFirst is set to 20 and you add three items to the menu with command identifiers of 5, 7, and 8, the return value should be MAKE_HRESULT(SEVERITY_SUCCESS, 0, 8 - 5 + 1). Otherwise, it returns a COM error value. +If successful, returns an HRESULT value that has its severity value set to SEVERITY_SUCCESS and its code value set to the offset of the largest command identifier that was assigned, plus one. For example, if idCmdFirst is set to 5 and you add three items to the menu with command identifiers of 4, 7, and 8, the return value should be MAKE_HRESULT(SEVERITY_SUCCESS, 0, 8 - 5 + 1). Otherwise, it returns a COM error value. ## -remarks From 4a815126c440eff17915edb0bfbfcd0f97fd4735 Mon Sep 17 00:00:00 2001 From: Whindmar Saksit Date: Sat, 20 Apr 2024 14:46:09 +0200 Subject: [PATCH 3/3] Zero based id --- .../nf-shobjidl_core-icontextmenu-querycontextmenu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md b/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md index 909a578cdb0c..505dca345086 100644 --- a/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md +++ b/sdk-api-src/content/shobjidl_core/nf-shobjidl_core-icontextmenu-querycontextmenu.md @@ -198,7 +198,7 @@ This value is not available. Type: HRESULT -If successful, returns an HRESULT value that has its severity value set to SEVERITY_SUCCESS and its code value set to the offset of the largest command identifier that was assigned, plus one. For example, if idCmdFirst is set to 5 and you add three items to the menu with command identifiers of 4, 7, and 8, the return value should be MAKE_HRESULT(SEVERITY_SUCCESS, 0, 8 - 5 + 1). Otherwise, it returns a COM error value. +If successful, returns an HRESULT value that has its severity value set to SEVERITY_SUCCESS and its code value set to the offset of the largest command identifier that was assigned, plus one. For example, if idCmdFirst is set to 5 and you add three items to the menu with command identifiers of 5, 7, and 8 (zero based identifiers + idCmdFirst), the return value should be MAKE_HRESULT(SEVERITY_SUCCESS, 0, 8 - 5 + 1). Otherwise, it returns a COM error value. ## -remarks