Export (0) Print
Expand All
Expand Minimize

OpenRegStream function

[OpenRegStream is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use SHOpenRegStream2 or SHOpenRegStream.]

Opens a registry value and supplies an IStream interface that can be used to read from or write to the value.

Syntax


IStream* OpenRegStream(
  _In_      HKEY hkey,
  _In_opt_  PCWSTR pszSubkey,
  _In_opt_  PCWSTR pszValue,
  DWORD grfMode
);

Parameters

hkey [in]

Type: HKEY

A handle to the key that is currently open.

pszSubkey [in, optional]

Type: PCWSTR

A null-terminated Unicode string that specifies the name of the subkey.

pszValue [in, optional]

Type: PCWSTR

A null-terminated Unicode string that specifies the value to be accessed.

grfMode

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.

Return value

Type: IStream*

Returns the address of an IStream interface if successful, or NULL otherwise.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP with SP2

End of server support

Windows Server 2003

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 5.0 or later)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft