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