Export (0) Print
Expand All
3 out of 11 rated this helpful - Rate this topic

GetStringValue method of the StdRegProv class

The GetStringValue method returns the data value for a named value whose data type is REG_SZ.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax


uint32 GetStringValue(
  [in]  uint32 hDefKey = HKEY_LOCAL_MACHINE,
  string sSubKeyName,
  string sValueName,
  string sValue
);

Parameters

hDefKey [in]

A registry tree, also known as a hive, that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE.

The following trees are defined in WinReg.h.

HKEY_CLASSES_ROOT (2147483648 (0x80000000))
HKEY_CURRENT_USER (2147483649 (0x80000001))
HKEY_LOCAL_MACHINE (2147483650 (0x80000002))
HKEY_USERS (2147483651 (0x80000003))
HKEY_CURRENT_CONFIG (2147483653 (0x80000005))
sSubKeyName

[in] A path that contains the named values.

sValueName

[in] A named value whose data value you are retrieving. Specify an empty string to get the default named value.

sValue

[out] A data value for the named value.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository. Other examples are in books and articles listed in Further Information.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Namespace

\root\default

MOF

Regevent.mof

DLL

Stdprov.dll

See also

StdRegProv
Modifying the System Registry
WMI Tasks: Registry

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.