Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ResUtilSetSzValue function

Sets a string value in the cluster database. The PRESUTIL_SET_SZ_VALUE type defines a pointer to this function.

Syntax


DWORD WINAPI ResUtilSetSzValue(
  _In_        HKEY    hkeyClusterKey,
  _In_        LPCWSTR pszValueName,
  _In_        LPCWSTR pszNewValue,
  _Inout_opt_ LPWSTR  *ppszOutValue
);

typedef DWORD (WINAPI *PRESUTIL_SET_SZ_VALUE)(
    _In_        HKEY    hkeyClusterKey,
    _In_        LPCWSTR pszValueName,
    _In_        LPCWSTR pszNewValue,
    _Inout_opt_ LPWSTR  *ppszOutString
);

Parameters

hkeyClusterKey [in]

Key identifying the location of the string value in the cluster database.

pszValueName [in]

Null-terminated Unicode string containing the name of the value to update.

pszNewValue [in]

Pointer to the new string value.

ppszOutValue [in, out, optional]

Pointer to a string pointer that receives a copy of the updated value. If used, callers must call LocalFree on *ppszOutValue.

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.

ERROR_NOT_ENOUGH_MEMORY

An error occurred while attempting to allocate memory.

Remarks

The ResUtilSetSzValue utility function allocates memory for the new value and calls the Cluster API function ClusterRegSetValue. If necessary, a previous value is deallocated. The new value is copied to the content of ppszOutValue.

Be sure to call LocalFree on *ppszOutValue to avoid memory leaks.

Do not call ResUtilSetSzValue from the following resource DLL entry point functions:

ResUtilSetSzValue 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

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

Header

ResApi.h

Library

ResUtils.lib

DLL

ResUtils.dll

See also

ClusterRegSetValue
ResUtilSetBinaryValue
ResUtilSetDwordValue
ResUtilSetExpandSzValue
ResUtilSetMultiSzValue

 

 

Show: