mirror of
https://github.com/reactos/reactos.git
synced 2025-06-23 23:40:18 +00:00
- 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:
parent
5961c78fbd
commit
d2bc8a879f
2 changed files with 7 additions and 7 deletions
|
@ -9,14 +9,14 @@
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "precomp.h"
|
||||||
|
|
||||||
typedef struct _LICINFO
|
typedef struct _LIC_CONTEXT
|
||||||
{
|
{
|
||||||
HICON hIcon;
|
HICON hIcon;
|
||||||
} LICINFO, *PLICINFO;
|
} LIC_CONTEXT, *PLIC_CONTEXT;
|
||||||
|
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
OnInitDialog(HWND hDlg, PLICINFO pLicInfo)
|
OnInitDialog(HWND hDlg, PLIC_CONTEXT pLicInfo)
|
||||||
{
|
{
|
||||||
HRSRC hResInfo;
|
HRSRC hResInfo;
|
||||||
HGLOBAL hResMem;
|
HGLOBAL hResMem;
|
||||||
|
@ -65,16 +65,16 @@ LicenceDlgProc(HWND hDlg,
|
||||||
WPARAM wParam,
|
WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
PLICINFO pLicInfo;
|
PLIC_CONTEXT pLicInfo;
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
pLicInfo = (PLICINFO)GetWindowLongPtr(hDlg, DWLP_USER);
|
pLicInfo = (PLIC_CONTEXT)GetWindowLongPtr(hDlg, DWLP_USER);
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
pLicInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LICINFO));
|
pLicInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LIC_CONTEXT));
|
||||||
if (pLicInfo == NULL)
|
if (pLicInfo == NULL)
|
||||||
{
|
{
|
||||||
EndDialog(hDlg, 0);
|
EndDialog(hDlg, 0);
|
||||||
|
|
|
@ -121,7 +121,7 @@ OnInitDialog(HWND hwndDlg)
|
||||||
AddUserProfiles(GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST));
|
AddUserProfiles(GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST));
|
||||||
|
|
||||||
/* Disable the "Delete" and "Copy To" buttons if the user is not an admin */
|
/* 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_DELETE), FALSE);
|
||||||
EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), FALSE);
|
EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), FALSE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue