/*++ 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_