home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / WINREG.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  14KB  |  777 lines

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