reactos/modules/rostests/apitests/ntdll/NtCreateThread.c

31 lines
894 B
C
Raw Normal View History

/*
* PROJECT: ReactOS api tests
* LICENSE: See COPYING in the top level directory
* PURPOSE: Test for NtCreateThread
* PROGRAMMER: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
2017-12-02 20:05:46 +00:00
#include "precomp.h"
START_TEST(NtCreateThread)
{
NTSTATUS Status;
INITIAL_TEB InitialTeb;
HANDLE ThreadHandle;
OBJECT_ATTRIBUTES Attributes;
InitializeObjectAttributes(&Attributes, NULL, 0, NULL, NULL);
ZeroMemory(&InitialTeb, sizeof(INITIAL_TEB));
Status = NtCreateThread(&ThreadHandle,
0,
&Attributes,
NtCurrentProcess(),
NULL,
(PCONTEXT)0x70000000, /* Aligned usermode address */
&InitialTeb,
FALSE);
ok_hex(Status, STATUS_ACCESS_VIOLATION);
}