ReactOS
0.4.16-dev-927-g467dec4
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
inline_ntcurrentteb.h
Go to the documentation of this file.
1
#ifndef _INLINE_NT_CURRENTTEB_H_
2
#define _INLINE_NT_CURRENTTEB_H_
3
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
8
FORCEINLINE
struct
_TEB
*
NtCurrentTeb
(
VOID
)
9
{
10
#if defined(_M_IX86)
11
return
(
struct
_TEB
*)
__readfsdword
(0x18);
12
#elif defined(_M_AMD64)
13
return
(
struct
_TEB
*)__readgsqword(
FIELD_OFFSET
(
NT_TIB
, Self));
14
#elif defined(_M_ARM)
15
// return (struct _TEB *)KeGetPcr()->Used_Self;
16
return
(
struct
_TEB
*)(
ULONG_PTR
)_MoveFromCoprocessor(
CP15_TPIDRURW
);
17
#elif defined (_M_ARM64)
18
//UNIMPLEMENTED;
19
return
0;
20
// #elif defined(_M_PPC)
21
// return (struct _TEB *)_read_teb_dword(0x18);
22
#else
23
#error Unsupported architecture
24
#endif
25
}
26
27
#ifdef __cplusplus
28
}
29
#endif
30
31
#endif
// _INLINE_NT_CURRENTTEB_H_
ULONG_PTR
#define ULONG_PTR
Definition:
config.h:101
void
Definition:
nsiface.idl:2307
__readfsdword
PPC_QUAL unsigned long __readfsdword(const unsigned long Offset)
Definition:
intrin_ppc.h:382
NtCurrentTeb
#define NtCurrentTeb
Definition:
iphlpapi_private.h:4
CP15_TPIDRURW
#define CP15_TPIDRURW
Definition:
ketypes.h:131
_NT_TIB
Definition:
compat.h:710
_TEB
Definition:
compat.h:836
FIELD_OFFSET
#define FIELD_OFFSET(t, f)
Definition:
typedefs.h:255
FORCEINLINE
#define FORCEINLINE
Definition:
wdftypes.h:67
sdk
include
ndk
inline_ntcurrentteb.h
Generated on Sun Mar 30 2025 06:12:19 for ReactOS by
1.9.6