https://git.reactos.org/?p=reactos.git;a=commitdiff;h=93955f37de34d25161d00…
commit 93955f37de34d25161d0034c8f0f6917c82ef93e
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Aug 17 17:23:40 2022 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Aug 17 17:23:40 2022 +0900
[NTUSER][USER32] Define NtUserSetWindowLongPtr for non-Win64 (#4612)
- Add NtUserSetWindowLongPtr macro on non-Win64.
- Use NtUserSetWindowLongPtr instead of NtUserSetWindowLong.
CORE-11700
---
win32ss/include/ntuser.h | 2 ++
win32ss/user/user32/misc/imm.c | 2 +-
win32ss/user/user32/windows/class.c | 6 +++---
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h
index 3f0449d2ee6..2b122059318 100644
--- a/win32ss/include/ntuser.h
+++ b/win32ss/include/ntuser.h
@@ -3365,6 +3365,8 @@ NtUserSetWindowLongPtr(
DWORD Index,
LONG_PTR NewValue,
BOOL Ansi);
+#else
+#define NtUserSetWindowLongPtr NtUserSetWindowLong
#endif // _WIN64
BOOL
diff --git a/win32ss/user/user32/misc/imm.c b/win32ss/user/user32/misc/imm.c
index 0433e3cff0c..017e9f2e384 100644
--- a/win32ss/user/user32/misc/imm.c
+++ b/win32ss/user/user32/misc/imm.c
@@ -331,7 +331,7 @@ static HWND User32CreateImeUIWindow(PIMEUI pimeui, HKL hKL)
}
if (hwndUI)
- NtUserSetWindowLong(hwndUI, IMMGWLP_IMC, (LONG_PTR)pimeui->hIMC, FALSE);
+ NtUserSetWindowLongPtr(hwndUI, IMMGWLP_IMC, (LONG_PTR)pimeui->hIMC, FALSE);
Quit:
IMM_FN(ImmUnlockImeDpi)(pImeDpi);
diff --git a/win32ss/user/user32/windows/class.c b/win32ss/user/user32/windows/class.c
index 376c91c3122..95b9c262315 100644
--- a/win32ss/user/user32/windows/class.c
+++ b/win32ss/user/user32/windows/class.c
@@ -1829,7 +1829,7 @@ SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord )
}
break;
}
- return NtUserSetWindowLong( hWnd, nIndex, wNewWord, FALSE );
+ return (WORD)NtUserSetWindowLongPtr(hWnd, nIndex, wNewWord, FALSE);
}
/*
@@ -1843,7 +1843,7 @@ SetWindowLongA(
int nIndex,
LONG dwNewLong)
{
- return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, TRUE);
+ return (LONG)NtUserSetWindowLongPtr(hWnd, nIndex, dwNewLong, TRUE);
}
/*
@@ -1856,7 +1856,7 @@ SetWindowLongW(
int nIndex,
LONG dwNewLong)
{
- return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
+ return (LONG)NtUserSetWindowLongPtr(hWnd, nIndex, dwNewLong, FALSE);
}
#ifdef _WIN64