__writegsbyte, __writegsdword, __writegsqword, __writegsword

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at __writegsbyte, __writegsdword, __writegsqword, __writegsword.

Microsoft Specific**

Write memory to a location specified by an offset relative to the beginning of the GS segment.

void __writegsbyte(   
   unsigned long Offset,   
   unsigned char Data   
);  
void __writegsword(   
   unsigned long Offset,   
   unsigned short Data   
);  
void __writegsdword(   
   unsigned long Offset,   
   unsigned long Data   
);  
void __writegsqword(   
   unsigned long Offset,   
   unsigned __int64 Data   
);  

Parameters

[in] Offset
The offset from the beginning of GS to write to.

[in] Data
The value to write.

IntrinsicArchitecture
__writegsbytex64
__writegsdwordx64
__writegsqwordx64
__writegswordx64

Header file <intrin.h>

These intrinsics are available in kernel mode only, and these routines are only available as intrinsics.

__readgsbyte, __readgsdword, __readgsqword, __readgsword
Compiler Intrinsics

Show: