advapi32: Add and use LSTATUS.

Francois Gouget fgouget at free.fr
Mon Sep 17 17:40:48 CDT 2007


---
 dlls/advapi32/registry.c |  112 ++++++++++++++++++++++----------------------
 include/winreg.h         |  117 +++++++++++++++++++++++-----------------------
 tools/winapi/win32.api   |    2 +-
 3 files changed, 116 insertions(+), 115 deletions(-)

diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index e62206b..2e7f1f9 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -154,7 +154,7 @@ static inline HKEY get_special_root_hkey( HKEY hkey )
  *
  * See RegCreateKeyExA.
  */
-LONG WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR class,
+LSTATUS WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR class,
                              DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
                              PHKEY retkey, LPDWORD dispos )
 {
@@ -202,7 +202,7 @@ LONG WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR cla
  * FIXME
  *  MAXIMUM_ALLOWED in access mask not supported by server
  */
-LONG WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR class,
+LSTATUS WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR class,
                              DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
                              PHKEY retkey, LPDWORD dispos )
 {
@@ -256,7 +256,7 @@ LONG WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR class
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code defined in Winerror.h
  */
-LONG WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpSubKey, PHKEY phkResult )
+LSTATUS WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpSubKey, PHKEY phkResult )
 {
     /* FIXME: previous implementation converted ERROR_INVALID_HANDLE to ERROR_BADKEY, */
     /* but at least my version of NT (4.0 SP5) doesn't do this.  -- AJ */
@@ -270,7 +270,7 @@ LONG WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpSubKey, PHKEY phkResult )
  *
  * See RegCreateKeyW.
  */
