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.
152 lines
2.0 KiB
152 lines
2.0 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
|
|
);
|
|
|
|
BOOL
|
|
Delnode(
|
|
IN LPTSTR lpDir
|
|
);
|
|
|
|
LONG
|
|
MyRegSaveKey(
|
|
IN HKEY hKey,
|
|
LPCTSTR lpSubKey
|
|
);
|
|
|
|
LONG
|
|
MyRegLoadKey(
|
|
IN HKEY hKey,
|
|
IN LPTSTR lpSubKey,
|
|
IN LPTSTR lpFile
|
|
);
|
|
|
|
LONG
|
|
MyRegUnLoadKey(
|
|
IN HKEY hKey,
|
|
IN LPTSTR lpSubKey
|
|
);
|
|
|
|
int
|
|
GetSelectedItem(
|
|
IN HWND hCtrl
|
|
);
|
|
|
|
DWORD
|
|
GetMaxPagefileSizeInMB(
|
|
INT iDrive
|
|
);
|
|
|
|
int
|
|
MsgBoxParam(
|
|
IN HWND hWnd,
|
|
IN DWORD wText,
|
|
IN DWORD wCaption,
|
|
IN DWORD wType,
|
|
...
|
|
);
|
|
|
|
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
|
|
);
|
|
|
|
UINT
|
|
VMGetDriveType(
|
|
IN LPCTSTR lpszDrive
|
|
);
|
|
|
|
STDAPI
|
|
PathBuildFancyRoot(
|
|
LPTSTR szRoot,
|
|
UINT cchRoot,
|
|
int iDrive);
|
|
|
|
BOOL
|
|
SafeGetListBoxText(
|
|
HWND hList,
|
|
UINT ulIndex,
|
|
LPTSTR pszBuffer,
|
|
UINT cchBuffer);
|
|
|
|
BOOL
|
|
SafeGetComboBoxListText(
|
|
HWND hCombo,
|
|
UINT ulIndex,
|
|
LPTSTR pszBuffer,
|
|
UINT cchBuffer);
|
|
|
|
#endif _SYSDM_UTIL_H_
|