Robert Shearman : ole32:
Fix the return value of COM_RegReadPath and make it static.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 7 07:56:05 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 5f453db5cf397aa88158c86a9b38a552ce86f109
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=5f453db5cf397aa88158c86a9b38a552ce86f109
Author: Robert Shearman <rob at codeweavers.com>
Date: Thu Jul 6 12:55:13 2006 +0100
ole32: Fix the return value of COM_RegReadPath and make it static.
---
dlls/ole32/compobj.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index f66926c..a25d9ec 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -1540,25 +1540,25 @@ end:
*
* Reads a registry value and expands it when necessary
*/
-HRESULT COM_RegReadPath(HKEY hkeyroot, const WCHAR *keyname, const WCHAR *valuename, WCHAR * dst, DWORD dstlen)
+static DWORD COM_RegReadPath(HKEY hkeyroot, const WCHAR *keyname, const WCHAR *valuename, WCHAR * dst, DWORD dstlen)
{
- HRESULT hres;
+ DWORD ret;
HKEY key;
DWORD keytype;
WCHAR src[MAX_PATH];
DWORD dwLength = dstlen * sizeof(WCHAR);
- if((hres = RegOpenKeyExW(hkeyroot, keyname, 0, KEY_READ, &key)) == ERROR_SUCCESS) {
- if( (hres = RegQueryValueExW(key, NULL, NULL, &keytype, (LPBYTE)src, &dwLength)) == ERROR_SUCCESS ) {
+ if((ret = RegOpenKeyExW(hkeyroot, keyname, 0, KEY_READ, &key)) == ERROR_SUCCESS) {
+ if( (ret = RegQueryValueExW(key, NULL, NULL, &keytype, (LPBYTE)src, &dwLength)) == ERROR_SUCCESS ) {
if (keytype == REG_EXPAND_SZ) {
- if (dstlen <= ExpandEnvironmentStringsW(src, dst, dstlen)) hres = ERROR_MORE_DATA;
+ if (dstlen <= ExpandEnvironmentStringsW(src, dst, dstlen)) ret = ERROR_MORE_DATA;
} else {
lstrcpynW(dst, src, dstlen);
}
}
RegCloseKey (key);
}
- return hres;
+ return ret;
}
static HRESULT get_inproc_class_object(HKEY hkeydll, REFCLSID rclsid, REFIID riid, void **ppv)
More information about the wine-cvs
mailing list