ResUtilSetBinaryValue

The ResUtilSetBinaryValue utility function sets a binary value in the cluster database.

DWORD WINAPI ResUtilSetBinaryValue(
  HKEY ClusterKey,       
  LPCWSTR ValueName,       
  const LPBYTE NewValue,  
  DWORD NewValueSize,     
  LPBYTE * OutValue,      
  LPDWORD OutValueSize    
);
 

Parameters

ClusterKey
[in] Key identifying the location of the binary value in the cluster database.
ValueName
[in] Name of the value to update.
NewValue
[in] Pointer to the new binary value.
NewValueSize
[in] Size of the new binary value.
OutValue
[in, out] Address of a pointer to the new binary value.
OutValueSize
[in, out] Pointer to a DWORD in which the size in bytes of the value pointed to by OutValue is returned.

Return Values

ERROR_SUCCESS
The operation completed successfully.
ERROR_NOT_ENOUGH_MEMORY
An error occurred during memory allocation.

ResUtilSetBinaryValue can also return Win32® error codes that are returned by ClusterRegSetValue.

Notes to Callers

ResUtilSetBinaryValue allocates memory for the OutValue pointer using the Win32 function LocalAlloc, calls the Cluster API function ClusterRegSetValue, and then copies the new value to this buffer. If the pointer is not null, ResUtilSetBinaryValue also deallocates it. As callers of this function, you are responsible for deallocating the buffer using the Win32 function LocalFree.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in clusapi.h.