Skip to content

Latest commit

 

History

History
158 lines (117 loc) · 5.47 KB

nf-winreg-regloadmuistringa.md

File metadata and controls

158 lines (117 loc) · 5.47 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:winreg.RegLoadMUIStringA
RegLoadMUIStringA function (winreg.h)
Loads the specified string from the specified key and subkey. (ANSI)
REG_MUI_STRING_TRUNCATE
RegLoadMUIStringA
winreg/RegLoadMUIStringA
base\regloadmuistring.htm
winprog
76ffc77f-a1bc-4e01-858f-4a76563a2bbc
12/05/2018
REG_MUI_STRING_TRUNCATE, RegLoadMUIString, RegLoadMUIString function, RegLoadMUIStringA, RegLoadMUIStringW, base.regloadmuistring, winreg/RegLoadMUIString, winreg/RegLoadMUIStringA, winreg/RegLoadMUIStringW
winreg.h
Windows.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
RegLoadMUIStringW (Unicode) and RegLoadMUIStringA (ANSI)
Advapi32.lib
Advapi32.dll
Windows
19H1
RegLoadMUIStringA
winreg/RegLoadMUIStringA
c++
APIRef
kbSyntax
DllExport
Advapi32.dll
API-MS-Win-Core-Localregistry-l1-1-0.dll
KernelBase.dll
API-MS-Win-Core-Registry-l1-1-0.dll
API-MS-Win-DownLevel-AdvApi32-l1-1-0.dll
API-MS-Win-DownLevel-AdvApi32-l1-1-1.dll
MinKernelBase.dll
api-ms-win-core-registry-l1-1-1.dll
RegLoadMUIString
RegLoadMUIStringA
RegLoadMUIStringW

RegLoadMUIStringA function

-description

Loads the specified string from the specified key and subkey.

-parameters

-param hKey [in]

A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right. For more information, see Registry Key Security and Access Rights.

This handle is returned by the RegCreateKeyEx or RegOpenKeyEx function. It can also be one of the following predefined keys:

HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

-param pszValue [in, optional]

The name of the registry value.

-param pszOutBuf [out, optional]

A pointer to a buffer that receives the string.

Strings of the following form receive special handling:

@[path]\dllname,-strID

The string with identifier strID is loaded from dllname; the path is optional. If the pszDirectory parameter is not NULL, the directory is prepended to the path specified in the registry data. Note that dllname can contain environment variables to be expanded.

-param cbOutBuf [in]

The size of the pszOutBuf buffer, in bytes.

-param pcbData [out, optional]

A pointer to a variable that receives the size of the data copied to the pszOutBuf buffer, in bytes.

If the buffer is not large enough to hold the data, the function returns ERROR_MORE_DATA and stores the required buffer size in the variable pointed to by pcbData. In this case, the contents of the buffer are undefined.

-param Flags [in]

This parameter can be 0 or the following value.

Value Meaning
REG_MUI_STRING_TRUNCATE
0x00000001
The string is truncated to fit the available size of the pszOutBuf buffer. If this flag is specified, pcbData must be NULL.

-param pszDirectory [in, optional]

The directory path.

-returns

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a system error code.

If the pcbData buffer is too small to receive the string, the function returns ERROR_MORE_DATA.

The ANSI version of this function returns ERROR_CALL_NOT_IMPLEMENTED.

-remarks

The RegLoadMUIString function is supported only for Unicode. Although both Unicode (W) and ANSI (A) versions of this function are declared, the RegLoadMUIStringA function returns ERROR_CALL_NOT_IMPLEMENTED. Applications should explicitly call RegLoadMUIStringW or specify Unicode as the character set in platform invoke (PInvoke) calls.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later. For more information, see Using the Windows Headers.

Note

The winreg.h header defines RegLoadMUIString 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.

-see-also

Registry Functions