Skip to content

Latest commit

 

History

History
120 lines (88 loc) · 4.06 KB

nf-winreg-regdeletevaluea.md

File metadata and controls

120 lines (88 loc) · 4.06 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winreg.RegDeleteValueA
RegDeleteValueA function (winreg.h)
Removes a named value from the specified registry key. (ANSI)
RegDeleteValueA
winreg/RegDeleteValueA
base\regdeletevalue.htm
winprog
4393b4ef-cd10-40d4-bb12-2d84e7cb7d3c
12/05/2018
RegDeleteValue, RegDeleteValue function, RegDeleteValueA, RegDeleteValueW, _win32_regdeletevalue, base.regdeletevalue, winreg/RegDeleteValue, winreg/RegDeleteValueA, winreg/RegDeleteValueW
winreg.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
RegDeleteValueW (Unicode) and RegDeleteValueA (ANSI)
Advapi32.lib
Advapi32.dll
Windows
19H1
RegDeleteValueA
winreg/RegDeleteValueA
c++
APIRef
kbSyntax
DllExport
Advapi32.dll
API-MS-Win-Core-Localregistry-l1-1-0.dll
KernelBase.dll
API-MS-Win-Core-Registry-l1-1-0.dll
API-MS-Win-DownLevel-AdvApi32-l1-1-0.dll
API-MS-Win-DownLevel-AdvApi32-l1-1-1.dll
MinKernelBase.dll
api-ms-win-core-registry-l1-1-1.dll
RegDeleteValue
RegDeleteValueA
RegDeleteValueW

RegDeleteValueA function

-description

Removes a named value from the specified registry key. Note that value names are not case sensitive.

-parameters

-param hKey [in]

A handle to an open registry key. The key must have been opened with the KEY_SET_VALUE access right. For more information, see Registry Key Security and Access Rights.

This handle is returned by the RegCreateKeyEx, RegCreateKeyTransacted, RegOpenKeyEx, or RegOpenKeyTransacted function. It can also be one of the following predefined keys:


   HKEY_CLASSES_ROOT
   HKEY_CURRENT_CONFIG
   HKEY_CURRENT_USER
   HKEY_LOCAL_MACHINE
   HKEY_USERS

-param lpValueName [in, optional]

The registry value to be removed. If this parameter is NULL or an empty string, the value set by the RegSetValueEx function is removed.

For more information, see Registry Element Size Limits.

-returns

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.

-see-also

RegSetValueEx

Registry Functions

Registry Overview

-remarks

Note

The winreg.h header defines RegDeleteValue as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.