Source code of Windows XP (NT5)
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

  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. void
  41. IntToString(
  42. IN INT i,
  43. OUT LPTSTR sz
  44. );
  45. LPTSTR
  46. CheckSlash(
  47. IN LPTSTR lpDir
  48. );
  49. BOOL
  50. Delnode(
  51. IN LPTSTR lpDir
  52. );
  53. LONG
  54. MyRegSaveKey(
  55. IN HKEY hKey,
  56. LPCTSTR lpSubKey
  57. );
  58. UINT
  59. CreateNestedDirectory(
  60. IN LPCTSTR lpDirectory,
  61. IN LPSECURITY_ATTRIBUTES lpSecurityAttributes
  62. );
  63. LONG
  64. MyRegLoadKey(
  65. IN HKEY hKey,
  66. IN LPTSTR lpSubKey,
  67. IN LPTSTR lpFile
  68. );
  69. LONG
  70. MyRegUnLoadKey(
  71. IN HKEY hKey,
  72. IN LPTSTR lpSubKey
  73. );
  74. int
  75. GetSelectedItem(
  76. IN HWND hCtrl
  77. );
  78. BOOL
  79. IsUserAdmin(
  80. VOID
  81. );
  82. DWORD
  83. GetMaxPagefileSizeInMB(
  84. INT iDrive
  85. );
  86. int
  87. MsgBoxParam(
  88. IN HWND hWnd,
  89. IN DWORD wText,
  90. IN DWORD wCaption,
  91. IN DWORD wType,
  92. ...
  93. );
  94. LPTSTR
  95. CloneString(
  96. IN LPTSTR pszSrc
  97. );
  98. DWORD
  99. SetLBWidthEx(
  100. IN HWND hwndLB,
  101. IN LPTSTR szBuffer,
  102. IN DWORD cxCurWidth,
  103. IN DWORD cxExtra
  104. );
  105. void
  106. HourGlass(
  107. IN BOOL bOn
  108. );
  109. VOID
  110. SetDefButton(
  111. IN HWND hwndDlg,
  112. IN int idButton
  113. );
  114. VCREG_RET
  115. OpenRegKey(
  116. IN LPTSTR szKeyName,
  117. OUT PHKEY phkMM
  118. );
  119. LONG CloseRegKey(
  120. IN HKEY hkey
  121. );
  122. BOOL
  123. IsWorkstationProduct(
  124. );
  125. #endif _SYSDM_UTIL_H_