[PATCH] win32: advapi32.RegGetValue() is not available on WinXP 32-bits
Patrick Mezard
pmezard at gmail.com
Sat Feb 12 13:16:42 CST 2011
# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1297538010 -3600
# Node ID bf513d50d7d083432db132eb876423992a3a84ec
# Parent 43e44df7c2e252e876f0347a8932e1513a7331ad
win32: advapi32.RegGetValue() is not available on WinXP 32-bits
See:
http://msdn.microsoft.com/en-us/library/ms724868(VS.85).aspx
Replace it with RegQueryValueEx:
http://msdn.microsoft.com/en-us/library/ms724911(v=vs.85).aspx
diff -r 43e44df7c2e2 -r bf513d50d7d0 mercurial/win32.py
--- a/mercurial/win32.py Tue Feb 08 00:38:42 2011 +0100
+++ b/mercurial/win32.py Sat Feb 12 20:13:30 2011 +0100
@@ -198,8 +198,8 @@
size = _DWORD(600)
type = _DWORD()
buf = ctypes.create_string_buffer(size.value + 1)
- res = adv.RegGetValueA(kh.value, None, valname, _RRF_RT_ANY,
- byref(type), byref(buf), byref(size))
+ res = adv.RegQueryValueExA(kh.value, valname, 0,
+ byref(type), buf, byref(size))
if res != _ERROR_SUCCESS:
continue
if type.value == _REG_SZ:
More information about the Mercurial-devel
mailing list