The ReadBooleanFromUser function safely reads a BOOLEAN value from user-mode memory.
Syntax
BOOLEAN ReadBooleanFromUser(
const volatile BOOLEAN *Source
);
Parameters
Source
[in] BOOLEAN 값을 읽을 사용자 모드 메모리 위치에 대한 포인터입니다.
Return value
ReadBooleanFromUser returns the BOOLEAN value read from the specified user-mode memory address.
Remarks
이 함수는 사용자 모드 메모리에서 BOOLEAN 값을 읽는 안전한 방법을 제공합니다. 제공된 주소가 읽기 전에 사용자 모드 주소인지 확인합니다.
이 함수는 맞춤을 적용하지 않습니다.
원본 주소가 사용자 모드 주소가 아니거나 액세스할 수 없는 경우와 같이 메모리 액세스가 실패하는 경우 구조적 예외가 발생합니다.
이 함수는 컴파일러에서 최적화되지 않으며, 소스 코드가 이러한 액세스를 명시적으로 수행하지 않는 한 함수가 호출되기 전이나 함수가 반환된 후에 컴파일러가 이 메모리 위치에 대한 추가 액세스를 만들지 않습니다. The memory access is performed with memory_order_relaxed 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 작거나 같음 |