IDebugRegisters2::SetValues method

The SetValues method sets the value of several of the target's registers.

Syntax

HRESULT SetValues(
  ULONG        Count,
  PULONG       Indices,
  ULONG        Start,
  PDEBUG_VALUE Values
);

Parameters

Count

Specifies the number of registers for which to set the values.

Indices

Specifies an array that contains the indices of the registers for which to set the values. The number of elements in this array is Count. If Indices is NULL, Start is used instead.

Start

If Indices is NULL, the registers will be set consecutively starting at this index. Otherwise it is ignored.

Values

Specifies the array that contains values to which to set the registers. The number of elements this array holds is Count. See DEBUG_VALUE for a description of this parameter type.

Return Value

This list does not contain all the errors that might occur. For a list of possible errors, see HRESULT Values.

Return code Description
S_OK
The method was successful.
E_UNEXPECTED
The target is not accessible, or one or more of the registers could not be accessed.
E_INVALIDARG
The value of the index of one or more of the registers is greater than the number of registers on the target machine.

Remarks

The engine does its best to coerce the values in Values into the type of the registers; this coercion is the same as that performed by CoerceValue. If the value is larger than what the register can hold, the least significant bits are dropped. Floating-point and integer conversions will also be performed if necessary.

If the return value is not S_OK, some of the registers still might have been set.

When a subregister is altered, the register containing it is also altered.

To set the value of only a single register, use the SetValue method instead.

The method SetValues2 performs the same task as this method but also allows the register source to be specified.

For an overview of the IDebugRegisters interface and other register-related methods, see Registers.

Requirements

   
Target Platform Desktop
Header dbgeng.h (include DbgEng.h)

See Also

IDebugRegisters

IDebugRegisters2

SetValue

SetValues2