Expand Minimize

InterlockedAnd function

The InterlockedAnd macro atomically computes a bitwise AND operation.

Syntax


LONG InterlockedAnd(
  _Inout_  LONG volatile *Destination,
  _In_     LONG Value
);

Parameters

Destination [in, out]

A pointer to the variable to be ANDed with Value. The result of the operation is stored in the variable.

Value [in]

Specifies the value to be ANDed with the variable that is pointed to by Destination.

Return value

InterlockedAnd returns the original value stored in the variable pointed to by Destination.

Remarks

InterlockedAnd atomically computes *Destination&=Value.

Interlocked operations cannot be used on non-cached memory.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

IRQL

Any level

See also

InterlockedOr
InterlockedXor

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft