mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 20:21:22 +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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -2197,6 +2197,7 @@ RegQueryValueExA(
|
||||||
UNICODE_STRING ValueData;
|
UNICODE_STRING ValueData;
|
||||||
ANSI_STRING AnsiString;
|
ANSI_STRING AnsiString;
|
||||||
LONG ErrorCode;
|
LONG ErrorCode;
|
||||||
|
DWORD Type;
|
||||||
|
|
||||||
if ((lpData) && (!lpcbData))
|
if ((lpData) && (!lpcbData))
|
||||||
{
|
{
|
||||||
|
@ -2228,13 +2229,14 @@ RegQueryValueExA(
|
||||||
hKey,
|
hKey,
|
||||||
ValueName.Buffer,
|
ValueName.Buffer,
|
||||||
lpReserved,
|
lpReserved,
|
||||||
lpType,
|
&Type,
|
||||||
(LPBYTE)ValueData.Buffer,
|
(LPBYTE)ValueData.Buffer,
|
||||||
(LPDWORD)&ValueData.Length);
|
(LPDWORD)&ValueData.Length);
|
||||||
|
if (lpType) *lpType = Type;
|
||||||
|
|
||||||
if ((ErrorCode == ERROR_SUCCESS) && (ValueData.Buffer != NULL))
|
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);
|
RtlInitAnsiString(&AnsiString, NULL);
|
||||||
AnsiString.Buffer = lpData;
|
AnsiString.Buffer = lpData;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue