From 0b7224eed703ba34eec4fc1a5e11ddf4cf92b280 Mon Sep 17 00:00:00 2001 From: Alex Dragokas Date: Sun, 14 Jan 2024 15:18:33 +0200 Subject: [PATCH] Update nf-winreg-regqueryvaluew.md Fix members naming incorrectly referenced --- sdk-api-src/content/winreg/nf-winreg-regqueryvaluew.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk-api-src/content/winreg/nf-winreg-regqueryvaluew.md b/sdk-api-src/content/winreg/nf-winreg-regqueryvaluew.md index 0a2185131221..521eabc8061c 100644 --- a/sdk-api-src/content/winreg/nf-winreg-regqueryvaluew.md +++ b/sdk-api-src/content/winreg/nf-winreg-regqueryvaluew.md @@ -98,18 +98,18 @@ A pointer to a buffer that receives the default value of the specified key. -If lpValue is NULL, and lpcbValue is non-NULL, the function returns ERROR_SUCCESS, and stores the size of the data, in bytes, in the variable pointed to by lpcbValue. This enables an application to determine the best way to allocate a buffer for the value's data. +If lpData is NULL, and lpcbData is non-NULL, the function returns ERROR_SUCCESS, and stores the size of the data, in bytes, in the variable pointed to by lpcbData. This enables an application to determine the best way to allocate a buffer for the value's data. ### -param lpcbData [in, out, optional] -A pointer to a variable that specifies the size of the buffer pointed to by the lpValue parameter, in bytes. When the function returns, this variable contains the size of the data copied to lpValue, including any terminating null characters. +A pointer to a variable that specifies the size of the buffer pointed to by the lpData parameter, in bytes. When the function returns, this variable contains the size of the data copied to lpData, including any terminating null characters. If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, this size includes any terminating null character or characters. For more information, see Remarks. -If the buffer specified lpValue is not large enough to hold the data, the function returns ERROR_MORE_DATA and stores the required buffer size in the variable pointed to by lpcbValue. In this case, the contents of the lpValue buffer are undefined. +If the buffer specified lpData is not large enough to hold the data, the function returns ERROR_MORE_DATA and stores the required buffer size in the variable pointed to by lpcbData. In this case, the contents of the lpData buffer are undefined. ## -returns @@ -118,11 +118,11 @@ If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the return value is a system error code. -If the lpValue buffer is too small to receive the value, the function returns ERROR_MORE_DATA. +If the lpData buffer is too small to receive the value, the function returns ERROR_MORE_DATA. ## -remarks -If the ANSI version of this function is used (either by explicitly calling RegQueryValueA or by not defining UNICODE before including the Windows.h file), this function converts the stored Unicode string to an ANSI string before copying it to the buffer specified by the lpValue parameter. +If the ANSI version of this function is used (either by explicitly calling RegQueryValueA or by not defining UNICODE before including the Windows.h file), this function converts the stored Unicode string to an ANSI string before copying it to the buffer specified by the lpData parameter. If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, the string may not have been stored with the proper null-terminating characters. Therefore, even if the function returns ERROR_SUCCESS, the application should ensure that the string is properly terminated before using it; otherwise, it may overwrite a buffer. (Note that REG_MULTI_SZ strings should have two null-terminating characters.)