-LONG WINAPI RegCreateKeyA( HKEY hkey, LPCSTR lpSubKey, PHKEY phkResult )
+LSTATUS WINAPI RegCreateKeyA( HKEY hkey, LPCSTR lpSubKey, PHKEY phkResult )
 {
     return RegCreateKeyExA( hkey, lpSubKey, 0, NULL, REG_OPTION_NON_VOLATILE,
                             KEY_ALL_ACCESS, NULL, phkResult, NULL );
@@ -283,7 +283,7 @@ LONG WINAPI RegCreateKeyA( HKEY hkey, LPCSTR lpSubKey, PHKEY phkResult )
  * 
  * See RegOpenKeyExA.
  */
-LONG WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, REGSAM access, PHKEY retkey )
+LSTATUS WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, REGSAM access, PHKEY retkey )
 {
     OBJECT_ATTRIBUTES attr;
     UNICODE_STRING nameW;
@@ -321,7 +321,7 @@ LONG WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, REGSAM acces
  *  Unlike RegCreateKeyExA(), this function will not create the key if it
  *  does not exist.
  */
-LONG WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM access, PHKEY retkey )
+LSTATUS WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM access, PHKEY retkey )
 {
     OBJECT_ATTRIBUTES attr;
     STRING nameA;
@@ -353,7 +353,7 @@ LONG WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM access
  *
  * See RegOpenKeyA.
  */
-LONG WINAPI RegOpenKeyW( HKEY hkey, LPCWSTR name, PHKEY retkey )
+LSTATUS WINAPI RegOpenKeyW( HKEY hkey, LPCWSTR name, PHKEY retkey )
 {
     if (!name || !*name)
     {
@@ -378,7 +378,7 @@ LONG WINAPI RegOpenKeyW( HKEY hkey, LPCWSTR name, PHKEY retkey )
  *  Success: ERROR_SUCCESS
  *  Failure: A standard Win32 error code. retkey is set to 0.
  */
-LONG WINAPI RegOpenKeyA( HKEY hkey, LPCSTR name, PHKEY retkey )
+LSTATUS WINAPI RegOpenKeyA( HKEY hkey, LPCSTR name, PHKEY retkey )
 {
     if (!name || !*name)
     {
@@ -409,7 +409,7 @@ LONG WINAPI RegOpenKeyA( HKEY hkey, LPCSTR name, PHKEY retkey )
  *  Since Wine does not currently allow threads to impersonate other users,
  *  this stub should work fine.
  */
-LONG WINAPI RegOpenCurrentUser( REGSAM access, PHKEY retkey )
+LSTATUS WINAPI RegOpenCurrentUser( REGSAM access, PHKEY retkey )
 {
     return RegOpenKeyExA( HKEY_CURRENT_USER, "", 0, access, retkey );
 }
@@ -436,7 +436,7 @@ LONG WINAPI RegOpenCurrentUser( REGSAM access, PHKEY retkey )
  *  Failure: System error code. If there are no more subkeys available, the
  *           function returns ERROR_NO_MORE_ITEMS.
  */
-LONG WINAPI RegEnumKeyExW( HKEY hkey, DWORD index, LPWSTR name, LPDWORD name_len,
+LSTATUS WINAPI RegEnumKeyExW( HKEY hkey, DWORD index, LPWSTR name, LPDWORD name_len,
                            LPDWORD reserved, LPWSTR class, LPDWORD class_len, FILETIME *ft )
 {
     NTSTATUS status;
@@ -500,7 +500,7 @@ LONG WINAPI RegEnumKeyExW( HKEY hkey, DWORD index, LPWSTR name, LPDWORD name_len
  *
  * See RegEnumKeyExW.
  */
-LONG WINAPI RegEnumKeyExA( HKEY hkey, DWORD index, LPSTR name, LPDWORD name_len,
+LSTATUS WINAPI RegEnumKeyExA( HKEY hkey, DWORD index, LPSTR name, LPDWORD name_len,
                            LPDWORD reserved, LPSTR class, LPDWORD class_len, FILETIME *ft )
 {
     NTSTATUS status;
@@ -579,7 +579,7 @@ LONG WINAPI RegEnumKeyExA( HKEY hkey, DWORD index, LPSTR name, LPDWORD name_len,
  *  Failure: system error code. If there are no more subkeys available, the
  *           function returns ERROR_NO_MORE_ITEMS.
  */
-LONG WINAPI RegEnumKeyW( HKEY hkey, DWORD index, LPWSTR name, DWORD name_len )
+LSTATUS WINAPI RegEnumKeyW( HKEY hkey, DWORD index, LPWSTR name, DWORD name_len )
 {
     return RegEnumKeyExW( hkey, index, name, &name_len, NULL, NULL, NULL, NULL );
 }
@@ -590,7 +590,7 @@ LONG WINAPI RegEnumKeyW( HKEY hkey, DWORD index, LPWSTR name, DWORD name_len )
  *
  * See RegEnumKeyW.
  */
-LONG WINAPI RegEnumKeyA( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
+LSTATUS WINAPI RegEnumKeyA( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
 {
     return RegEnumKeyExA( hkey, index, name, &name_len, NULL, NULL, NULL, NULL );
 }
@@ -625,7 +625,7 @@ LONG WINAPI RegEnumKeyA( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
  *  - both allow class to be NULL and class_len to be NULL
  *    (it's hard to test validity, so test !NULL instead)
  */
-LONG WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPDWORD reserved,
+LSTATUS WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPDWORD reserved,
                               LPDWORD subkeys, LPDWORD max_subkey, LPDWORD max_class,
                               LPDWORD values, LPDWORD max_value, LPDWORD max_data,
                               LPDWORD security, FILETIME *modif )
@@ -702,7 +702,7 @@ LONG WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPDWOR
  *  Failure: nonzero error code from Winerror.h ldwTotsize contains num needed
  *           bytes.
  */
-LONG WINAPI RegQueryMultipleValuesA( HKEY hkey, PVALENTA val_list, DWORD num_vals,
+LSTATUS WINAPI RegQueryMultipleValuesA( HKEY hkey, PVALENTA val_list, DWORD num_vals,
                                      LPSTR lpValueBuf, LPDWORD ldwTotsize )
 {
     unsigned int i;
@@ -748,7 +748,7 @@ LONG WINAPI RegQueryMultipleValuesA( HKEY hkey, PVALENTA val_list, DWORD num_val
  *
  * See RegQueryMultipleValuesA.
  */
-LONG WINAPI RegQueryMultipleValuesW( HKEY hkey, PVALENTW val_list, DWORD num_vals,
+LSTATUS WINAPI RegQueryMultipleValuesW( HKEY hkey, PVALENTW val_list, DWORD num_vals,
                                      LPWSTR lpValueBuf, LPDWORD ldwTotsize )
 {
     unsigned int i;
@@ -811,7 +811,7 @@ LONG WINAPI RegQueryMultipleValuesW( HKEY hkey, PVALENTW val_list, DWORD num_val
  *   Success: ERROR_SUCCESS
  *   Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDWORD reserved,
+LSTATUS WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDWORD reserved,
                               LPDWORD subkeys, LPDWORD max_subkey, LPDWORD max_class,
                               LPDWORD values, LPDWORD max_value, LPDWORD max_data,
                               LPDWORD security, FILETIME *modif )
@@ -885,7 +885,7 @@ LONG WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDWORD
  *  Success: ERROR_SUCCESS
  *  Failure: Error code
  */
-LONG WINAPI RegCloseKey( HKEY hkey )
+LSTATUS WINAPI RegCloseKey( HKEY hkey )
 {
     if (!hkey) return ERROR_INVALID_HANDLE;
     if (hkey >= (HKEY)0x80000000) return ERROR_SUCCESS;
@@ -898,7 +898,7 @@ LONG WINAPI RegCloseKey( HKEY hkey )
  *
  * See RegDeleteKeyA.
  */
-LONG WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
+LSTATUS WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
 {
     DWORD ret;
     HKEY tmp;
@@ -935,7 +935,7 @@ LONG WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
  *  Success: ERROR_SUCCESS
  *  Failure: Error code
  */
-LONG WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
+LSTATUS WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
 {
     DWORD ret;
     HKEY tmp;
@@ -982,7 +982,7 @@ LONG WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
  *  Success: ERROR_SUCCESS
  *  Failure: Error code
  */
-LONG WINAPI RegSetValueExW( HKEY hkey, LPCWSTR name, DWORD reserved,
+LSTATUS WINAPI RegSetValueExW( HKEY hkey, LPCWSTR name, DWORD reserved,
                             DWORD type, CONST BYTE *data, DWORD count )
 {
     UNICODE_STRING nameW;
@@ -1011,7 +1011,7 @@ LONG WINAPI RegSetValueExW( HKEY hkey, LPCWSTR name, DWORD reserved,
  *  win95 does not care about count for REG_SZ and finds out the len by itself (js)
  *  NT does definitely care (aj)
  */
-LONG WINAPI RegSetValueExA( HKEY hkey, LPCSTR name, DWORD reserved, DWORD type,
+LSTATUS WINAPI RegSetValueExA( HKEY hkey, LPCSTR name, DWORD reserved, DWORD type,
                             CONST BYTE *data, DWORD count )
 {
     ANSI_STRING nameA;
@@ -1071,7 +1071,7 @@ LONG WINAPI RegSetValueExA( HKEY hkey, LPCSTR name, DWORD reserved, DWORD type,
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegSetValueW( HKEY hkey, LPCWSTR name, DWORD type, LPCWSTR data, DWORD count )
+LSTATUS WINAPI RegSetValueW( HKEY hkey, LPCWSTR name, DWORD type, LPCWSTR data, DWORD count )
 {
     HKEY subkey = hkey;
     DWORD ret;
@@ -1097,7 +1097,7 @@ LONG WINAPI RegSetValueW( HKEY hkey, LPCWSTR name, DWORD type, LPCWSTR data, DWO
  *
  * See RegSetValueW.
  */
-LONG WINAPI RegSetValueA( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count )
+LSTATUS WINAPI RegSetValueA( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count )
 {
     HKEY subkey = hkey;
     DWORD ret;
@@ -1122,7 +1122,7 @@ LONG WINAPI RegSetValueA( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD
  *
  * See RegQueryValueExA.
  */
-LONG WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDWORD type,
+LSTATUS WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDWORD type,
                               LPBYTE data, LPDWORD count )
 {
     NTSTATUS status;
@@ -1212,7 +1212,7 @@ LONG WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDWORD
  *   MSDN states that if data is too small it is partially filled. In reality 
  *   it remains untouched.
  */
-LONG WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD type,
+LSTATUS WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD type,
                               LPBYTE data, LPDWORD count )
 {
     NTSTATUS status;
@@ -1315,7 +1315,7 @@ LONG WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD
  *   Success: ERROR_SUCCESS
  *   Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegQueryValueW( HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG count )
+LSTATUS WINAPI RegQueryValueW( HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG count )
 {
     DWORD ret;
     HKEY subkey = hkey;
@@ -1344,7 +1344,7 @@ LONG WINAPI RegQueryValueW( HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG count )
  *
  * See RegQueryValueW.
  */
-LONG WINAPI RegQueryValueA( HKEY hkey, LPCSTR name, LPSTR data, LPLONG count )
+LSTATUS WINAPI RegQueryValueA( HKEY hkey, LPCSTR name, LPSTR data, LPLONG count )
 {
     DWORD ret;
     HKEY subkey = hkey;
@@ -1439,7 +1439,7 @@ static VOID ADVAPI_ApplyRestrictions( DWORD dwFlags, DWORD dwType,
  *  - Restrictions are applied after expanding, using RRF_RT_REG_EXPAND_SZ 
  *    without RRF_NOEXPAND is thus not allowed.
  */
-LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, 
+LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, 
                           DWORD dwFlags, LPDWORD pdwType, PVOID pvData,
                           LPDWORD pcbData )
 {
@@ -1534,7 +1534,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
  *
  * See RegGetValueW.
  */
-LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, 
+LSTATUS WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, 
                           DWORD dwFlags, LPDWORD pdwType, PVOID pvData, 
                           LPDWORD pcbData )
 {
@@ -1644,7 +1644,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue,
  *  Failure: nonzero error code from Winerror.h
  */
 
-LONG WINAPI RegEnumValueW( HKEY hkey, DWORD index, LPWSTR value, LPDWORD val_count,
+LSTATUS WINAPI RegEnumValueW( HKEY hkey, DWORD index, LPWSTR value, LPDWORD val_count,
                            LPDWORD reserved, LPDWORD type, LPBYTE data, LPDWORD count )
 {
     NTSTATUS status;
@@ -1729,7 +1729,7 @@ LONG WINAPI RegEnumValueW( HKEY hkey, DWORD index, LPWSTR value, LPDWORD val_cou
  *
  * See RegEnumValueW.
  */
-LONG WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_count,
+LSTATUS WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_count,
                            LPDWORD reserved, LPDWORD type, LPBYTE data, LPDWORD count )
 {
     NTSTATUS status;
@@ -1835,7 +1835,7 @@ LONG WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_coun
  *
  * See RegDeleteValueA.
  */
-LONG WINAPI RegDeleteValueW( HKEY hkey, LPCWSTR name )
+LSTATUS WINAPI RegDeleteValueW( HKEY hkey, LPCWSTR name )
 {
     UNICODE_STRING nameW;
 
@@ -1859,7 +1859,7 @@ LONG WINAPI RegDeleteValueW( HKEY hkey, LPCWSTR name )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegDeleteValueA( HKEY hkey, LPCSTR name )
+LSTATUS WINAPI RegDeleteValueA( HKEY hkey, LPCSTR name )
 {
     STRING nameA;
     NTSTATUS status;
@@ -1889,7 +1889,7 @@ LONG WINAPI RegDeleteValueA( HKEY hkey, LPCSTR name )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegLoadKeyW( HKEY hkey, LPCWSTR subkey, LPCWSTR filename )
+LSTATUS WINAPI RegLoadKeyW( HKEY hkey, LPCWSTR subkey, LPCWSTR filename )
 {
     OBJECT_ATTRIBUTES destkey, file;
     UNICODE_STRING subkeyW, filenameW;
@@ -1924,7 +1924,7 @@ LONG WINAPI RegLoadKeyW( HKEY hkey, LPCWSTR subkey, LPCWSTR filename )
  *
  * See RegLoadKeyW.
  */
-LONG WINAPI RegLoadKeyA( HKEY hkey, LPCSTR subkey, LPCSTR filename )
+LSTATUS WINAPI RegLoadKeyA( HKEY hkey, LPCSTR subkey, LPCSTR filename )
 {
     UNICODE_STRING subkeyW, filenameW;
     STRING subkeyA, filenameA;
@@ -1962,7 +1962,7 @@ LONG WINAPI RegLoadKeyA( HKEY hkey, LPCSTR subkey, LPCSTR filename )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegSaveKeyW( HKEY hkey, LPCWSTR file, LPSECURITY_ATTRIBUTES sa )
+LSTATUS WINAPI RegSaveKeyW( HKEY hkey, LPCWSTR file, LPSECURITY_ATTRIBUTES sa )
 {
     static const WCHAR format[] =
         {'r','e','g','%','0','4','x','.','t','m','p',0};
@@ -2018,7 +2018,7 @@ done:
  *
  * See RegSaveKeyW.
  */
-LONG WINAPI RegSaveKeyA( HKEY hkey, LPCSTR file, LPSECURITY_ATTRIBUTES sa )
+LSTATUS WINAPI RegSaveKeyA( HKEY hkey, LPCSTR file, LPSECURITY_ATTRIBUTES sa )
 {
     UNICODE_STRING *fileW = &NtCurrentTeb()->StaticUnicodeString;
     NTSTATUS status;
@@ -2045,7 +2045,7 @@ LONG WINAPI RegSaveKeyA( HKEY hkey, LPCSTR file, LPSECURITY_ATTRIBUTES sa )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
+LSTATUS WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
 {
     TRACE("(%p,%s,%d)\n",hkey,debugstr_w(lpFile),dwFlags);
 
@@ -2066,7 +2066,7 @@ LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
  *
  * See RegRestoreKeyW.
  */
-LONG WINAPI RegRestoreKeyA( HKEY hkey, LPCSTR lpFile, DWORD dwFlags )
+LSTATUS WINAPI RegRestoreKeyA( HKEY hkey, LPCSTR lpFile, DWORD dwFlags )
 {
     UNICODE_STRING lpFileW;
     LONG ret;
@@ -2091,7 +2091,7 @@ LONG WINAPI RegRestoreKeyA( HKEY hkey, LPCSTR lpFile, DWORD dwFlags )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey )
+LSTATUS WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey )
 {
     DWORD ret;
     HKEY shkey;
@@ -2119,7 +2119,7 @@ LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey )
  *
  * See RegUnLoadKeyW.
  */
-LONG WINAPI RegUnLoadKeyA( HKEY hkey, LPCSTR lpSubKey )
+LSTATUS WINAPI RegUnLoadKeyA( HKEY hkey, LPCSTR lpSubKey )
 {
     UNICODE_STRING lpSubKeyW;
     LONG ret;
@@ -2146,7 +2146,7 @@ LONG WINAPI RegUnLoadKeyA( HKEY hkey, LPCSTR lpSubKey )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
+LSTATUS WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
                               LPCWSTR lpOldFile )
 {
     FIXME("(%p,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
@@ -2160,7 +2160,7 @@ LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
  *
  * See RegReplaceKeyW.
  */
-LONG WINAPI RegReplaceKeyA( HKEY hkey, LPCSTR lpSubKey, LPCSTR lpNewFile,
+LSTATUS WINAPI RegReplaceKeyA( HKEY hkey, LPCSTR lpSubKey, LPCSTR lpNewFile,
                               LPCSTR lpOldFile )
 {
     UNICODE_STRING lpSubKeyW;
@@ -2193,7 +2193,7 @@ LONG WINAPI RegReplaceKeyA( HKEY hkey, LPCSTR lpSubKey, LPCSTR lpNewFile,
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
+LSTATUS WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
                                PSECURITY_DESCRIPTOR pSecurityDesc )
 {
     TRACE("(%p,%d,%p)\n",hkey,SecurityInfo,pSecurityDesc);
@@ -2231,7 +2231,7 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
  *  Success: ERROR_SUCCESS
  *  Failure: Error code
  */
-LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformation,
+LSTATUS WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformation,
                                PSECURITY_DESCRIPTOR pSecurityDescriptor,
                                LPDWORD lpcbSecurityDescriptor )
 {
@@ -2258,7 +2258,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformati
  *  Success: ERROR_SUCCESS
  *  Failure: Error code
  */
-LONG WINAPI RegFlushKey( HKEY hkey )
+LSTATUS WINAPI RegFlushKey( HKEY hkey )
 {
     hkey = get_special_root_hkey( hkey );
     if (!hkey) return ERROR_INVALID_HANDLE;
@@ -2281,7 +2281,7 @@ LONG WINAPI RegFlushKey( HKEY hkey )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
+LSTATUS WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
                                    PHKEY phkResult )
 {
     LONG ret;
@@ -2321,7 +2321,7 @@ LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
  *
  * See RegConnectRegistryW.
  */
-LONG WINAPI RegConnectRegistryA( LPCSTR machine, HKEY hkey, PHKEY reskey )
+LSTATUS WINAPI RegConnectRegistryA( LPCSTR machine, HKEY hkey, PHKEY reskey )
 {
     UNICODE_STRING machineW;
     LONG ret;
@@ -2349,7 +2349,7 @@ LONG WINAPI RegConnectRegistryA( LPCSTR machine, HKEY hkey, PHKEY reskey )
  *  Success: ERROR_SUCCESS
  *  Failure: nonzero error code from Winerror.h
  */
-LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
+LSTATUS WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
                                      DWORD fdwNotifyFilter, HANDLE hEvent,
                                      BOOL fAsync )
 {
@@ -2392,7 +2392,7 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
  *  "HKEY_LOCAL_MACHINE\Software\Classes" and the
  *  "HKEY_CURRENT_USER\Software\Classes" keys merged together.
  */
-LONG WINAPI RegOpenUserClassesRoot(
+LSTATUS WINAPI RegOpenUserClassesRoot(
     HANDLE hToken,
     DWORD dwOptions,
     REGSAM samDesired,
@@ -2471,7 +2471,7 @@ static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMa
  *  This is an API of Windows Vista, which wasn't available at the time this code
  *  was written. We have to check for the correct behaviour once it's available. 
  */
-LONG WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pwszValue, LPWSTR pwszBuffer, DWORD cbBuffer,
+LSTATUS WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pwszValue, LPWSTR pwszBuffer, DWORD cbBuffer,
     LPDWORD pcbData, DWORD dwFlags, LPCWSTR pwszBaseDir)
 {
     DWORD dwValueType, cbData;
@@ -2557,7 +2557,7 @@ cleanup:
  *
  * See RegLoadMUIStringW
  */
-LONG WINAPI RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, LPSTR pszBuffer, DWORD cbBuffer,
+LSTATUS WINAPI RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, LPSTR pszBuffer, DWORD cbBuffer,
     LPDWORD pcbData, DWORD dwFlags, LPCSTR pszBaseDir)
 {
     UNICODE_STRING valueW, baseDirW;
@@ -2606,7 +2606,7 @@ cleanup:
  * NOTES
  *  This is useful for services that use impersonation.
  */
-LONG WINAPI RegDisablePredefinedCache(void)
+LSTATUS WINAPI RegDisablePredefinedCache(void)
 {
     HKEY hkey_current_user;
     int idx = (UINT_PTR)HKEY_CURRENT_USER - (UINT_PTR)HKEY_SPECIAL_ROOT_FIRST;
@@ -2626,7 +2626,7 @@ LONG WINAPI RegDisablePredefinedCache(void)
  * RegDeleteTreeW [ADVAPI32.@]
  *
  */
-LONG WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
+LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
 {
     LONG ret;
     DWORD dwMaxSubkeyLen, dwMaxValueLen;
@@ -2698,7 +2698,7 @@ cleanup:
  * RegDeleteTreeA [ADVAPI32.@]
  *
  */
-LONG WINAPI RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
+LSTATUS WINAPI RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
 {
     LONG ret;
     UNICODE_STRING lpszSubKeyW;
diff --git a/include/winreg.h b/include/winreg.h
index ac8f570..f1d4342 100644
--- a/include/winreg.h
+++ b/include/winreg.h
@@ -51,6 +51,7 @@ typedef struct value_entW {
 } VALENTW, *PVALENTW;
 
 typedef ACCESS_MASK REGSAM;
+typedef LONG LSTATUS;
 
 /*
  * InitiateSystemShutdown() reasons
@@ -90,100 +91,100 @@ BOOL        WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
 BOOL        WINAPI InitiateSystemShutdownExA(LPSTR,LPSTR,DWORD,BOOL,BOOL,DWORD);
 BOOL        WINAPI InitiateSystemShutdownExW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL,DWORD);
 #define     InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx);
-LONG        WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
+LSTATUS     WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
                                      LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
-LONG        WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
+LSTATUS     WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
                                      LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
 #define     RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
-LONG        WINAPI RegDisablePredefinedCache(void);
-LONG        WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
-LONG        WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
+LSTATUS     WINAPI RegDisablePredefinedCache(void);
+LSTATUS     WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
+LSTATUS     WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
 #define     RegSaveKey WINELIB_NAME_AW(RegSaveKey)
-LONG        WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-LONG        WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
-LONG        WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
+LSTATUS     WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
+LSTATUS     WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
+LSTATUS     WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
 #define     RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
-LONG        WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
+LSTATUS     WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
                                    LPDWORD,LPFILETIME);
-LONG        WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
+LSTATUS     WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
                                    LPDWORD,LPFILETIME);
 #define     RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
-LONG        WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
-LONG        WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
-LONG        WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD);
+LSTATUS     WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
+LSTATUS     WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
+LSTATUS     WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD);
 #define     RegGetValue WINELIB_NAME_AW(RegGetValue)
-LONG        WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
-LONG        WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
+LSTATUS     WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
+LSTATUS     WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
 #define     RegLoadKey WINELIB_NAME_AW(RegLoadKey)
-LONG        WINAPI RegLoadMUIStringA(HKEY,LPCSTR,LPSTR,DWORD,LPDWORD,DWORD,LPCSTR);
-LONG        WINAPI RegLoadMUIStringW(HKEY,LPCWSTR,LPWSTR,DWORD,LPDWORD,DWORD,LPCWSTR);
+LSTATUS     WINAPI RegLoadMUIStringA(HKEY,LPCSTR,LPSTR,DWORD,LPDWORD,DWORD,LPCSTR);
+LSTATUS     WINAPI RegLoadMUIStringW(HKEY,LPCWSTR,LPWSTR,DWORD,LPDWORD,DWORD,LPCWSTR);
 #define     RegLoadMUIString WINELIB_NAME_AW(RegLoadMUIString)
-LONG        WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
-LONG        WINAPI RegOpenCurrentUser(REGSAM,PHKEY);
-LONG        WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
-LONG        WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
+LSTATUS     WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
+LSTATUS     WINAPI RegOpenCurrentUser(REGSAM,PHKEY);
+LSTATUS     WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
+LSTATUS     WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
 #define     RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
-LONG        WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY);
-LONG        WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
+LSTATUS     WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY);
+LSTATUS     WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
                                       LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
                                       LPDWORD,LPFILETIME);
-LONG        WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
+LSTATUS     WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
                                       LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
                                       LPDWORD,LPFILETIME);
 #define     RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
-LONG        WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
-LONG        WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
+LSTATUS     WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
+LSTATUS     WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
 #define     RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
-LONG        WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
-LONG        WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
+LSTATUS     WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
+LSTATUS     WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
 #define     RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
-LONG        WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
-LONG        WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
+LSTATUS     WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
+LSTATUS     WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
 #define     RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
-LONG        WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
-LONG        WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
+LSTATUS     WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
+LSTATUS     WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
 #define     RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
 
 /* Declarations for functions that are the same in Win16 and Win32 */
 
-LONG        WINAPI RegCloseKey(HKEY);
-LONG        WINAPI RegFlushKey(HKEY);
+LSTATUS     WINAPI RegCloseKey(HKEY);
+LSTATUS     WINAPI RegFlushKey(HKEY);
 
-LONG        WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
-LONG        WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
+LSTATUS     WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
+LSTATUS     WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
 #define     RegCreateKey WINELIB_NAME_AW(RegCreateKey)
-LONG        WINAPI RegDeleteKeyA(HKEY,LPCSTR);
-LONG        WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
+LSTATUS     WINAPI RegDeleteKeyA(HKEY,LPCSTR);
+LSTATUS     WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
 #define     RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
-LONG        WINAPI RegDeleteKeyValueA(HKEY,LPCSTR,LPCSTR);
-LONG        WINAPI RegDeleteKeyValueW(HKEY,LPCWSTR,LPCWSTR);
+LSTATUS     WINAPI RegDeleteKeyValueA(HKEY,LPCSTR,LPCSTR);
+LSTATUS     WINAPI RegDeleteKeyValueW(HKEY,LPCWSTR,LPCWSTR);
 #define     RegDeleteKeyValue WINELIB_NAME_AW(RegDeleteKeyValue)
-LONG        WINAPI RegDeleteTreeA(HKEY,LPCSTR);
-LONG        WINAPI RegDeleteTreeW(HKEY,LPCWSTR);
+LSTATUS     WINAPI RegDeleteTreeA(HKEY,LPCSTR);
+LSTATUS     WINAPI RegDeleteTreeW(HKEY,LPCWSTR);
 #define     RegDeleteTree WINELIB_NAME_AW(RegDeleteTree)
-LONG        WINAPI RegDeleteValueA(HKEY,LPCSTR);
-LONG        WINAPI RegDeleteValueW(HKEY,LPCWSTR);
+LSTATUS     WINAPI RegDeleteValueA(HKEY,LPCSTR);
+LSTATUS     WINAPI RegDeleteValueW(HKEY,LPCWSTR);
 #define     RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
-LONG        WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
-LONG        WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
+LSTATUS     WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
+LSTATUS     WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
 #define     RegEnumKey WINELIB_NAME_AW(RegEnumKey)
-LONG        WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
-LONG        WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
+LSTATUS     WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
+LSTATUS     WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
 #define     RegEnumValue WINELIB_NAME_AW(RegEnumValue)
-LONG        WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
-LONG        WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
+LSTATUS     WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
+LSTATUS     WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
 #define     RegOpenKey WINELIB_NAME_AW(RegOpenKey)
-LONG        WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
-LONG        WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
+LSTATUS     WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
+LSTATUS     WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
 #define     RegQueryValue WINELIB_NAME_AW(RegQueryValue)
-LONG        WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
-LONG        WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
+LSTATUS     WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
+LSTATUS     WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
 #define     RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
-LONG        WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
-LONG        WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
+LSTATUS     WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
+LSTATUS     WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
 #define     RegSetValue WINELIB_NAME_AW(RegSetValue)
-LONG        WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
-LONG        WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
+LSTATUS     WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
+LSTATUS     WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
 #define     RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
 
 #ifdef __cplusplus
diff --git a/tools/winapi/win32.api b/tools/winapi/win32.api
index d179d7c..5ed92ec 100644
--- a/tools/winapi/win32.api
+++ b/tools/winapi/win32.api
@@ -40,8 +40,8 @@ HCRYPTKEY
 HCRYPTPROV
 HKEY
 INT
-LONG
 LSA_HANDLE
+LSTATUS
 NTSTATUS
 POLICY_INFORMATION_CLASS
 POLICY_NOTIFICATION_INFORMATION_CLASS
-- 
1.5.2.4




More information about the wine-patches mailing list