Re: Difference between CRegKey::QueryStringValue and RegQueryValueEx



>When you run this code (on VC++ 7.1 Standard, with _LIBS_USER_FULL_VER
>defined as "7.10.3077" in atlbuild.h) QueryStringValue will return
>ERROR_INVALID_DATA and RegQueryValueEx will return 0 (with cbZeroSize =
>0). Is there some fix or service pack for this bug, and is it removed
>from .NET 2005?

It appears to be fixed for VS2005 - in B1 the offending code in
CRegKey::QueryStringValue has been changed to:

if (pszValue != NULL)
{
if(nBytes!=0)
{
if ((nBytes % sizeof(TCHAR) != 0) || (pszValue[nBytes /
sizeof(TCHAR) -1] != 0))
{
return ERROR_INVALID_DATA;
}
}
else
{
pszValue[0]=_T('\0');
}
}

*pnChars = nBytes/sizeof(TCHAR);

return ERROR_SUCCESS;


Dave
.



Relevant Pages

  • Re: Fluctuation of printer alignment
    ... some versions of Visual Basic did at one time have a bug ... that caused the Printer.Textwidth function to return inconsistent values ... and what service pack have you installed? ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)
  • Re: Matlab bug -
    ... Upgraded to MATLAB Version 7.1.0.246 (R14) Service Pack 3. ... The bug is gone! ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: Internal Compiler error in MSVC++
    ... >Is this a known bug? ... causes the ICE with VS2003, and the following error with VS2005: ... Dave ... Prev by Date: ...
    (microsoft.public.vc.language)
  • [Info-ingres] RE: returning a single value from a database procedure in .NET
    ... The "out_userid" parm needs ... bug and will be fixed in a future build. ... Dave ... Prev by Date: ...
    (comp.databases.ingres)
  • Re: mac:word 04/08 random removal of spaces
    ... Known bug, for which a fix is included in Service Pack 1, which will ... Update 12.1.0 (Service pack 1) is in testing now. ... Passing both documents backwards and forwards to OSX and Windows, ...
    (microsoft.public.mac.office.word)