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.

163 lines
5.9 KiB

  1. ////////////////////////////////////////////////////////////////
  2. //
  3. // Refgp.h
  4. //
  5. // Refresh Group Policy exe
  6. //
  7. //
  8. ////////////////////////////////////////////////////////////////
  9. #ifndef RC_INVOKED
  10. #include <nt.h>
  11. #include <ntrtl.h>
  12. #include <nturtl.h>
  13. #endif
  14. #include <windows.h>
  15. #include <lm.h>
  16. #define SECURITY_WIN32
  17. #include <tchar.h>
  18. #include <stdio.h>
  19. #include <shlobj.h>
  20. #include <shellapi.h>
  21. #include <shlwapi.h>
  22. #include "userenv.h"
  23. #include "userenvp.h"
  24. #include <strsafe.h>
  25. #define IDS_USAGE_FIRST 101
  26. #define IDS_USAGE1 101
  27. #define IDS_USAGE2 102
  28. #define IDS_USAGE3 103
  29. #define IDS_USAGE4 104
  30. #define IDS_USAGE5 105
  31. #define IDS_USAGE6 106
  32. #define IDS_USAGE7 107
  33. #define IDS_USAGE8 108
  34. #define IDS_USAGE9 109
  35. #define IDS_USAGE10 110
  36. #define IDS_USAGE11 111
  37. #define IDS_USAGE12 112
  38. #define IDS_USAGE13 113
  39. #define IDS_USAGE14 114
  40. #define IDS_USAGE15 115
  41. #define IDS_USAGE16 116
  42. #define IDS_USAGE17 117
  43. #define IDS_USAGE18 118
  44. #define IDS_USAGE19 119
  45. #define IDS_USAGE20 120
  46. #define IDS_USAGE21 121
  47. #define IDS_USAGE22 122
  48. #define IDS_USAGE23 123
  49. #define IDS_USAGE24 124
  50. #define IDS_USAGE25 125
  51. #define IDS_USAGE26 126
  52. #define IDS_USAGE27 127
  53. #define IDS_USAGE28 128
  54. #define IDS_USAGE29 129
  55. #define IDS_USAGE30 130
  56. #define IDS_USAGE31 131
  57. #define IDS_USAGE32 132
  58. #define IDS_USAGE33 133
  59. #define IDS_USAGE34 134
  60. #define IDS_USAGE35 135
  61. #define IDS_USAGE36 136
  62. #define IDS_USAGE37 137
  63. #define IDS_USAGE38 138
  64. #define IDS_USAGE39 139
  65. #define IDS_USAGE40 140
  66. #define IDS_USAGE41 141
  67. #define IDS_USAGE42 142
  68. #define IDS_USAGE43 143
  69. #define IDS_USAGE44 144
  70. #define IDS_USAGE45 145
  71. #define IDS_USAGE46 146
  72. #define IDS_USAGE_LAST 146
  73. #define IDS_REFRESH_LAUNCHED 201
  74. #define IDS_REFRESH_FAILED_USER 202
  75. #define IDS_POLWAIT_FAILED_USER 203
  76. #define IDS_POLWAIT_TIMEDOUT_USER 204
  77. #define IDS_REFRESH_BACKGND_SUCCESS_USER 205
  78. #define IDS_NEED_LOGOFF 206
  79. #define IDS_NEED_REBOOT 207
  80. #define IDS_PROMPT_REBOOT 208
  81. #define IDS_PROMPT_LOGOFF 209
  82. #define IDS_YES 210
  83. #define IDS_NO 211
  84. #define IDS_REFRESH_POLICY_FAILED 212
  85. #define IDS_COULDNT_REBOOT 213
  86. #define IDS_COULDNT_LOGOFF 214
  87. #define IDS_NOTIFY_MACHINE_FG 215
  88. #define IDS_NOTIFY_USER_FG 216
  89. #define IDS_REBOOTING 217
  90. #define IDS_LOGGING_OFF 218
  91. #define IDS_OUT_OF_MEMORY 219
  92. #define IDS_REFRESH_BACKGND_TRIGGERED_USER 220
  93. #define IDS_SPACE 221
  94. #define IDS_SET_MODE_FAILED 222
  95. #define IDS_NEED_LOGOFF_SYNC 223
  96. #define IDS_NEED_REBOOT_SYNC 224
  97. #define IDS_LOOK_EVENT_LOG 225
  98. #define IDS_TARGET 301
  99. #define IDS_USER 302
  100. #define IDS_MACHINE 303
  101. #define IDS_BOTH 304
  102. #define IDS_TIME 305
  103. #define IDS_FORCE 306
  104. #define IDS_LOGOFF 307
  105. #define IDS_BOOT 308
  106. #define IDS_SYNC 309
  107. #define IDS_REFRESH_FAILED_COMPUTER 310
  108. #define IDS_POLWAIT_FAILED_COMPUTER 311
  109. #define IDS_POLWAIT_TIMEDOUT_COMPUTER 312
  110. #define IDS_REFRESH_BACKGND_SUCCESS_COMPUTER 313
  111. #define IDS_REFRESH_BACKGND_TRIGGERED_COMPUTER 314
  112. #include <stdio.h>
  113. #include <locale.h>
  114. #include <winnlsp.h>
  115. #ifdef __cplusplus
  116. extern "C" {
  117. #endif
  118. LPTSTR GetSidString(HANDLE UserToken);
  119. VOID DeleteSidString(LPTSTR SidString);
  120. PSID GetUserSid (HANDLE UserToken);
  121. VOID DeleteUserSid(PSID Sid);
  122. NTSTATUS AllocateAndInitSidFromString (const WCHAR* lpszSidStr, PSID* ppSid);
  123. NTSTATUS LoadSidAuthFromString (const WCHAR* pString, PSID_IDENTIFIER_AUTHORITY pSidAuth);
  124. NTSTATUS GetIntFromUnicodeString (const WCHAR* szNum, ULONG Base, PULONG pValue);
  125. #define COMPUTER_TARGET 0
  126. #define USER_TARGET 1
  127. #define REFRESH_ID(x,y) (REFRESH_STATUS_IDS[x][y])
  128. #ifdef __cplusplus
  129. }
  130. #endif