1 /*
2 * PROJECT: ReactOS api tests
3 * LICENSE: See COPYING in the top level directory
4 * PURPOSE: Test for NtCreateFile
5 * PROGRAMMER: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
6 */
7
8 #include "precomp.h"
9
START_TEST(NtCreateFile)10 START_TEST(NtCreateFile)
11 {
12 NTSTATUS Status;
13 HANDLE FileHandle;
14 IO_STATUS_BLOCK StatusBlock;
15
16 Status = NtCreateFile(&FileHandle,
17 FILE_READ_DATA,
18 (POBJECT_ATTRIBUTES)(ULONG_PTR)0xCCCCCCCCCCCCCCC8ULL,
19 &StatusBlock,
20 NULL,
21 FILE_ATTRIBUTE_NORMAL,
22 FILE_SHARE_READ,
23 FILE_OPEN_IF,
24 FILE_NON_DIRECTORY_FILE,
25 NULL,
26 0);
27
28 ok_hex(Status, STATUS_ACCESS_VIOLATION);
29
30 Status = NtCreateFile(&FileHandle,
31 FILE_READ_DATA,
32 (POBJECT_ATTRIBUTES)(ULONG_PTR)0xCCCCCCCCCCCCCCCFULL,
33 &StatusBlock,
34 NULL,
35 FILE_ATTRIBUTE_NORMAL,
36 FILE_SHARE_READ,
37 FILE_OPEN_IF,
38 FILE_NON_DIRECTORY_FILE,
39 NULL,
40 0);
41
42 ok_hex(Status, STATUS_DATATYPE_MISALIGNMENT);
43 }
44