This topic has not yet been rated - Rate this topic

SHRegGetIntW function

Applies to: desktop apps only

Reads a numeric string value from the registry and converts it to an integer.

Syntax

int SHRegGetIntW(
  __in  HKEY hk,
  __in  LPCWSTR szKey,
  __in  int nDefault
);

Parameters

hk [in]

Type: HKEY

A handle to the registry key that specifies the value to be read.

szKey [in]

Type: LPCWSTR

A pointer to a string value that specifies the name of the value to be read. The string must be null-terminated.

nDefault [in]

Type: int

An int that specifies the value returned if the registry value cannot be retrieved successfully.

Return value

Type: int

Returns the converted string as an int, or the default value specified by nDefault.

Remarks

Prior to Windows 2000 Service Pack 3 (SP3), Windows Server 2003 Service Pack 1 (SP1), and Windows XP, SHRegGetIntW was not exported by name. On those systems you must load it directly from Shlwapi.dll as ordinal 280.

This function is only available in a Unicode version. ANSI is not supported.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll

Unicode and ANSI names

SHRegGetIntW (Unicode)

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