mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
158 lines
1.8 KiB
158 lines
1.8 KiB
/*++
|
|
|
|
Microsoft Confidential
|
|
Copyright (c) 1992-1997 Microsoft Corporation
|
|
All rights reserved
|
|
|
|
Module Name:
|
|
|
|
util.h
|
|
|
|
Abstract:
|
|
|
|
Utility functions for System Control Panel Applet
|
|
|
|
Author:
|
|
|
|
Eric Flo (ericflo) 19-Jun-1995
|
|
|
|
Revision History:
|
|
|
|
15-Oct-1997 scotthal
|
|
Complete overhaul
|
|
|
|
--*/
|
|
#ifndef _SYSDM_UTIL_H_
|
|
#define _SYSDM_UTIL_H_
|
|
|
|
//
|
|
// Type definitions
|
|
//
|
|
typedef enum {
|
|
VCREG_OK,
|
|
VCREG_READONLY,
|
|
VCREG_ERROR,
|
|
} VCREG_RET; // Error return codes from opening registry
|
|
|
|
//
|
|
// Public function prototypes
|
|
//
|
|
void
|
|
ErrMemDlg(
|
|
IN HWND hParent
|
|
);
|
|
|
|
LPTSTR
|
|
SkipWhiteSpace(
|
|
IN LPTSTR sz
|
|
);
|
|
|
|
int
|
|
StringToInt(
|
|
IN LPTSTR sz
|
|
);
|
|
|
|
void
|
|
IntToString(
|
|
IN INT i,
|
|
OUT LPTSTR sz
|
|
);
|
|
|
|
LPTSTR
|
|
CheckSlash(
|
|
IN LPTSTR lpDir
|
|
);
|
|
|
|
BOOL
|
|
Delnode(
|
|
IN LPTSTR lpDir
|
|
);
|
|
|
|
LONG
|
|
MyRegSaveKey(
|
|
IN HKEY hKey,
|
|
LPCTSTR lpSubKey
|
|
);
|
|
|
|
UINT
|
|
CreateNestedDirectory(
|
|
IN LPCTSTR lpDirectory,
|
|
IN LPSECURITY_ATTRIBUTES lpSecurityAttributes
|
|
);
|
|
|
|
LONG
|
|
MyRegLoadKey(
|
|
IN HKEY hKey,
|
|
IN LPTSTR lpSubKey,
|
|
IN LPTSTR lpFile
|
|
);
|
|
|
|
LONG
|
|
MyRegUnLoadKey(
|
|
IN HKEY hKey,
|
|
IN LPTSTR lpSubKey
|
|
);
|
|
|
|
int
|
|
GetSelectedItem(
|
|
IN HWND hCtrl
|
|
);
|
|
|
|
BOOL
|
|
IsUserAdmin(
|
|
VOID
|
|
);
|
|
|
|
DWORD
|
|
GetMaxPagefileSizeInMB(
|
|
INT iDrive
|
|
);
|
|
|
|
int
|
|
MsgBoxParam(
|
|
IN HWND hWnd,
|
|
IN DWORD wText,
|
|
IN DWORD wCaption,
|
|
IN DWORD wType,
|
|
...
|
|
);
|
|
|
|
LPTSTR
|
|
CloneString(
|
|
IN LPTSTR pszSrc
|
|
);
|
|
|
|
DWORD
|
|
SetLBWidthEx(
|
|
IN HWND hwndLB,
|
|
IN LPTSTR szBuffer,
|
|
IN DWORD cxCurWidth,
|
|
IN DWORD cxExtra
|
|
);
|
|
|
|
void
|
|
HourGlass(
|
|
IN BOOL bOn
|
|
);
|
|
|
|
VOID
|
|
SetDefButton(
|
|
IN HWND hwndDlg,
|
|
IN int idButton
|
|
);
|
|
|
|
VCREG_RET
|
|
OpenRegKey(
|
|
IN LPTSTR szKeyName,
|
|
OUT PHKEY phkMM
|
|
);
|
|
|
|
LONG CloseRegKey(
|
|
IN HKEY hkey
|
|
);
|
|
|
|
BOOL
|
|
IsWorkstationProduct(
|
|
);
|
|
|
|
#endif _SYSDM_UTIL_H_
|