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.

522 lines
18 KiB

  1. #ifndef __BOOTINI_H
  2. #define __BOOTINI_H
  3. #endif // __BOOTINI_H
  4. //
  5. // constants / defines / enumerations
  6. //
  7. #define ADD_OFFSET(_p,_o) (PVOID)((PUCHAR)(_p) + (_p)->_o)
  8. //registry path
  9. #define REGISTRY_PATH L"Software\\Microsoft\\Windows\\CurrentVersion\\Setup"
  10. // Error constants
  11. #define ERROR_CONNECT_SERVERNOTFOUND 0xFFFF0001
  12. #define ERROR_CONNECT_LOGINFAIL 0xFFFF0002
  13. #define ERROR_CONNECT_UNKNOWNERROR 0xFFFF0003
  14. #define ERROR_FMT_INVALID_OPTIONVALUE _T( "ERROR: Invalid value specified for the option '%s'.\n" )
  15. #define ERROR_FMT_INVALIDOSENTRY _T( "ERROR: Invalid OS entry line number specified.\nThere are only '%s' OS keys.\n" )
  16. // Exit values
  17. #define EXIT_SUCCESS 0
  18. #define EXIT_FAILURE 1
  19. #define STRING20 20
  20. #define FRIENDLY_NAME_LENGTH 68
  21. // Options
  22. #define CMDOPTION_QUERY _T( "query" )
  23. #define CMDOPTION_COPY _T( "copy" )
  24. #define CMDOPTION_DELETE _T( "delete" )
  25. #define CMDOPTION_USAGE _T( "?|h" )
  26. #define CMDOPTION_DEFAULT _T( "" )
  27. #define CMDOPTION_RAW _T("raw")
  28. #define CMDOPTION_DEFAULTOS _T("default")
  29. #define CMDOPTION_TIMEOUT _T("timeout")
  30. #define CMDOPTION_DEBUG _T("debug")
  31. #define CMDOPTION_EMS _T("ems")
  32. #define CMDOPTION_DBG1394 _T("dbg1394")
  33. #define CMDOPTION_ADDSW _T("addsw")
  34. #define CMDOPTION_RMSW _T("rmsw")
  35. #define CMDOPTION_APPEND _T("a")
  36. #define CMDOPTION_MIRROR _T("mirror")
  37. #define CMDOPTION_CHANNEL _T("ch")
  38. #define CMDOPTION_LIST _T("list")
  39. #define CMDOPTION_ADD _T("add")
  40. #define CMDOPTION_UPDATE _T("update")
  41. #define OPTION_RAW _T("/raw")
  42. #define OPTION_RAW1 _T("-raw")
  43. #define CMDOPTION_CLONE _T("clone")
  44. #define CMDOTHEROPTIONS _T( "s|server|u|user|p|password|description|descrip|defaultos|basevideo|baudrate|debugport|maxmem|nodebug|crashdebug|noserialmice|sos|redirect|on|off|edit" )
  45. #define BAUD_RATE_VALUES_EMS _T("9600|19200|57600|115200")
  46. #define BAUD_RATE_VALUES_DEBUG _T("9600|19200|38400|57600|115200")
  47. #define COM_PORT_RANGE _T("COM1|COM2|COM3|COM4")
  48. #define EMS_PORT_VALUES _T("COM1|COM2|COM3|COM4|BIOSSET")
  49. #define CMDOPTION_DEBUG_VALUES _T("ON|OFF|EDIT")
  50. #define CMDOPTION_EMS_VALUES _T("ON|OFF|EDIT")
  51. #define CMDOPTION_EMS_VALUES_IA64 _T("ON|OFF")
  52. #define DEBUGPORT_1394 _T("/debugport=1394")
  53. #define DEBUGPORT _T("/debugport=")
  54. #define BAUD_TOKEN _T("/baudrate=")
  55. #define TOKEN_CHANNEL _T("/channel")
  56. #define TOKEN_BACKSLASH4 _T("\\\\")
  57. #define TOKEN_BACKSLASH6 _T("\\\\\\")
  58. // Other switches or sub-options
  59. #define SWITCH_SERVER _T( "s" )
  60. #define SWITCH_USER _T( "u" )
  61. #define SWITCH_PASSWORD _T( "p" )
  62. #define SWITCH_TIMEOUT _T( "to" )
  63. #define SWITCH_DEFAULTOS _T( "do" )
  64. #define SWITCH_BASEVIDEO _T( "bv" )
  65. #define SWITCH_DEBUG _T( "dbg" )
  66. #define SWITCH_BAUDRATE _T( "br" )
  67. #define SWITCH_DEBUGPORT _T( "dp" )
  68. #define SWITCH_MAXMEM _T( "mm" )
  69. #define SWITCH_NODEBUG _T( "nd" )
  70. #define SWITCH_CRASHDEBUG _T( "cd" )
  71. #define SWITCH_NOSERIALMICE _T( "ns" )
  72. #define SWITCH_SOS _T( "so" )
  73. #define SWITCH_REDIRECT _T( "re" )
  74. #define SWITCH_DESCRIPTION _T( "d" )
  75. #define SWITCH_RAWSTRING _T("raw")
  76. #define TIMEOUT_SWITCH _T("timeout")
  77. #define SWITCH_PORT _T("port")
  78. #define SWITCH_BAUD _T("baud")
  79. #define SWITCH_NOGUIBOOT _T("ng")
  80. #define SWITCH_UPTDRV _T("upddrv")
  81. #define SWITCH_ID _T("id")
  82. #define SWITCH_EDIT _T("edit")
  83. #define SWITCH_DISK _T("disk")
  84. #define SWITCH_SOURCEGUID _T("sg")
  85. #define SWITCH_TARGETGUID _T("tg")
  86. // Strings
  87. #define OFF_STRING _T( "OFF" )
  88. #define ON_STRING _T( "ON" )
  89. #define COM_STRING _T( "COM" )
  90. #define INIPATH _T( "c:\\boottest.ini" )
  91. #define OPERATINGSYSTEMSECTION _T( "operating systems" )
  92. #define BOOTLOADERSECTION _T( "boot loader" )
  93. #define COL_FRIENDLYNAME GetResString(IDS_COL_FRIENDLYNAME)
  94. #define COL_BOOTID GetResString(IDS_COL_BOOTID)
  95. #define COL_BOOTOPTION GetResString(IDS_COL_COL_BOOTOPTION)
  96. #define COL_ARCPATH GetResString(IDS_COL_ARCPATH)
  97. #define OS_HEADER GetResString(IDS_OS_HEADER)
  98. #define DASHES_OS GetResString(IDS_DASHES_OS)
  99. #define BOOT_HEADER GetResString(IDS_BOOT_HEADER)
  100. #define DASHES_BOOTOS GetResString(IDS_DASHES_BOOTOS)
  101. #define TIMEOUT_VAL GetResString(IDS_TIMEOUT)
  102. #define DEFAULT_OS GetResString(IDS_DEFAULT_OS)
  103. #define DEFAULT_ARC GetResString(IDS_DEFAULT_ARC)
  104. #define COL_FRIENDLYNAME_WIDTH AsLong(GetResString(IDS_COL_FRIENDLYNAME_SIZE),10)
  105. #define COL_BOOTID_WIDTH AsLong(GetResString(IDS_COL_BOOTID_SIZE),10)
  106. #define COL_BOOTOPTION_WIDTH AsLong(GetResString(IDS_COL_BOOTOPTION_SIZE),10)
  107. #define COL_ARC_WIDTH AsLong(GetResString(IDS_COL_ARCPATH_SIZE),10)
  108. #define TIMEOUT_WIDTH AsLong(GetResString(IDS_TIMEOUT_SIZE),10)
  109. #define DEFAULT_ARC_WIDTH AsLong(GetResString(IDS_DEFAULT_ARC_SIZE),10)
  110. #define KEY_DEFAULT _T("default")
  111. #define ONOFFVALUES _T(" on off ")
  112. #define KEY_REDIRECT _T("redirect")
  113. // Typedefs of standard string sizes
  114. typedef TCHAR STRING256 [ 256 ];
  115. #define ID_DEL_HELP_BEGIN IDS_DELETE_HELP_BEGIN
  116. #define ID_DEL_HELP_END IDS_DELETE_HELP_END
  117. #define ID_CHANGE_HELP_BEGIN IDS_CHANGE_HELP_BEGIN
  118. #define ID_CHANGE_HELP_END IDS_CHANGE_HELP_END
  119. #define ID_QUERY_HELP_BEGIN IDS_QUERY_HELP_BEGIN
  120. #define ID_QUERY_HELP_END IDS_QUERY_HELP_END
  121. #define ID_COPY_HELP_BEGIN IDS_COPY_HELP_BEGIN
  122. #define ID_COPY_HELP_END IDS_COPY_HELP_END
  123. #define ID_MAIN_HELP_BEGIN IDS_MAIN_HELP_BEGIN
  124. #define ID_MAIN_HELP_END IDS_MAIN_HELP_END
  125. #define RAW_HELP_BEGIN IDS_RAW_HELP_BEGIN
  126. #define RAW_HELP_END IDS_RAW_HELP_END
  127. #define TIMEOUT_HELP_BEGIN IDS_TIMOUTHELP_BEGIN
  128. #define TIMEOUT_HELP_END IDS_TIMOUTHELP_END
  129. #define DEFAULT_BEGIN IDS_DEFAULT_BEGIN
  130. #define DEFAULT_END IDS_DEFAULT_END
  131. #define ID_MAIN_HELP_BEGIN1 IDS_MAIN_HELP_BEGIN1
  132. #define ID_MAIN_HELP_END1 IDS_MAIN_HELP_END1
  133. #define ID_MAIN_HELP_IA64_BEGIN IDS_MAIN_HELP_IA64_BEGIN
  134. #define ID_MAIN_HELP_IA64_END IDS_MAIN_HELP_IA64_END
  135. #define RAW_HELP_IA64_BEGIN IDS_RAW_HELP_IA64_BEGIN
  136. #define RAW_HELP_IA64_END IDS_RAW_HELP_IA64_END
  137. #define ID_QUERY_HELP64_BEGIN IDS_QUERY_HELP64_BEGIN
  138. #define ID_QUERY_HELP64_END IDS_QUERY_HELP64_END
  139. #define ID_DEL_HELP_IA64_BEGIN IDS_DELETE_HELP_IA64_BEGIN
  140. #define ID_DEL_HELP_IA64_END IDS_DELETE_HELP_IA64_END
  141. #define ID_COPY_HELP_IA64_BEGIN IDS_COPY_HELP_IA64_BEGIN
  142. #define ID_COPY_HELP_IA64_END IDS_COPY_HELP_IA64_END
  143. #define TIMEOUT_HELP_IA64_BEGIN IDS_TIMOUTHELP_IA64_BEGIN
  144. #define TIMEOUT_HELP_IA64_END IDS_TIMOUTHELP_IA64_END
  145. #define DEFAULT_IA64_BEGIN IDS_DEFAULT_IA64_BEGIN
  146. #define DEFAULT_IA64_END IDS_DEFAULT_IA64_END
  147. #define SAFEFREE(pVal) \
  148. FreeMemory((LPVOID *)&pVal);
  149. #define SIZE_OF_ARRAY_IN_CHARS(x) \
  150. GetBufferSize(x)/sizeof(WCHAR)
  151. #define SAFECLOSE(stream) \
  152. if(stream != NULL) \
  153. { \
  154. fclose(stream);\
  155. stream = NULL ; \
  156. }
  157. // function prototypes
  158. // Main functions
  159. DWORD ChangeBootIniSettings(DWORD argc, LPCTSTR argv[]);
  160. DWORD CopyBootIniSettings(DWORD argc, LPCTSTR argv[]);
  161. DWORD DeleteBootIniSettings(DWORD argc, LPCTSTR argv[]);
  162. DWORD QueryBootIniSettings(DWORD argc, LPCTSTR argv[]);
  163. DWORD ChangeTimeOut(DWORD argc,LPCTSTR argv[]);
  164. DWORD ChangeDefaultOs(DWORD argc,LPCTSTR argv[]);
  165. // Function used to get all the keys of a specified section in
  166. // the specified INI file
  167. TARRAY getKeysOfINISection( LPTSTR szinifile, LPTSTR sziniSection );
  168. // Function used to get all the key-value pairs of a specified section in
  169. // the specified INI file
  170. TARRAY getKeyValueOfINISection( LPTSTR szinifile, LPTSTR sziniSection );
  171. // Function used to delete a key from a specifed section of the
  172. // specified ini file
  173. BOOL deleteKeyFromINISection( LPTSTR szkey, LPTSTR szinifile, LPTSTR sziniSection );
  174. // Function used to build the INI string containing all the key-value pairs.
  175. LPTSTR stringFromDynamicArray( TARRAY arrKeyValuePairs );
  176. // Function used to remove a sub-string from a given string
  177. DWORD removeSubString( LPTSTR szString, LPCTSTR szSubString );
  178. // Function used to connect to the specified server with the given credentials
  179. // and return the file pointer of the boot.ini file
  180. BOOL openConnection(LPTSTR server, LPTSTR user,
  181. LPTSTR password, LPTSTR filepath,BOOL bNeedPwd,FILE *stream,PBOOL pbConnFlag);
  182. VOID FormHeader1(BOOL bHeader,TCOLUMNS *ResultHeader);
  183. // Exit function
  184. VOID properExit( DWORD dwExitCode, LPTSTR szFilePath );
  185. // Usage functions
  186. VOID displayChangeUsage();
  187. VOID displayDeleteUsage();
  188. VOID displayQueryUsage();
  189. VOID displayRawUsage_X86();
  190. VOID displayRawUsage_IA64();
  191. DWORD displayMainUsage_X86();
  192. VOID displayMainUsage_IA64();
  193. VOID displayChangeOSUsage_X86();
  194. VOID displayDefaultEntryUsage_IA64();
  195. VOID displayRmSwUsage_X86();
  196. VOID displayAddSwUsage_X86();
  197. VOID displayQueryUsage_IA64();
  198. VOID displayQueryUsage_X86();
  199. VOID displayCopyUsage_IA64();
  200. VOID displayCopyUsage_X86();
  201. VOID displayChangeUsage_IA64();
  202. VOID displayChangeUsage_X86();
  203. VOID displayDeleteUsage_IA64();
  204. VOID displayDeleteUsage_X86();
  205. VOID displayTimeOutUsage_IA64();
  206. VOID displayTimeOutUsage_X86();
  207. VOID displayEmsUsage_X86();
  208. VOID displayDebugUsage_X86();
  209. VOID displayDebugUsage_IA64();
  210. VOID displayEmsUsage_IA64();
  211. VOID displayRmSwUsage_IA64();
  212. VOID displayAddSwUsage_IA64();
  213. VOID displayDbg1394Usage_X86();
  214. VOID displayDbg1394Usage_IA64();
  215. VOID displayMirrorUsage_IA64() ;
  216. //VOID displayListUsage_IA64();
  217. //VOID displayUpdateUsage_IA64();
  218. // Function used to process the main options
  219. DWORD preProcessOptions( DWORD argc, LPCTSTR argv[],
  220. PBOOL pbUsage,
  221. PBOOL pbCopy,
  222. PBOOL pbQuery,
  223. PBOOL pbDelete,
  224. PBOOL pbRawString,
  225. PBOOL pbDefault,
  226. PBOOL pbTimeOut,
  227. PBOOL pbDebug,
  228. PBOOL pbEms,
  229. PBOOL pbAddSw,
  230. PBOOL pbRmSw,
  231. PBOOL pbDbg1394,
  232. PBOOL pbMirror,
  233. PBOOL pbList ,
  234. PBOOL pbUpdate,
  235. PBOOL pbClone
  236. );
  237. BOOL resetFileAttrib( LPTSTR szFilePath );
  238. BOOL stringFromDynamicArray1( TARRAY arrKeyValuePairs ,LPTSTR szFinalStr );
  239. DWORD stringFromDynamicArray2( TARRAY arrKeyValuePairs ,LPTSTR *szFinalStr );
  240. BOOL EnumerateOsEntries(PBOOT_ENTRY_LIST *ntBootEntries,PULONG ulLength );
  241. VOID FormHeader(BOOL bHeader,TCOLUMNS *ResultHeader,BOOL bVerbose);
  242. DWORD AppendRawString( DWORD argc, LPCTSTR argv[] );
  243. DWORD ProcessDebugSwitch( DWORD argc, LPCTSTR argv[] );
  244. DWORD ProcessEmsSwitch( DWORD argc, LPCTSTR argv[] );
  245. VOID GetComPortType(LPTSTR szString,LPTSTR szTemp );
  246. VOID GetBaudRateVal(LPTSTR szString, LPTSTR szTemp);
  247. DWORD getKeysOfSpecifiedINISection( LPTSTR sziniFile, LPTSTR sziniSection,LPCWSTR szKeyName ,LPTSTR szValue );
  248. DWORD ValidateSwitches(PBOOT_ENTRY bootEntry, LPTSTR szNewFriendlyName ,LPTSTR szRawString);
  249. DWORD ProcessAddSwSwitch( DWORD argc, LPCTSTR argv[] );
  250. DWORD ProcessRmSwSwitch( DWORD argc, LPCTSTR argv[] );
  251. DWORD GetSubString(LPTSTR szString,LPTSTR szPartString,LPTSTR szFullString);
  252. DWORD ProcessDbg1394Switch( DWORD argc, LPCTSTR argv[] );
  253. DWORD ProcessListSwitch_IA64( DWORD argc, LPCTSTR argv[] );
  254. BOOL IsWin64(void) ;
  255. DWORD GetCPUInfo(LPTSTR szComputerName);
  256. DWORD CheckSystemType(LPTSTR szServer);
  257. VOID SafeCloseConnection(LPTSTR szServer,BOOL bFlag) ;
  258. LPTSTR DivideToken( LPTSTR szString,LPTSTR szFinalString );
  259. //LPWSTR DivideToken( LPWSTR szString );
  260. #define ERROR_TAG GetResString(IDS_ERROR_TAG)
  261. #define ERROR_LOAD_DLL GetResString(IDS_ERROR_LOAD)
  262. #define ERROR_NO_NVRAM GetResString(IDS_ERROR_NO_NVRAM)
  263. #define ERROR_UNEXPECTED GetResString(IDS_UNEXPECTED_ERROR)
  264. #define ERROR_NO_PRIVILAGE GetResString(IDS_NO_PRIVILAGE)
  265. #define DELETE_SUCCESS GetResString(IDS_DELETE_SUCCESS)
  266. #define DELETE_FAILURE GetResString(IDS_DELETE_FAILURE)
  267. #define IDENTIFIER_VALUE _T("Identifier")
  268. #define SUBKEY _T("HARDWARE\\DESCRIPTION\\SYSTEM\\CENTRALPROCESSOR\\0")
  269. #define IDENTIFIER_VALUE2 _T("SystemPartition")
  270. #define IDENTIFIER_VALUE3 _T("OsLoaderPath")
  271. #define X86_MACHINE _T("x86")
  272. #define SYSTEM_64_BIT 2
  273. #define SYSTEM_32_BIT 3
  274. #define ERROR_RETREIVE_REGISTRY 4
  275. #define NODEBUG_SWITCH _T("/nodebug")
  276. #define BASEVIDEO_SWITCH _T("/basevideo")
  277. #define DEBUG_SWITCH _T("/debug")
  278. #define DEBUG_SWITCH1 _T("/DEBUG")
  279. #define COM_SWITCH _T("COM")
  280. #define CRASHDEBUG_SWITCH _T("/crashdebug")
  281. #define SOS_SWITCH _T("/sos")
  282. #define REDIRECT_SWITCH _T("/redirect")
  283. #define OS_FIELD _T( "operating systems" )
  284. #define SOS_VALUE _T("/sos")
  285. #define NOGUI_VALUE _T("/noguiboot")
  286. #define BASEVIDEO_VALUE _T("/basevideo")
  287. #define MAXMEM_VALUE _T("/MAXMEM")
  288. #define MAXMEM_VALUE1 _T("/maxmem")
  289. #define NTDLL_FIELD _T("\\ntdll.dll")
  290. #define TOKEN_EQUAL _T("=")
  291. #define TOKEN_BACKSLASH _T("\"")
  292. #define TOKEN_BRACKET _T('[')
  293. #define TOKEN_DELIM _T('\0')
  294. #define TOKEN_EMPTYSPACE _T(" ")
  295. #define TOKEN_SINGLEQUOTE _T("\"")
  296. #define TOKEN_BACKSLASH4 _T("\\\\")
  297. #define TOKEN_BACKSLASH2 _T("\\")
  298. #define TOKEN_FWDSLASH1 _T("/")
  299. #define TOKEN_C_DOLLAR _T("C$")
  300. #define TOKEN_STAR _T("*")
  301. #define TOKEN_BOOTINI_PATH _T("boot.ini")
  302. #define TOKEN_DOLLAR _T('$')
  303. #define TOKEN_PATH _T("c:\\boot.ini")
  304. #define TOKEN_COLON _T(':')
  305. #define TOKEN_COLONSYMBOL _T(":")
  306. #define TOKEN_50SPACES _T(" ")
  307. #define TOKEN_1394 _T("1394")
  308. #define TOKEN_NA _T("N/A")
  309. #define TOKEN_NEXTLINE _T("\n")
  310. #define MAX_COLUMNS 4
  311. #define TIMEOUT_MAX 999
  312. #define TIMEOUT_MIN 0
  313. #define READ_MODE _T("r")
  314. #define READWRITE_MODE _T("r+")
  315. #define BOOT_COLUMNS 2
  316. #define COL0 0
  317. #define COL1 1
  318. #define COL2 2
  319. #define COL3 3
  320. #define TABLE_FORMAT GetResString(IDS_FORMAT_TABLE)
  321. #define LIST_FORMAT GetResString(IDS_FORMAT_LIST)
  322. #define CSV_FORMAT GetResString(IDS_FORMAT_CSV)
  323. #define MAX_INI_LENGTH 2500
  324. #define MAX_STRING_LENGTH1 5000
  325. #define ON_OFF_EDIT _T("ON|OFF|EDIT")
  326. #define TOKEN_DEBUGPORT _T("/debugport")
  327. #define PORT_COM1 _T("/debugport=com1")
  328. #define PORT_COM2 _T("/debugport=com2")
  329. #define PORT_COM3 _T("/debugport=com3")
  330. #define PORT_COM4 _T("/debugport=com4")
  331. #define PORT_1394 _T("/debugport=1394")
  332. #define BAUD_VAL6 _T("/baudrate=19200")
  333. #define BAUD_VAL7 _T("/baudrate=38400")
  334. #define BAUD_VAL8 _T("/baudrate=57600")
  335. #define BAUD_VAL9 _T("/baudrate=115200")
  336. #define BAUD_VAL10 _T("/baudrate=9600")
  337. #define BAUD_RATE _T("/baudrate")
  338. #define REDIRECT _T("/redirect")
  339. #define VALUE_OFF _T("off")
  340. #define VALUE_ON _T("on")
  341. #define EDIT_STRING _T("EDIT")
  342. #define KEY_BAUDRATE _T("redirectbaudrate")
  343. #define USEBIOSSET _T("biosset")
  344. #define USEBIOSSETTINGS _T("USEBIOSSETTINGS")
  345. #define ERROR_PROFILE_STRING _T("ERROR:")
  346. #define ERROR_PROFILE_STRING1 _T("")
  347. #define REDIRECT_STRING _T("redirect")
  348. #define BAUDRATE_STRING _T("redirectbaudrate")
  349. #define MAX_BOOTID_VAL 20
  350. #define STRING255 255
  351. #define STRING10 10
  352. #define DRIVE_C 'C'
  353. #define DRIVE_D 'D'
  354. #define DRIVE_E 'E'
  355. #define DRIVE_F 'F'
  356. #define DRIVE_G 'G'
  357. #define DRIVE_H 'H'
  358. #define DRIVE_I 'I'
  359. #define DRIVE_J 'J'
  360. #define DRIVE_K 'K'
  361. #define DRIVE_L 'L'
  362. #define DRIVE_M 'M'
  363. #define DRIVE_N 'N'
  364. #define DRIVE_O 'O'
  365. #define DRIVE_P 'P'
  366. #define DRIVE_Q 'Q'
  367. #define DRIVE_R 'R'
  368. #define DRIVE_S 'S'
  369. #define DRIVE_T 'T'
  370. #define DRIVE_U 'U'
  371. #define DRIVE_V 'V'
  372. #define DRIVE_W 'W'
  373. #define DRIVE_X 'X'
  374. #define DRIVE_Y 'Y'
  375. #define DRIVE_Z 'Z'
  376. #define OI_SERVER 1
  377. #define OI_USER 2
  378. #define OI_PASSWORD 3
  379. //global variable to store attributes
  380. DWORD g_dwAttributes;
  381. DWORD IsAdminGroup( BOOL *bAdmin );
  382. BOOL GetTokenHandle(OUT PHANDLE hTokenHandle);
  383. BOOL CheckAdminAccess( LPCTSTR pszMachine );