Share via


IDebugMemoryContext2::Compare

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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.

Syntax

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