?/TD>
Microsoft DirectX 9.0

DISEQUENCE_COMPARE Macro


The DISEQUENCE_COMPARE macro compares two Microsoft?DirectInput?sequence numbers, compensating for wraparound.

Syntax

#define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
                ((int)((dwSequence1) - (dwSequence2)) cmp 0)

Parameters

dwSequence1
First sequence number to compare.
cmp
One of the following comparison operators: ==, !=, <, >, <=, or >=.
dwSequence2
Second sequence number to compare.

Return Value

Returns a nonzero value if the result of the comparison specified by the cmp parameter is true, or zero otherwise.



Remarks

The following example checks whether the dwSequence1 parameter value precedes the dwSequence2 parameter value chronologically.

BOOL Sooner = (DISEQUENCE_COMPARE(dwSequence1, <, dwSequence2)); 

Macro Information

Headerdinput.h
Minimum operating systems Windows 98


© 2002 Microsoft Corporation. All rights reserved.