home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / RTLWIN32.PAK / WINREG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  14.0 KB  |  782 lines

  1. /*++ BUILD Version: 0001    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1991-1996 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     Winreg.h
  8.  
  9. Abstract:
  10.  
  11.     This module contains the function prototypes and constant, type and
  12.     structure definitions for the Windows 32-Bit Registry API.
  13.  
  14. --*/
  15.  
  16. #ifndef _WINREG_
  17. #define _WINREG_
  18. #pragma option -b
  19.  
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. #ifndef WINVER
  26. #define WINVER 0x0400   // version 4.0
  27. #endif /* !WINVER */
  28.  
  29. //
  30. // Requested Key access mask type.
  31. //
  32.  
  33. typedef ACCESS_MASK REGSAM;
  34.  
  35. //
  36. // Type definitions.
  37. //
  38.  
  39. DECLARE_HANDLE(HKEY);
  40. typedef HKEY *PHKEY;
  41.  
  42. //
  43. // Reserved Key Handles.
  44. //
  45.  
  46. #define HKEY_CLASSES_ROOT           (( HKEY ) 0x80000000 )
  47. #define HKEY_CURRENT_USER           (( HKEY ) 0x80000001 )
  48. #define HKEY_LOCAL_MACHINE          (( HKEY ) 0x80000002 )
  49. #define HKEY_USERS                  (( HKEY ) 0x80000003 )
  50. #define HKEY_PERFORMANCE_DATA       (( HKEY ) 0x80000004 )
  51. #if(WINVER >= 0x0400)
  52. #define HKEY_CURRENT_CONFIG         (( HKEY ) 0x80000005 )
  53. #define HKEY_DYN_DATA               (( HKEY ) 0x80000006 )
  54.  
  55. /*NOINC*/
  56. #ifndef _PROVIDER_STRUCTS_DEFINED
  57. #define _PROVIDER_STRUCTS_DEFINED
  58.  
  59. #define PROVIDER_KEEPS_VALUE_LENGTH 0x1
  60. struct val_context {
  61.     int valuelen;       // the total length of this value
  62.     LPVOID value_context;   // provider's context
  63.     LPVOID val_buff_ptr;    // where in the ouput buffer the value is.
  64. };
  65.  
  66. typedef struct val_context FAR *PVALCONTEXT;
  67.  
  68. typedef struct pvalueA {           // Provider supplied value/context.
  69.     LPSTR   pv_valuename;          // The value name pointer
  70.     int pv_valuelen;
  71.     LPVOID pv_value_context;
  72.     DWORD pv_type;
  73. }PVALUEA, FAR *PPVALUEA;
  74. typedef struct pvalueW {           // Provider supplied value/context.
  75.     LPWSTR  pv_valuename;          // The value name pointer
  76.     int pv_valuelen;
  77.     LPVOID pv_value_context;
  78.     DWORD pv_type;
  79. }PVALUEW, FAR *PPVALUEW;
  80. #ifdef UNICODE
  81. typedef PVALUEW PVALUE;
  82. typedef PPVALUEW PPVALUE;
  83. #else
  84. typedef PVALUEA PVALUE;
  85. typedef PPVALUEA PPVALUE;
  86. #endif // UNICODE
  87.  
  88. typedef
  89. DWORD _cdecl
  90. QUERYHANDLER (LPVOID keycontext, PVALCONTEXT val_list, DWORD num_vals,
  91.           LPVOID outputbuffer, DWORD FAR *total_outlen, DWORD input_blen);
  92.  
  93. typedef QUERYHANDLER FAR *PQUERYHANDLER;
  94.  
  95. typedef struct provider_info {
  96.     PQUERYHANDLER pi_R0_1val;
  97.     PQUERYHANDLER pi_R0_allvals;
  98.     PQUERYHANDLER pi_R3_1val;
  99.     PQUERYHANDLER pi_R3_allvals;
  100.     DWORD pi_flags;    // capability flags (none defined yet).
  101.     LPVOID pi_key_context;
  102. }REG_PROVIDER;
  103.  
  104. typedef struct provider_info FAR *PPROVIDER;
  105.  
  106. typedef struct value_entA {
  107.     LPSTR   ve_valuename;
  108.     DWORD ve_valuelen;
  109.     DWORD ve_valueptr;
  110.     DWORD ve_type;
  111. }VALENTA, FAR *PVALENTA;
  112. typedef struct value_entW {
  113.     LPWSTR  ve_valuename;
  114.     DWORD ve_valuelen;
  115.     DWORD ve_valueptr;
  116.     DWORD ve_type;
  117. }VALENTW, FAR *PVALENTW;
  118. #ifdef UNICODE
  119. typedef VALENTW VALENT;
  120. typedef PVALENTW PVALENT;
  121. #else
  122. typedef VALENTA VALENT;
  123. typedef PVALENTA PVALENT;
  124. #endif // UNICODE
  125.  
  126. #endif // not(_PROVIDER_STRUCTS_DEFINED)
  127. /*INC*/
  128.  
  129. #endif /* WINVER >= 0x0400 */
  130.  
  131. //
  132. // Default values for parameters that do not exist in the Win 3.1
  133. // compatible APIs.
  134. //
  135.  
  136. #define WIN31_CLASS                 NULL
  137.  
  138. //
  139. // API Prototypes.
  140. //
  141.  
  142.  
  143. WINADVAPI
  144. LONG
  145. APIENTRY
  146. RegCloseKey (
  147.     HKEY hKey
  148.     );
  149.  
  150. WINADVAPI
  151. LONG
  152. APIENTRY
  153. RegConnectRegistryA (
  154.     LPSTR lpMachineName,
  155.     HKEY hKey,
  156.     PHKEY phkResult
  157.     );
  158. WINADVAPI
  159. LONG
  160. APIENTRY
  161. RegConnectRegistryW (
  162.     LPWSTR lpMachineName,
  163.     HKEY hKey,
  164.     PHKEY phkResult
  165.     );
  166. #ifdef UNICODE
  167. #define RegConnectRegistry  RegConnectRegistryW
  168. #else
  169. #define RegConnectRegistry  RegConnectRegistryA
  170. #endif // !UNICODE
  171.  
  172. WINADVAPI
  173. LONG
  174. APIENTRY
  175. RegCreateKeyA (
  176.     HKEY hKey,
  177.     LPCSTR lpSubKey,
  178.     PHKEY phkResult
  179.     );
  180. WINADVAPI
  181. LONG
  182. APIENTRY
  183. RegCreateKeyW (
  184.     HKEY hKey,
  185.     LPCWSTR lpSubKey,
  186.     PHKEY phkResult
  187.     );
  188. #ifdef UNICODE
  189. #define RegCreateKey  RegCreateKeyW
  190. #else
  191. #define RegCreateKey  RegCreateKeyA
  192. #endif // !UNICODE
  193.  
  194. WINADVAPI
  195. LONG
  196. APIENTRY
  197. RegCreateKeyExA (
  198.     HKEY hKey,
  199.     LPCSTR lpSubKey,
  200.     DWORD Reserved,
  201.     LPSTR lpClass,
  202.     DWORD dwOptions,
  203.     REGSAM samDesired,
  204.     LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  205.     PHKEY phkResult,
  206.     LPDWORD lpdwDisposition
  207.     );
  208. WINADVAPI
  209. LONG
  210. APIENTRY
  211. RegCreateKeyExW (
  212.     HKEY hKey,
  213.     LPCWSTR lpSubKey,
  214.     DWORD Reserved,
  215.     LPWSTR lpClass,
  216.     DWORD dwOptions,
  217.     REGSAM samDesired,
  218.     LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  219.     PHKEY phkResult,
  220.     LPDWORD lpdwDisposition
  221.     );
  222. #ifdef UNICODE
  223. #define RegCreateKeyEx  RegCreateKeyExW
  224. #else
  225. #define RegCreateKeyEx  RegCreateKeyExA
  226. #endif // !UNICODE
  227.  
  228. WINADVAPI
  229. LONG
  230. APIENTRY
  231. RegDeleteKeyA (
  232.     HKEY hKey,
  233.     LPCSTR lpSubKey
  234.     );
  235. WINADVAPI
  236. LONG
  237. APIENTRY
  238. RegDeleteKeyW (
  239.     HKEY hKey,
  240.     LPCWSTR lpSubKey
  241.     );
  242. #ifdef UNICODE
  243. #define RegDeleteKey  RegDeleteKeyW
  244. #else
  245. #define RegDeleteKey  RegDeleteKeyA
  246. #endif // !UNICODE
  247.  
  248. WINADVAPI
  249. LONG
  250. APIENTRY
  251. RegDeleteValueA (
  252.     HKEY hKey,
  253.     LPCSTR lpValueName
  254.     );
  255. WINADVAPI
  256. LONG
  257. APIENTRY
  258. RegDeleteValueW (
  259.     HKEY hKey,
  260.     LPCWSTR lpValueName
  261.     );
  262. #ifdef UNICODE
  263. #define RegDeleteValue  RegDeleteValueW
  264. #else
  265. #define RegDeleteValue  RegDeleteValueA
  266. #endif // !UNICODE
  267.  
  268. WINADVAPI
  269. LONG
  270. APIENTRY
  271. RegEnumKeyA (
  272.     HKEY hKey,
  273.     DWORD dwIndex,
  274.     LPSTR lpName,
  275.     DWORD cbName
  276.     );
  277. WINADVAPI
  278. LONG
  279. APIENTRY
  280. RegEnumKeyW (
  281.     HKEY hKey,
  282.     DWORD dwIndex,
  283.     LPWSTR lpName,
  284.     DWORD cbName
  285.     );
  286. #ifdef UNICODE
  287. #define RegEnumKey  RegEnumKeyW
  288. #else
  289. #define RegEnumKey  RegEnumKeyA
  290. #endif // !UNICODE
  291.  
  292. WINADVAPI
  293. LONG
  294. APIENTRY
  295. RegEnumKeyExA (
  296.     HKEY hKey,
  297.     DWORD dwIndex,
  298.     LPSTR lpName,
  299.     LPDWORD lpcbName,
  300.     LPDWORD lpReserved,
  301.     LPSTR lpClass,
  302.     LPDWORD lpcbClass,
  303.     PFILETIME lpftLastWriteTime
  304.     );
  305. WINADVAPI
  306. LONG
  307. APIENTRY
  308. RegEnumKeyExW (
  309.     HKEY hKey,
  310.     DWORD dwIndex,
  311.     LPWSTR lpName,
  312.     LPDWORD lpcbName,
  313.     LPDWORD lpReserved,
  314.     LPWSTR lpClass,
  315.     LPDWORD lpcbClass,
  316.     PFILETIME lpftLastWriteTime
  317.     );
  318. #ifdef UNICODE
  319. #define RegEnumKeyEx  RegEnumKeyExW
  320. #else
  321. #define RegEnumKeyEx  RegEnumKeyExA
  322. #endif // !UNICODE
  323.  
  324. WINADVAPI
  325. LONG
  326. APIENTRY
  327. RegEnumValueA (
  328.     HKEY hKey,
  329.     DWORD dwIndex,
  330.     LPSTR lpValueName,
  331.     LPDWORD lpcbValueName,
  332.     LPDWORD lpReserved,
  333.     LPDWORD lpType,
  334.     LPBYTE lpData,
  335.     LPDWORD lpcbData
  336.     );
  337. WINADVAPI
  338. LONG
  339. APIENTRY
  340. RegEnumValueW (
  341.     HKEY hKey,
  342.     DWORD dwIndex,
  343.     LPWSTR lpValueName,
  344.     LPDWORD lpcbValueName,
  345.     LPDWORD lpReserved,
  346.     LPDWORD lpType,
  347.     LPBYTE lpData,
  348.     LPDWORD lpcbData
  349.     );
  350. #ifdef UNICODE
  351. #define RegEnumValue  RegEnumValueW
  352. #else
  353. #define RegEnumValue  RegEnumValueA
  354. #endif // !UNICODE
  355.  
  356. WINADVAPI
  357. LONG
  358. APIENTRY
  359. RegFlushKey (
  360.     HKEY hKey
  361.     );
  362.  
  363. WINADVAPI
  364. LONG
  365. APIENTRY
  366. RegGetKeySecurity (
  367.     HKEY hKey,
  368.     SECURITY_INFORMATION SecurityInformation,
  369.     PSECURITY_DESCRIPTOR pSecurityDescriptor,
  370.     LPDWORD lpcbSecurityDescriptor
  371.     );
  372.  
  373. WINADVAPI
  374. LONG
  375. APIENTRY
  376. RegLoadKeyA (
  377.     HKEY    hKey,
  378.     LPCSTR  lpSubKey,
  379.     LPCSTR  lpFile
  380.     );
  381. WINADVAPI
  382. LONG
  383. APIENTRY
  384. RegLoadKeyW (
  385.     HKEY    hKey,
  386.     LPCWSTR  lpSubKey,
  387.     LPCWSTR  lpFile
  388.     );
  389. #ifdef UNICODE
  390. #define RegLoadKey  RegLoadKeyW
  391. #else
  392. #define RegLoadKey  RegLoadKeyA
  393. #endif // !UNICODE
  394.  
  395. WINADVAPI
  396. LONG
  397. APIENTRY
  398. RegNotifyChangeKeyValue (
  399.     HKEY hKey,
  400.     BOOL bWatchSubtree,
  401.     DWORD dwNotifyFilter,
  402.     HANDLE hEvent,
  403.     BOOL fAsynchronus
  404.     );
  405.  
  406. WINADVAPI
  407. LONG
  408. APIENTRY
  409. RegOpenKeyA (
  410.     HKEY hKey,
  411.     LPCSTR lpSubKey,
  412.     PHKEY phkResult
  413.     );
  414. WINADVAPI
  415. LONG
  416. APIENTRY
  417. RegOpenKeyW (
  418.     HKEY hKey,
  419.     LPCWSTR lpSubKey,
  420.     PHKEY phkResult
  421.     );
  422. #ifdef UNICODE
  423. #define RegOpenKey  RegOpenKeyW
  424. #else
  425. #define RegOpenKey  RegOpenKeyA
  426. #endif // !UNICODE
  427.  
  428. WINADVAPI
  429. LONG
  430. APIENTRY
  431. RegOpenKeyExA (
  432.     HKEY hKey,
  433.     LPCSTR lpSubKey,
  434.     DWORD ulOptions,
  435.     REGSAM samDesired,
  436.     PHKEY phkResult
  437.     );
  438. WINADVAPI
  439. LONG
  440. APIENTRY
  441. RegOpenKeyExW (
  442.     HKEY hKey,
  443.     LPCWSTR lpSubKey,
  444.     DWORD ulOptions,
  445.     REGSAM samDesired,
  446.     PHKEY phkResult
  447.     );
  448. #ifdef UNICODE
  449. #define RegOpenKeyEx  RegOpenKeyExW
  450. #else
  451. #define RegOpenKeyEx  RegOpenKeyExA
  452. #endif // !UNICODE
  453.  
  454. WINADVAPI
  455. LONG
  456. APIENTRY
  457. RegQueryInfoKeyA (
  458.     HKEY hKey,
  459.     LPSTR lpClass,
  460.     LPDWORD lpcbClass,
  461.     LPDWORD lpReserved,
  462.     LPDWORD lpcSubKeys,
  463.     LPDWORD lpcbMaxSubKeyLen,
  464.     LPDWORD lpcbMaxClassLen,
  465.     LPDWORD lpcValues,
  466.     LPDWORD lpcbMaxValueNameLen,
  467.     LPDWORD lpcbMaxValueLen,
  468.     LPDWORD lpcbSecurityDescriptor,
  469.     PFILETIME lpftLastWriteTime
  470.     );
  471. WINADVAPI
  472. LONG
  473. APIENTRY
  474. RegQueryInfoKeyW (
  475.     HKEY hKey,
  476.     LPWSTR lpClass,
  477.     LPDWORD lpcbClass,
  478.     LPDWORD lpReserved,
  479.     LPDWORD lpcSubKeys,
  480.     LPDWORD lpcbMaxSubKeyLen,
  481.     LPDWORD lpcbMaxClassLen,
  482.     LPDWORD lpcValues,
  483.     LPDWORD lpcbMaxValueNameLen,
  484.     LPDWORD lpcbMaxValueLen,
  485.     LPDWORD lpcbSecurityDescriptor,
  486.     PFILETIME lpftLastWriteTime
  487.     );
  488. #ifdef UNICODE
  489. #define RegQueryInfoKey  RegQueryInfoKeyW
  490. #else
  491. #define RegQueryInfoKey  RegQueryInfoKeyA
  492. #endif // !UNICODE
  493.  
  494. WINADVAPI
  495. LONG
  496. APIENTRY
  497. RegQueryValueA (
  498.     HKEY hKey,
  499.     LPCSTR lpSubKey,
  500.     LPSTR lpValue,
  501.     PLONG   lpcbValue
  502.     );
  503. WINADVAPI
  504. LONG
  505. APIENTRY
  506. RegQueryValueW (
  507.     HKEY hKey,
  508.     LPCWSTR lpSubKey,
  509.     LPWSTR lpValue,
  510.     PLONG   lpcbValue
  511.     );
  512. #ifdef UNICODE
  513. #define RegQueryValue  RegQueryValueW
  514. #else
  515. #define RegQueryValue  RegQueryValueA
  516. #endif // !UNICODE
  517.  
  518. #if(WINVER >= 0x0400)
  519. WINADVAPI
  520. LONG
  521. APIENTRY
  522. RegQueryMultipleValuesA (
  523.     HKEY hKey,
  524.     PVALENTA val_list,
  525.     DWORD num_vals,
  526.     LPSTR lpValueBuf,
  527.     LPDWORD ldwTotsize
  528.     );
  529. WINADVAPI
  530. LONG
  531. APIENTRY
  532. RegQueryMultipleValuesW (
  533.     HKEY hKey,
  534.     PVALENTW val_list,
  535.     DWORD num_vals,
  536.     LPWSTR lpValueBuf,
  537.     LPDWORD ldwTotsize
  538.     );
  539. #ifdef UNICODE
  540. #define RegQueryMultipleValues  RegQueryMultipleValuesW
  541. #else
  542. #define RegQueryMultipleValues  RegQueryMultipleValuesA
  543. #endif // !UNICODE
  544. #endif /* WINVER >= 0x0400 */
  545.  
  546. WINADVAPI
  547. LONG
  548. APIENTRY
  549. RegQueryValueExA (
  550.     HKEY hKey,
  551.     LPCSTR lpValueName,
  552.     LPDWORD lpReserved,
  553.     LPDWORD lpType,
  554.     LPBYTE lpData,
  555.     LPDWORD lpcbData
  556.     );
  557. WINADVAPI
  558. LONG
  559. APIENTRY
  560. RegQueryValueExW (
  561.     HKEY hKey,
  562.     LPCWSTR lpValueName,
  563.     LPDWORD lpReserved,
  564.     LPDWORD lpType,
  565.     LPBYTE lpData,
  566.     LPDWORD lpcbData
  567.     );
  568. #ifdef UNICODE
  569. #define RegQueryValueEx  RegQueryValueExW
  570. #else
  571. #define RegQueryValueEx  RegQueryValueExA
  572. #endif // !UNICODE
  573.  
  574. WINADVAPI
  575. LONG
  576. APIENTRY
  577. RegReplaceKeyA (
  578.     HKEY     hKey,
  579.     LPCSTR  lpSubKey,
  580.     LPCSTR  lpNewFile,
  581.     LPCSTR  lpOldFile
  582.     );
  583. WINADVAPI
  584. LONG
  585. APIENTRY
  586. RegReplaceKeyW (
  587.     HKEY     hKey,
  588.     LPCWSTR  lpSubKey,
  589.     LPCWSTR  lpNewFile,
  590.     LPCWSTR  lpOldFile
  591.     );
  592. #ifdef UNICODE
  593. #define RegReplaceKey  RegReplaceKeyW
  594. #else
  595. #define RegReplaceKey  RegReplaceKeyA
  596. #endif // !UNICODE
  597.  
  598. WINADVAPI
  599. LONG
  600. APIENTRY
  601. RegRestoreKeyA (
  602.     HKEY hKey,
  603.     LPCSTR lpFile,
  604.     DWORD   dwFlags
  605.     );
  606. WINADVAPI
  607. LONG
  608. APIENTRY
  609. RegRestoreKeyW (
  610.     HKEY hKey,
  611.     LPCWSTR lpFile,
  612.     DWORD   dwFlags
  613.     );
  614. #ifdef UNICODE
  615. #define RegRestoreKey  RegRestoreKeyW
  616. #else
  617. #define RegRestoreKey  RegRestoreKeyA
  618. #endif // !UNICODE
  619.  
  620. WINADVAPI
  621. LONG
  622. APIENTRY
  623. RegSaveKeyA (
  624.     HKEY hKey,
  625.     LPCSTR lpFile,
  626.     LPSECURITY_ATTRIBUTES lpSecurityAttributes
  627.     );
  628. WINADVAPI
  629. LONG
  630. APIENTRY
  631. RegSaveKeyW (
  632.     HKEY hKey,
  633.     LPCWSTR lpFile,
  634.     LPSECURITY_ATTRIBUTES lpSecurityAttributes
  635.     );
  636. #ifdef UNICODE
  637. #define RegSaveKey  RegSaveKeyW
  638. #else
  639. #define RegSaveKey  RegSaveKeyA
  640. #endif // !UNICODE
  641.  
  642. WINADVAPI
  643. LONG
  644. APIENTRY
  645. RegSetKeySecurity (
  646.     HKEY hKey,
  647.     SECURITY_INFORMATION SecurityInformation,
  648.     PSECURITY_DESCRIPTOR pSecurityDescriptor
  649.     );
  650.  
  651. WINADVAPI
  652. LONG
  653. APIENTRY
  654. RegSetValueA (
  655.     HKEY hKey,
  656.     LPCSTR lpSubKey,
  657.     DWORD dwType,
  658.     LPCSTR lpData,
  659.     DWORD cbData
  660.     );
  661. WINADVAPI
  662. LONG
  663. APIENTRY
  664. RegSetValueW (
  665.     HKEY hKey,
  666.     LPCWSTR lpSubKey,
  667.     DWORD dwType,
  668.     LPCWSTR lpData,
  669.     DWORD cbData
  670.     );
  671. #ifdef UNICODE
  672. #define RegSetValue  RegSetValueW
  673. #else
  674. #define RegSetValue  RegSetValueA
  675. #endif // !UNICODE
  676.  
  677.  
  678. WINADVAPI
  679. LONG
  680. APIENTRY
  681. RegSetValueExA (
  682.     HKEY hKey,
  683.     LPCSTR lpValueName,
  684.     DWORD Reserved,
  685.     DWORD dwType,
  686.     CONST BYTE* lpData,
  687.     DWORD cbData
  688.     );
  689. WINADVAPI
  690. LONG
  691. APIENTRY
  692. RegSetValueExW (
  693.     HKEY hKey,
  694.     LPCWSTR lpValueName,
  695.     DWORD Reserved,
  696.     DWORD dwType,
  697.     CONST BYTE* lpData,
  698.     DWORD cbData
  699.     );
  700. #ifdef UNICODE
  701. #define RegSetValueEx  RegSetValueExW
  702. #else
  703. #define RegSetValueEx  RegSetValueExA
  704. #endif // !UNICODE
  705.  
  706. WINADVAPI
  707. LONG
  708. APIENTRY
  709. RegUnLoadKeyA (
  710.     HKEY    hKey,
  711.     LPCSTR lpSubKey
  712.     );
  713. WINADVAPI
  714. LONG
  715. APIENTRY
  716. RegUnLoadKeyW (
  717.     HKEY    hKey,
  718.     LPCWSTR lpSubKey
  719.     );
  720. #ifdef UNICODE
  721. #define RegUnLoadKey  RegUnLoadKeyW
  722. #else
  723. #define RegUnLoadKey  RegUnLoadKeyA
  724. #endif // !UNICODE
  725.  
  726. //
  727. // Remoteable System Shutdown APIs
  728. //
  729.  
  730. WINADVAPI
  731. BOOL
  732. APIENTRY
  733. InitiateSystemShutdownA(
  734.     LPSTR lpMachineName,
  735.     LPSTR lpMessage,
  736.     DWORD dwTimeout,
  737.     BOOL bForceAppsClosed,
  738.     BOOL bRebootAfterShutdown
  739.     );
  740. WINADVAPI
  741. BOOL
  742. APIENTRY
  743. InitiateSystemShutdownW(
  744.     LPWSTR lpMachineName,
  745.     LPWSTR lpMessage,
  746.     DWORD dwTimeout,
  747.     BOOL bForceAppsClosed,
  748.     BOOL bRebootAfterShutdown
  749.     );
  750. #ifdef UNICODE
  751. #define InitiateSystemShutdown  InitiateSystemShutdownW
  752. #else
  753. #define InitiateSystemShutdown  InitiateSystemShutdownA
  754. #endif // !UNICODE
  755.  
  756.  
  757. WINADVAPI
  758. BOOL
  759. APIENTRY
  760. AbortSystemShutdownA(
  761.     LPSTR lpMachineName
  762.     );
  763. WINADVAPI
  764. BOOL
  765. APIENTRY
  766. AbortSystemShutdownW(
  767.     LPWSTR lpMachineName
  768.     );
  769. #ifdef UNICODE
  770. #define AbortSystemShutdown  AbortSystemShutdownW
  771. #else
  772. #define AbortSystemShutdown  AbortSystemShutdownA
  773. #endif // !UNICODE
  774.  
  775. #ifdef __cplusplus
  776. }
  777. #endif
  778.  
  779.  
  780. #pragma option -b.
  781. #endif // _WINREG_
  782.