共用方式為


IDebugDocumentContext2::Compare

Compares this document context to a given array of document contexts.

HRESULT Compare( 
   DOCCONTEXT_COMPARE       compare,
   IDebugDocumentContext2** rgpDocContextSet,
   DWORD                    dwDocContextSetLen,
   DWORD*                   pdwDocContext
);
int Compare( 
   enum_ DOCCONTEXT_COMPARE compare,
   IDebugDocumentContext2[] rgpDocContextSet,
   uint                     dwDocContextSetLen,
   out uint                 pdwDocContext
);

Parameters

  • compare
    [in] A value from the DOCCONTEXT_COMPARE enumeration that specifies the type of comparison.

  • rgpDocContextSet
    [in] An array of IDebugDocumentContext2 objects that represent the document contexts being compared to.

  • dwDocContextSetLen
    [in] The length of the array of document contexts to compare.

  • pdwDocContext
    [out] Returns the index into the rgpDocContextSet array of the first document context that satisfies the comparison.

Return Value

Returns S_OK if a match was found. Returns S_FALSE if no match was found. Otherwise, returns an error code.

Remarks

The IDebugDocumentContext2 objects that are passed in the array must be implemented by the same debug engine that implements the IDebugDocumentContext2 object being called on; otherwise, the comparison is not valid.

See Also

Reference

IDebugDocumentContext2

DOCCONTEXT_COMPARE