- 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
This commit is contained in:
Colin Finck 2008-05-15 14:33:33 +00:00
parent 5961c78fbd
commit d2bc8a879f
2 changed files with 7 additions and 7 deletions

View file

@ -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);

View file

@ -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);