PRESUTIL_GET_SZ_VALUE callback function

Returns a string value from the cluster database.

Syntax

PRESUTIL_GET_SZ_VALUE PresutilGetSzValue;

LPWSTR PresutilGetSzValue(
  IN HKEY hkeyClusterKey,
  IN LPCWSTR pszValueName
)
{...}

Parameters

hkeyClusterKey

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

pszValueName

A null-terminated Unicode string containing the name of the value to retrieve.

Return Value

If the operation succeeds, the function returns a pointer to a buffer containing the string value.

If the operation fails, the function returns NULL. For more information, call the function GetLastError.

Remarks

The ResUtilGetSzValue utility function allocates the necessary memory for the string parameter value before calling the Cluster API function ClusterRegQueryValue to access the cluster database. When you are finished with this memory, you must call the function LocalFree to release it.

ResUtilGetSzValue also supports expandable and multiple string formats.

Requirements

   
Windows version None supported Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header resapi.h

See Also

ClusterRegQueryValue

ResUtilGetBinaryValue

ResUtilGetDwordValue

ResUtilGetExpandSzValue

ResUtilGetMultiSzValue