Leaked source code of windows server 2003
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

  1. /*++
  2. Microsoft Confidential
  3. Copyright (c) 1992-1997 Microsoft Corporation
  4. All rights reserved
  5. Module Name:
  6. util.h
  7. Abstract:
  8. Utility functions for System Control Panel Applet
  9. Author:
  10. Eric Flo (ericflo) 19-Jun-1995
  11. Revision History:
  12. 15-Oct-1997 scotthal
  13. Complete overhaul
  14. --*/
  15. #ifndef _SYSDM_UTIL_H_
  16. #define _SYSDM_UTIL_H_
  17. //
  18. // Type definitions
  19. //
  20. typedef enum {
  21. VCREG_OK,
  22. VCREG_READONLY,
  23. VCREG_ERROR,
  24. } VCREG_RET; // Error return codes from opening registry
  25. //
  26. // Public function prototypes
  27. //
  28. void
  29. ErrMemDlg(
  30. IN HWND hParent
  31. );
  32. LPTSTR
  33. SkipWhiteSpace(
  34. IN LPTSTR sz
  35. );
  36. int
  37. StringToInt(
  38. IN LPTSTR sz
  39. );
  40. BOOL
  41. Delnode(
  42. IN LPTSTR lpDir
  43. );
  44. LONG
  45. MyRegSaveKey(
  46. IN HKEY hKey,
  47. LPCTSTR lpSubKey
  48. );
  49. LONG
  50. MyRegLoadKey(
  51. IN HKEY hKey,
  52. IN LPTSTR lpSubKey,
  53. IN LPTSTR lpFile
  54. );
  55. LONG
  56. MyRegUnLoadKey(
  57. IN HKEY hKey,
  58. IN LPTSTR lpSubKey
  59. );
  60. int
  61. GetSelectedItem(
  62. IN HWND hCtrl
  63. );
  64. DWORD
  65. GetMaxPagefileSizeInMB(
  66. INT iDrive
  67. );
  68. int
  69. MsgBoxParam(
  70. IN HWND hWnd,
  71. IN DWORD wText,
  72. IN DWORD wCaption,
  73. IN DWORD wType,
  74. ...
  75. );
  76. DWORD
  77. SetLBWidthEx(
  78. IN HWND hwndLB,
  79. IN LPTSTR szBuffer,
  80. IN DWORD cxCurWidth,
  81. IN DWORD cxExtra
  82. );
  83. void
  84. HourGlass(
  85. IN BOOL bOn
  86. );
  87. VOID
  88. SetDefButton(
  89. IN HWND hwndDlg,
  90. IN int idButton
  91. );
  92. VCREG_RET
  93. OpenRegKey(
  94. IN LPTSTR szKeyName,
  95. OUT PHKEY phkMM
  96. );
  97. LONG CloseRegKey(
  98. IN HKEY hkey
  99. );
  100. UINT
  101. VMGetDriveType(
  102. IN LPCTSTR lpszDrive
  103. );
  104. STDAPI
  105. PathBuildFancyRoot(
  106. LPTSTR szRoot,
  107. UINT cchRoot,
  108. int iDrive);
  109. BOOL
  110. SafeGetListBoxText(
  111. HWND hList,
  112. UINT ulIndex,
  113. LPTSTR pszBuffer,
  114. UINT cchBuffer);
  115. BOOL
  116. SafeGetComboBoxListText(
  117. HWND hCombo,
  118. UINT ulIndex,
  119. LPTSTR pszBuffer,
  120. UINT cchBuffer);
  121. #endif _SYSDM_UTIL_H_