https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f1cff6ef272de5795ae5f…
commit f1cff6ef272de5795ae5ffdb04ce781e69f0707b
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Oct 5 12:34:33 2023 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Oct 5 20:58:28 2023 +0200
[DESK] Remove deprecated code.
This mostly reverts commit 221f21c62 (r29328), that was a hack for
building with MSVC. We can nowadays correctly link with the shell32
SHCreatePropSheetExtArrayEx() export.
---
dll/cpl/desk/advmon.c | 27 ++-------------------------
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/dll/cpl/desk/advmon.c b/dll/cpl/desk/advmon.c
index e933072316e..c0512028199 100644
--- a/dll/cpl/desk/advmon.c
+++ b/dll/cpl/desk/advmon.c
@@ -74,9 +74,6 @@ BuildAdvPropTitle(IDataObject *pdo, LPTSTR lpBuffer, DWORD
dwBufferLen)
LocalFree((HLOCAL)lpDisplayName);
}
-
-typedef HPSXA (WINAPI * CPSEAE)(HKEY,LPCWSTR,UINT,IDataObject*);
-
BOOL
DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice)
{
@@ -86,10 +83,6 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY
DisplayDevice)
HPSXA hpsxaDev, hpsxaDisp;
BOOL Ret;
IDataObject *pdo;
-#ifdef _MSC_VER
- HMODULE hShell32 = NULL;
- CPSEAE msvc_SHCreatePropSheetExtArrayEx;
-#endif
/* FIXME: Build the "%s and %s" caption string for the monitor and adapter
name */
szCaption[0] = _T('\0');
@@ -109,25 +102,13 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY
DisplayDevice)
if (pdo != NULL)
BuildAdvPropTitle(pdo, szCaption, sizeof(szCaption) / sizeof(szCaption[0]));
-#ifdef _MSC_VER
- hShell32 = LoadLibrary(_T("shell32.dll"));
- if (hShell32 == NULL)
- return FALSE;
- msvc_SHCreatePropSheetExtArrayEx = (CPSEAE)GetProcAddress(hShell32, (LPCSTR)194);
- hpsxaDev = msvc_SHCreatePropSheetExtArrayEx(HKEY_LOCAL_MACHINE,
REGSTR_PATH_CONTROLSFOLDER TEXT("\\Device"), MAX_ADVANCED_PAGES - psh.nPages,
pdo);
-#else
hpsxaDev = SHCreatePropSheetExtArrayEx(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER
TEXT("\\Device"), MAX_ADVANCED_PAGES - psh.nPages, pdo);
-#endif
if (hpsxaDev != NULL)
- SHAddFromPropSheetExtArray(hpsxaDev, PropSheetAddPage, (LPARAM)&psh);
+ SHAddFromPropSheetExtArray(hpsxaDev, PropSheetAddPage, (LPARAM)&psh);
-#ifdef _MSC_VER
- hpsxaDisp = msvc_SHCreatePropSheetExtArrayEx(HKEY_LOCAL_MACHINE,
REGSTR_PATH_CONTROLSFOLDER TEXT("\\Display"), MAX_ADVANCED_PAGES - psh.nPages,
pdo);
-#else
hpsxaDisp = SHCreatePropSheetExtArrayEx(HKEY_LOCAL_MACHINE,
REGSTR_PATH_CONTROLSFOLDER TEXT("\\Display"), MAX_ADVANCED_PAGES - psh.nPages,
pdo);
-#endif
if (hpsxaDisp != NULL)
- SHAddFromPropSheetExtArray(hpsxaDisp, PropSheetAddPage, (LPARAM)&psh);
+ SHAddFromPropSheetExtArray(hpsxaDisp, PropSheetAddPage, (LPARAM)&psh);
Ret = (LONG)(PropertySheet(&psh) != -1);
@@ -139,9 +120,5 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY
DisplayDevice)
IDataObject_Release(pdo);
-#ifdef _MSC_VER
- FreeLibrary(hShell32);
-#endif
-
return Ret;
}