mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 11:56:26 +00:00
7c35998136
- Add test for NtCreateThread with invalid ThreadContext parameter. Patch by Aleksander Andrejevic. CORE-7252 svn path=/trunk/; revision=60402
34 lines
970 B
C
34 lines
970 B
C
/*
|
|
* 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>
|
|
*/
|
|
|
|
#define WIN32_NO_STATUS
|
|
#include <wine/test.h>
|
|
#include <ndk/pstypes.h>
|
|
#include <ndk/psfuncs.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);
|
|
}
|