ReactOS
0.4.16-dev-1946-g52006dd
NtCreateThread.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS api tests
3
* LICENSE: See COPYING in the top level directory
4
* PURPOSE: Test for NtCreateThread
5
* PROGRAMMER: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
6
*/
7
8
#include "
precomp.h
"
9
10
START_TEST
(
NtCreateThread
)
11
{
12
NTSTATUS
Status
;
13
INITIAL_TEB
InitialTeb;
14
HANDLE
ThreadHandle;
15
OBJECT_ATTRIBUTES
Attributes
;
16
17
InitializeObjectAttributes
(&
Attributes
,
NULL
, 0,
NULL
,
NULL
);
18
ZeroMemory
(&InitialTeb,
sizeof
(
INITIAL_TEB
));
19
20
Status
=
NtCreateThread
(&ThreadHandle,
21
0,
22
&
Attributes
,
23
NtCurrentProcess
(),
24
NULL
,
25
(
PCONTEXT
)0x70000000,
/* Aligned usermode address */
26
&InitialTeb,
27
FALSE
);
28
29
ok_hex
(
Status
,
STATUS_ACCESS_VIOLATION
);
30
}
ok_hex
#define ok_hex(expression, result)
Definition:
atltest.h:94
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
NULL
#define NULL
Definition:
types.h:112
FALSE
#define FALSE
Definition:
types.h:117
STATUS_ACCESS_VIOLATION
#define STATUS_ACCESS_VIOLATION
Definition:
fpEnumPrinters.c:23
Status
Status
Definition:
gdiplustypes.h:25
void
Definition:
nsiface.idl:2307
ZeroMemory
#define ZeroMemory
Definition:
minwinbase.h:31
InitializeObjectAttributes
#define InitializeObjectAttributes(p, n, a, r, s)
Definition:
reg.c:106
NtCurrentProcess
#define NtCurrentProcess()
Definition:
nt_native.h:1660
NtCreateThread
NTSYSAPI NTSTATUS NTAPI NtCreateThread(OUT PHANDLE phThread, IN ACCESS_MASK AccessMask, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE hProcess, OUT PCLIENT_ID pClientId, IN PCONTEXT pContext, OUT PSTACKINFO pStackInfo, IN BOOLEAN bSuspended)
_CONTEXT
Definition:
nt_native.h:1409
_INITIAL_TEB
Definition:
pstypes.h:730
_OBJECT_ATTRIBUTES
Definition:
umtypes.h:184
Attributes
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition:
wdfcommonbuffer.h:97
precomp.h
modules
rostests
apitests
ntdll
NtCreateThread.c
Generated on Thu Dec 4 2025 06:08:17 for ReactOS by
1.9.6