The WriteStructToModeHelper function is a helper function that safely writes a structure of a specified size to memory based on the specified processor mode.
Syntax
VOID WriteStructToModeHelper(
  VOID            *Destination,
  const VOID      *Source,
  SIZE_T          Size,
  KPROCESSOR_MODE Mode
);
Parameters
Destination
[out]指向要写入数据的内存位置的指针。
Source
[in]指向要写入目标内存位置的数据的指针。
Size
[in]要写入的数据的大小(以字节为单位)。
Mode
[in]确定内存访问的执行方式的处理器模式。
Return value
None
Remarks
此函数是 usermode 访问器函数在内部使用的帮助程序函数。 它在访问用户模式内存时提供对结构进行模式感知写入,并提供额外的安全检查。
Requirements
| Requirement | Value | 
|---|---|
| 最低支持的客户端 | See Remarks | 
| Header | usermode_accessors.h | 
| Library | umaccess.lib | 
| IRQL | 小于或等于APC_LEVEL |