ResUtilSetMultiSzValue function (resapi.h)
Sets a multiple string value in the cluster database. The PRESUTIL_SET_MULTI_SZ_VALUE type defines a pointer to this function.
Syntax
DWORD ResUtilSetMultiSzValue(
[in] HKEY hkeyClusterKey,
[in] LPCWSTR pszValueName,
[in] LPCWSTR pszNewValue,
[in] DWORD cbNewValueSize,
[out, optional] LPWSTR *ppszOutValue,
[in, out, optional] LPDWORD pcbOutValueSize
);
Parameters
[in] hkeyClusterKey
Key identifying the location of the multiple string value in the cluster database.
[in] pszValueName
Null-terminated Unicode string containing the name of the value to update.
[in] pszNewValue
Pointer to the new multiple string value.
[in] cbNewValueSize
Size of the new value.
[out, optional] ppszOutValue
Pointer to a string pointer that receives a copy of the updated value. If used, callers must call LocalFree on *ppszOutValue.
[in, out, optional] pcbOutValueSize
Pointer that receives the size of the new value.
Return value
If the operation succeeds, the function returns ERROR_SUCCESS.
If the operation fails, the function returns a system error code. The following is a possible error code.
Return code | Description |
---|---|
|
An error occurred while attempting to allocate memory. |
Remarks
The ResUtilSetMultiSzValue utility function allocates memory for the new value and calls the Cluster API function ClusterRegSetValue.
A multiple string value is a large string containing smaller, contiguous, null-terminated Unicode strings and ending with an extra null character after the last string.
Be sure to call LocalFree on *ppszOutValue to avoid memory leaks.
Do not call ResUtilSetMultiSzValue from the following resource DLL entry point functions:
ResUtilSetMultiSzValue can be safely called from any other resource DLL entry point function or from a worker thread. For more information, see Function Calls to Avoid in Resource DLLs.Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008 Enterprise, Windows Server 2008 Datacenter |
Target Platform | Windows |
Header | resapi.h |
Library | ResUtils.lib |
DLL | ResUtils.dll |