Partager via


IDebugMemoryContext2::Compare

Compares the memory context to each context in the given array in the manner indicated by compare flags, returning an index of the first context that matches.

HRESULT Compare( 
   CONTEXT_COMPARE        compare,
   IDebugMemoryContext2** rgpMemoryContextSet,
   DWORD                  dwMemoryContextSetLen,
   DWORD*                 pdwMemoryContext
);
int Compare(
   enum_CONTEXT_COMPARE   compare, 
   IDebugMemoryContext2[] rgpMemoryContextSet, 
   uint                   dwMemoryContextSetLen, 
   out uint               pdwMemoryContext
);

Parameters

  • compare
    [in] A value from the CONTEXT_COMPARE enumeration that determines the type of comparison.

  • rgpMemoryContextSet
    [in] An array of references to the IDebugMemoryContext2 objects to compare against.

  • dwMemoryContextSetLen
    [in] The number of contexts in the rgpMemoryContextSet array.

  • pdwMemoryContext
    [out] Returns the index of the first memory context that satisfies the comparison.

Return Value

If successful, returns S_OK; otherwise, returns an error code. Returns E_COMPARE_CANNOT_COMPARE if the two contexts cannot be compared.

Remarks

A debug engine (DE) does not have to support all types of comparisons, but it must support at least CONTEXT_EQUAL, CONTEXT_LESS_THAN, CONTEXT_GREATER_THAN and CONTEXT_SAME_SCOPE.

See Also

Reference

IDebugMemoryContext2

CONTEXT_COMPARE