home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / WINREG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  14.2 KB  |  796 lines

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