[WIN32SS][SDK] ImmGetHotKey's 4th parameter is optional (#8557)

Fix SAL2 annotations of the IME hot-key functions.
JIRA issue: N/A
- Add ImmGetHotKey and ImmSetHotKey prototypes
  into <imm32_undoc.h>.
- Fix CliImmSetHotKey annotation in user32 and
  <undocuser.h>.
- Also fixes ImmSetHotKey, NtUserGetImeHotKey and
  NtUserSetImeHotKey annotations.
This commit is contained in:
Katayama Hirofumi MZ
2026-01-04 07:57:21 +09:00
committed by GitHub
parent aab65cbeb7
commit 5c6fcfbf62
6 changed files with 42 additions and 13 deletions
+16
View File
@@ -261,6 +261,22 @@ BOOL WINAPI ImmSetActiveContextConsoleIME(_In_ HWND hwnd, _In_ BOOL fFlag);
BOOL WINAPI ImmActivateLayout(_In_ HKL hKL);
BOOL WINAPI ImmFreeLayout(_In_ HKL hKL);
BOOL WINAPI
ImmGetHotKey(
_In_ DWORD dwHotKey,
_Out_ LPUINT lpuModifiers,
_Out_ LPUINT lpuVKey,
_Out_opt_ LPHKL lphKL);
BOOL WINAPI
ImmSetHotKey(
_In_ DWORD dwID,
_In_ UINT uModifiers,
_In_ UINT uVirtualKey,
_In_opt_ _When_((dwAction == SETIMEHOTKEY_ADD) &&
!(IME_HOTKEY_DSWITCH_FIRST <= dwHotKeyId &&
dwHotKeyId <= IME_HOTKEY_DSWITCH_LAST), _Null_) HKL hKL);
BOOL WINAPI
ImmWINNLSEnableIME(
_In_opt_ HWND hWnd,
+10 -1
View File
@@ -202,7 +202,16 @@ LONG WINAPI CsrBroadcastSystemMessageExW(DWORD dwflags,
WPARAM wParam,
LPARAM lParam,
PBSMINFO pBSMInfo);
BOOL WINAPI CliImmSetHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKl);
BOOL WINAPI
CliImmSetHotKey(
_In_ DWORD dwID,
_In_ UINT uModifiers,
_In_ UINT uVirtualKey,
_In_opt_ _When_((dwAction == SETIMEHOTKEY_ADD) &&
!(IME_HOTKEY_DSWITCH_FIRST <= dwHotKeyId &&
dwHotKeyId <= IME_HOTKEY_DSWITCH_LAST), _Null_) HKL hKL);
HWND WINAPI SetTaskmanWindow(HWND);
HWND WINAPI GetTaskmanWindow(VOID);
HWND WINAPI GetProgmanWindow(VOID);
+2 -2
View File
@@ -2327,7 +2327,7 @@ NtUserGetImeHotKey(
_In_ DWORD dwHotKeyId,
_Out_ PUINT lpuModifiers,
_Out_ PUINT lpuVirtualKey,
_Out_ LPHKL lphKL);
_Out_opt_ LPHKL lphKL);
BOOL
NTAPI
@@ -3138,7 +3138,7 @@ NtUserSetImeHotKey(
_In_ DWORD dwHotKeyId,
_In_ UINT uModifiers,
_In_ UINT uVirtualKey,
_In_ HKL hKL,
_In_opt_ HKL hKL,
_In_ DWORD dwAction);
BOOL
+1 -1
View File
@@ -649,7 +649,7 @@ ImmGetHotKey(
_In_ DWORD dwHotKey,
_Out_ LPUINT lpuModifiers,
_Out_ LPUINT lpuVKey,
_Out_ LPHKL lphKL)
_Out_opt_ LPHKL lphKL)
{
TRACE("(0x%lX, %p, %p, %p)\n", dwHotKey, lpuModifiers, lpuVKey, lphKL);
if (lpuModifiers && lpuVKey)
+3 -3
View File
@@ -363,7 +363,7 @@ IntSetImeHotKey(
_In_ DWORD dwHotKeyId,
_In_ UINT uModifiers,
_In_ UINT uVirtualKey,
_In_ HKL hKL,
_In_opt_ HKL hKL,
_In_ DWORD dwAction)
{
PIMEHOTKEY pNode;
@@ -435,7 +435,7 @@ NtUserGetImeHotKey(
_In_ DWORD dwHotKeyId,
_Out_ PUINT lpuModifiers,
_Out_ PUINT lpuVirtualKey,
_Out_ LPHKL lphKL)
_Out_opt_ LPHKL lphKL)
{
PIMEHOTKEY pNode = NULL;
@@ -484,7 +484,7 @@ NtUserSetImeHotKey(
_In_ DWORD dwHotKeyId,
_In_ UINT uModifiers,
_In_ UINT uVirtualKey,
_In_ HKL hKL,
_In_opt_ HKL hKL,
_In_ DWORD dwAction)
{
BOOL ret;
+10 -6
View File
@@ -66,7 +66,6 @@ IMEHOTKEYENTRY DefaultHotKeyTableC[] =
#define FE_KOREAN (1 << 3)
// Sets the far-east flags
// Win: SetFeKeyboardFlags
VOID FASTCALL IntSetFeKeyboardFlags(LANGID LangID, PBYTE pbFlags)
{
switch (LangID)
@@ -143,8 +142,6 @@ Failure:
return FALSE;
}
/* Win: LoadPreloadKeyboardLayouts */
VOID IntLoadPreloadKeyboardLayouts(VOID)
{
UINT nNumber, uFlags;
@@ -258,11 +255,18 @@ CliSaveImeHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKL, BOOL bD
return ret;
}
/*
/**
* @implemented
* Same as imm32!ImmSetHotKey.
* @note Same as imm32!ImmSetHotKey.
*/
BOOL WINAPI CliImmSetHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKL)
BOOL WINAPI
CliImmSetHotKey(
_In_ DWORD dwID,
_In_ UINT uModifiers,
_In_ UINT uVirtualKey,
_In_opt_ _When_((dwAction == SETIMEHOTKEY_ADD) &&
!(IME_HOTKEY_DSWITCH_FIRST <= dwHotKeyId &&
dwHotKeyId <= IME_HOTKEY_DSWITCH_LAST), _Null_) HKL hKL)
{
BOOL ret;