mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[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
This commit is contained in:
parent
f8f9c170b1
commit
994732c4bb
2 changed files with 18 additions and 33 deletions
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue