Skip to content

Latest commit

 

History

History
119 lines (81 loc) · 3.91 KB

nf-shlwapi-shopenregstream2a.md

File metadata and controls

119 lines (81 loc) · 3.91 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:shlwapi.SHOpenRegStream2A
SHOpenRegStream2A function (shlwapi.h)
Opens a registry value and supplies a stream that can be used to read from or write to the value. This function supersedes SHOpenRegStream. (ANSI)
SHOpenRegStream2A
STGM_READ
STGM_READWRITE
STGM_WRITE
shlwapi/SHOpenRegStream2A
shell\SHOpenRegStream2.htm
shell
2450dde0-cd02-4d48-be40-467b4b8be240
12/05/2018
SHOpenRegStream2, SHOpenRegStream2 function [Windows Shell], SHOpenRegStream2A, SHOpenRegStream2W, STGM_READ, STGM_READWRITE, STGM_WRITE, _win32_SHOpenRegStream2, shell.SHOpenRegStream2, shlwapi/SHOpenRegStream2, shlwapi/SHOpenRegStream2A, shlwapi/SHOpenRegStream2W
shlwapi.h
Windows
Windows 2000 Professional, Windows XP [desktop apps only]
Windows 2000 Server [desktop apps only]
SHOpenRegStream2W (Unicode) and SHOpenRegStream2A (ANSI)
Shlwapi.lib
Shlwapi.dll (version 5.0 or later)
Windows
19H1
SHOpenRegStream2A
shlwapi/SHOpenRegStream2A
c++
APIRef
kbSyntax
DllExport
Shlwapi.dll
API-MS-Win-DownLevel-shlwapi-l2-1-0.dll
ShCore.dll
API-MS-Win-DownLevel-shlwapi-l2-1-1.dll
API-MS-Win-ShCore-stream-l1-1-0.dll
SHOpenRegStream2
SHOpenRegStream2A
SHOpenRegStream2W

SHOpenRegStream2A function

-description

Opens a registry value and supplies a stream that can be used to read from or write to the value. This function supersedes SHOpenRegStream.

-parameters

-param hkey [in]

Type: HKEY

Required. The subtree, such as HKEY_LOCAL_MACHINE, that contains the value.

-param pszSubkey [in, optional]

Type: LPCTSTR

Optional. Pointer to a null-terminated string that specifies the subkey that contains the value. This value can be NULL.

-param pszValue [in, optional]

Type: LPCTSTR

Pointer to a null-terminated string that specifies the value to be accessed. This value can be NULL.

-param grfMode [in]

Type: DWORD

The type of access for the stream. This can be one of the following values:

STGM_READ

Open the stream for reading.

STGM_WRITE

Open the stream for writing.

STGM_READWRITE

Open the stream for reading and writing.

-returns

Type: IStream*

Returns an IStream interface pointer if successful; otherwise, NULL. A NULL value can be caused by several situations, including an invalid hkey or pszSubkey, a subkey named by pszSubkey that does not exist, a caller without sufficient permissions to access the subkey, or an inability to open the stream.

-remarks

The calling application is responsible for calling the Release method of the returned object when that IStream object is no longer needed.

Note

The shlwapi.h header defines SHOpenRegStream2 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.