IDebugRegisters::SetValue method

The SetValue method sets the value of one of the target's registers.

Syntax


HRESULT SetValue(
  [in] ULONG        Register,
  [in] PDEBUG_VALUE Value
);

Parameters

Register [in]

Specifies the index of the register whose value is to be set.

Value [in]

Specifies the value to which to set the register. 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 codeDescription
S_OK

The method was successful.

E_UNEXPECTED

The target is not accessible, or the register could not be accessed.

E_INVALIDARG

The value of Register is greater than the number of registers on the target machine.

 

Remarks

The engine does its best to coerce the value of Value into the type of the register; 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.

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

To set the values of multiple registers, use the SetValues method instead.

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
SetValues
SetValues2

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft