IDebugRegisters2::SetValues2 method (dbgeng.h)

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

Syntax

HRESULT SetValues2(
  [in]           ULONG        Source,
  [in]           ULONG        Count,
  [in, optional] PULONG       Indices,
  [in]           ULONG        Start,
  [in]           PDEBUG_VALUE Values
);

Parameters

[in] Source

Specifies the register source to query.

The possible values are listed in the following table.

Value Register source
DEBUG_REGSRC_DEBUGGEE Fetch register information from the target.
DEBUG_REGSRC_EXPLICIT Fetch register information from the current explicit register context.
DEBUG_REGSRC_FRAME Fetch register information from the current scope's register context.
Note   Stack unwinding does not guarantee accurate updating of the register context, so the scope frame's register context might not be accurate in all cases.
 

[in] Count

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

[in, optional] 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.

[in] Start

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

[in] Values

An array that contains the values to which to set the registers. The number of elements that 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.

Remarks

The engine does its best to cast the values in Values into the type of the registers; this conversion 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 that contains it is also altered.

The method SetValues performs the same task as this method but always uses the target as the register source.

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

Requirements

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

See also

IDebugRegisters2

SetValue

SetValues