mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
In RegQueryValueExA, always request the type from RegQueryValueExW, we
need it, even if our caller doesn't, to determine if conversion is required svn path=/trunk/; revision=7009
This commit is contained in:
parent
44123858ae
commit
b295839f98
1 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: reg.c,v 1.33 2003/11/17 02:12:50 hyperion Exp $
|
||||
/* $Id: reg.c,v 1.34 2003/12/13 23:59:45 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -2197,6 +2197,7 @@ RegQueryValueExA(
|
|||
UNICODE_STRING ValueData;
|
||||
ANSI_STRING AnsiString;
|
||||
LONG ErrorCode;
|
||||
DWORD Type;
|
||||
|
||||
if ((lpData) && (!lpcbData))
|
||||
{
|
||||
|
@ -2228,13 +2229,14 @@ RegQueryValueExA(
|
|||
hKey,
|
||||
ValueName.Buffer,
|
||||
lpReserved,
|
||||
lpType,
|
||||
&Type,
|
||||
(LPBYTE)ValueData.Buffer,
|
||||
(LPDWORD)&ValueData.Length);
|
||||
if (lpType) *lpType = Type;
|
||||
|
||||
if ((ErrorCode == ERROR_SUCCESS) && (ValueData.Buffer != NULL))
|
||||
{
|
||||
if (lpType && ((*lpType == REG_SZ) || (*lpType == REG_MULTI_SZ) || (*lpType == REG_EXPAND_SZ)))
|
||||
if ((Type == REG_SZ) || (Type == REG_MULTI_SZ) || (Type == REG_EXPAND_SZ))
|
||||
{
|
||||
RtlInitAnsiString(&AnsiString, NULL);
|
||||
AnsiString.Buffer = lpData;
|
||||
|
|
Loading…
Reference in a new issue