SHOpenRegStream function
Deprecated. Opens a registry value and supplies a stream that can be used to read from or write to the value.
Syntax
IStream* SHOpenRegStream( _In_ HKEY hkey, _In_opt_ LPCTSTR pszSubkey, _In_opt_ LPCTSTR pszValue, _In_ DWORD grfMode );
Parameters
- hkey [in]
-
Type: HKEY
Required. The subtree, such as HKEY_LOCAL_MACHINE, that contains the value.
- 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.
- pszValue [in, optional]
-
Type: LPCTSTR
Pointer to a null-terminated string that specifies the value to be accessed. This value can be NULL.
- grfMode [in]
-
Type: DWORD
The type of access for the stream. This can be one of the following values:
Return value
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, 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.
Requirements
|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
SHOpenRegStreamW (Unicode) and SHOpenRegStreamA (ANSI) |