The ReadUInt32FromUserAcquire function safely reads a UINT32 value from user-mode memory with acquire semantics.
Syntax
UINT32 ReadUInt32FromUserAcquire(
const volatile UINT32 *Source
);
Parameters
Source
[in]UINT32 値の読み取り元となるユーザー モードのメモリ位置へのポインター。
Return value
ReadUInt32FromUserAcquire returns the UINT32 value read from the specified user-mode memory address.
Remarks
この関数は、ユーザー モード メモリから UINT32 値を安全に読み取る方法を提供します。 指定されたアドレスが、読み取る前にユーザー モード のアドレスであることを確認します。 The acquire semantics ensure that subsequent memory operations can't be reordered before this read operation.
この関数では、配置は適用されません。
ソース アドレスがユーザー モード アドレスではない場合やアクセスできない場合など、メモリ アクセスが失敗した場合は、構造化例外が発生します。
この関数はコンパイラによって最適化されることも、関数が呼び出される前または関数が戻った後に (ソース コードが明示的にこれらのアクセスを実行しない限り) このメモリ位置への追加のアクセスを作成することもありません。 The memory access is performed with memory_order_acquire semantics.
この関数は、最新バージョンだけでなく、すべてのバージョンの 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以下 |