https://git.reactos.org/?p=reactos.git;a=commitdiff;h=994732c4bb879fba6ad2c…
commit 994732c4bb879fba6ad2cd0089dc5a64d166442d
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat Apr 8 15:20:07 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Apr 8 15:20:07 2023 +0900
[RUNDLL32][SHELL32] Rename 'rundll32_window' as 'RunDLL' (#5229)
Improve compatibility.
- Rename window class "rundll32_window" as "RunDLL".
- Delete some shell32 codes about this window class.
CORE-13895, CORE-18350
---
base/system/rundll32/rundll32.c | 2 +-
dll/win32/shell32/wine/control.c | 49 ++++++++++++++--------------------------
2 files changed, 18 insertions(+), 33 deletions(-)
diff --git a/base/system/rundll32/rundll32.c b/base/system/rundll32/rundll32.c
index 8c14009e8b9..b02517ef56a 100644
--- a/base/system/rundll32/rundll32.c
+++ b/base/system/rundll32/rundll32.c
@@ -50,7 +50,7 @@ LPCTSTR DllNotLoaded = _T("LoadLibrary failed to load
\"%s\"");
LPCTSTR MissingEntry = _T("Missing entry point:%s\nIn %s");
*/
LPCTSTR rundll32_wtitle = _T("rundll32");
-LPCTSTR rundll32_wclass = _T("rundll32_window");
+LPCTSTR rundll32_wclass = _T("RunDLL");
TCHAR ModuleFileName[MAX_PATH+1];
LPTSTR ModuleTitle;
diff --git a/dll/win32/shell32/wine/control.c b/dll/win32/shell32/wine/control.c
index 6103af4136c..7485efcf261 100644
--- a/dll/win32/shell32/wine/control.c
+++ b/dll/win32/shell32/wine/control.c
@@ -766,45 +766,30 @@ Control_EnumWinProc(
_In_ LPARAM lParam)
{
AppDlgFindData* pData = (AppDlgFindData*)lParam;
- WCHAR szClassName[256] = L"";
+ UINT_PTR sAppletNo;
+ HANDLE hRes;
+ WCHAR szAppFile[MAX_PATH];
if (pData->hRunDLL == hwnd)
- {
- // Skip self instance
- return TRUE;
- }
+ return TRUE; /* Skip self instance */
- if (GetClassNameW(hwnd, szClassName, _countof(szClassName)))
+ sAppletNo = (UINT_PTR)GetPropW(hwnd, (LPTSTR)MAKEINTATOM(pData->aCPLFlags));
+ if (sAppletNo != pData->sAppletNo)
+ return TRUE; /* Continue enumeration */
+
+ hRes = GetPropW(hwnd, (LPTSTR)MAKEINTATOM(pData->aCPLName));
+ GlobalGetAtomNameW((ATOM)HandleToUlong(hRes), szAppFile, _countof(szAppFile));
+ if (wcscmp(szAppFile, pData->szAppFile) == 0)
{
- // Note: A comparison on identical is not possible, the class names are
different.
- // ReactOS: 'rundll32_window'
- // WinXP: 'RunDLL'
- // other OS: not checked
- if (StrStrIW(szClassName, L"rundll32") != NULL)
+ HWND hDialog = GetLastActivePopup(hwnd);
+ if (IsWindow(hDialog))
{
- UINT_PTR sAppletNo;
-
- sAppletNo = (UINT_PTR)GetPropW(hwnd,
(LPTSTR)MAKEINTATOM(pData->aCPLFlags));
- if (sAppletNo == pData->sAppletNo)
- {
- HANDLE hRes;
- WCHAR szAppFile[MAX_PATH];
-
- hRes = GetPropW(hwnd, (LPTSTR)MAKEINTATOM(pData->aCPLName));
- GlobalGetAtomNameW((ATOM)HandleToUlong(hRes), szAppFile,
_countof(szAppFile));
- if (wcscmp(szAppFile, pData->szAppFile) == 0)
- {
- HWND hDialog = GetLastActivePopup(hwnd);
- if (IsWindow(hDialog))
- {
- pData->hDlgResult = hDialog;
- return FALSE; // stop enumeration
- }
- }
- }
+ pData->hDlgResult = hDialog;
+ return FALSE; /* Stop enumeration */
}
}
- return TRUE; // continue enumeration
+
+ return TRUE; /* Continue enumeration */
}
/**