[WS2_32_APITEST]
[reactos.git] / rostests / apitests / ntdll / NtCreateThread.c
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 #define WIN32_NO_STATUS
9 #include <wine/test.h>
10 #include <ndk/pstypes.h>
11 #include <ndk/psfuncs.h>
12
13 START_TEST(NtCreateThread)
14 {
15 NTSTATUS Status;
16 INITIAL_TEB InitialTeb;
17 HANDLE ThreadHandle;
18 OBJECT_ATTRIBUTES Attributes;
19
20 InitializeObjectAttributes(&Attributes, NULL, 0, NULL, NULL);
21 ZeroMemory(&InitialTeb, sizeof(INITIAL_TEB));
22
23 Status = NtCreateThread(&ThreadHandle,
24 0,
25 &Attributes,
26 NtCurrentProcess(),
27 NULL,
28 (PCONTEXT)0x70000000, /* Aligned usermode address */
29 &InitialTeb,
30 FALSE);
31
32 ok_hex(Status, STATUS_ACCESS_VIOLATION);
33 }