__readgsbyte, __readgsdword, __readgsqword, __readgsword

 

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 __readgsbyte, __readgsdword, __readgsqword, __readgsword.

Microsoft Specific**

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

unsigned char __readgsbyte(   
   unsigned long Offset   
);  
unsigned short __readgsword(   
   unsigned long Offset   
);  
unsigned long __readgsdword(   
   unsigned long Offset  
);  
unsigned __int64 __readgsqword(   
   unsigned long Offset   
);  

Parameters

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

The memory contents of the byte, word, double word, or quadword (as indicated by the name of the function called) at the location GS:[``Offset``].

IntrinsicArchitecture
__readgsbytex64
__readgsdwordx64
__readgsqwordx64
__readgswordx64

Header file <intrin.h>

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

__writegsbyte, __writegsdword, __writegsqword, __writegsword
Compiler Intrinsics

Show: