次の方法で共有


InterlockedAnd64ToUser 関数 (usermode_accessors.h)

The InterlockedAnd64ToUser function performs an atomic AND operation on a 64-bit value in user-mode memory.

Syntax

LONG64 InterlockedAnd64ToUser(
  LONG64 volatile *Destination,
  LONG64          Value
);

Parameters

Destination

[入力、出力]最初のオペランドを含むユーザー モードのメモリ位置へのポインター。 この値は、操作の結果に置き換えられます。 The pointer must be naturally aligned for the data type; that is, the memory ___location must be 8-byte aligned since Destination points to an 8-byte type.

Value

[in]2 番目のオペランド。

Return value

The function returns the original value of the Destination parameter.

Remarks

インターロックされた関数は、複数のスレッドによって共有される変数へのアクセスを同期するための簡単なメカニズムを提供します。 この関数は、他のインターロックされた関数の呼び出しに関してアトミックです。 これにより、メモリ操作が順番に完了するように、完全なメモリ バリアが生成されます。

This function provides atomic access to a 64-bit value in user-mode memory, performing a bitwise AND operation between the value at Destination and Value.

この関数は、転送先アドレスが有効なユーザー モード アドレスではない場合やアクセスできない場合など、操作が失敗した場合に構造化例外を発生させます。

この関数は、最新バージョンだけでなく、すべてのバージョンの Windows で動作します。 You need to consume the latest WDK to get the function declaration from the usermode_accessors.h header. You also need the library (umaccess.lib) from the latest WDK. ただし、結果として得られるドライバーは、古いバージョンの Windows では正常に動作します。

Requirements

Requirement Value
サポートされる最小クライアント See Remarks
Header usermode_accessors.h
Library umaccess.lib
IRQL APC_LEVEL以下

See also

InterlockedAnd64ToMode

InterlockedAndToUser

InterlockedOr64ToUser

InterlockedCompareExchange64ToUser