From d2bc8a879f575a1c843f6cc8cb788933a10bcab8 Mon Sep 17 00:00:00 2001 From: Colin Finck <colin@reactos.org> Date: Thu, 15 May 2008 14:33:33 +0000 Subject: [PATCH] - Rename the LICINFO structure to LIC_CONTEXT as LICINFO is already used in one of the official MS PSDK headers - Replace IsUserAdmin (Wine API) with IsUserAnAdmin (shell32 API) When you now add the PROCESSOR_POWER_INFORMATION structure to "precomp.h" (which was "accidentally omitted from WinNT.h" according to MSDN..), sysdm.cpl can be compiled using MSVC and the MS PSDK headers. svn path=/trunk/; revision=33530 --- reactos/dll/cpl/sysdm/licence.c | 12 ++++++------ reactos/dll/cpl/sysdm/userprofile.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/dll/cpl/sysdm/licence.c b/reactos/dll/cpl/sysdm/licence.c index 0ee53cc7972..a1a799c70c3 100644 --- a/reactos/dll/cpl/sysdm/licence.c +++ b/reactos/dll/cpl/sysdm/licence.c @@ -9,14 +9,14 @@ #include "precomp.h" -typedef struct _LICINFO +typedef struct _LIC_CONTEXT { HICON hIcon; -} LICINFO, *PLICINFO; +} LIC_CONTEXT, *PLIC_CONTEXT; static BOOL -OnInitDialog(HWND hDlg, PLICINFO pLicInfo) +OnInitDialog(HWND hDlg, PLIC_CONTEXT pLicInfo) { HRSRC hResInfo; HGLOBAL hResMem; @@ -65,16 +65,16 @@ LicenceDlgProc(HWND hDlg, WPARAM wParam, LPARAM lParam) { - PLICINFO pLicInfo; + PLIC_CONTEXT pLicInfo; UNREFERENCED_PARAMETER(lParam); - pLicInfo = (PLICINFO)GetWindowLongPtr(hDlg, DWLP_USER); + pLicInfo = (PLIC_CONTEXT)GetWindowLongPtr(hDlg, DWLP_USER); switch (uMsg) { case WM_INITDIALOG: - pLicInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LICINFO)); + pLicInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LIC_CONTEXT)); if (pLicInfo == NULL) { EndDialog(hDlg, 0); diff --git a/reactos/dll/cpl/sysdm/userprofile.c b/reactos/dll/cpl/sysdm/userprofile.c index 5ac8d7915b1..bad1c5c5079 100644 --- a/reactos/dll/cpl/sysdm/userprofile.c +++ b/reactos/dll/cpl/sysdm/userprofile.c @@ -121,7 +121,7 @@ OnInitDialog(HWND hwndDlg) AddUserProfiles(GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST)); /* Disable the "Delete" and "Copy To" buttons if the user is not an admin */ - if (!IsUserAdmin()) + if (!IsUserAnAdmin()) { EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_DELETE), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), FALSE);