diff --git a/rostests/apitests/ntdll/CMakeLists.txt b/rostests/apitests/ntdll/CMakeLists.txt index e30b7b80579..4fb7da1ee99 100644 --- a/rostests/apitests/ntdll/CMakeLists.txt +++ b/rostests/apitests/ntdll/CMakeLists.txt @@ -3,6 +3,7 @@ list(APPEND SOURCE LdrEnumResources.c NtAllocateVirtualMemory.c NtContinue.c + NtCreateFile.c NtCreateThread.c NtFreeVirtualMemory.c NtMapViewOfSection.c diff --git a/rostests/apitests/ntdll/NtCreateFile.c b/rostests/apitests/ntdll/NtCreateFile.c new file mode 100644 index 00000000000..a0f256d4246 --- /dev/null +++ b/rostests/apitests/ntdll/NtCreateFile.c @@ -0,0 +1,34 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: See COPYING in the top level directory + * PURPOSE: Test for NtCreateFile + * PROGRAMMER: Aleksandar Andrejevic + */ + +#define WIN32_NO_STATUS +#include +//#include +#include +//#include +//#include + +START_TEST(NtCreateFile) +{ + NTSTATUS Status; + HANDLE FileHandle; + IO_STATUS_BLOCK StatusBlock; + + Status = NtCreateFile(&FileHandle, + FILE_READ_DATA, + (POBJECT_ATTRIBUTES)0xCCCCCCCC, + &StatusBlock, + NULL, + FILE_ATTRIBUTE_NORMAL, + FILE_SHARE_READ, + FILE_OPEN_IF, + FILE_NON_DIRECTORY_FILE, + NULL, + 0); + + ok_hex(Status, STATUS_ACCESS_VIOLATION); +} diff --git a/rostests/apitests/ntdll/testlist.c b/rostests/apitests/ntdll/testlist.c index bf986ddd34f..8dfa718cee7 100644 --- a/rostests/apitests/ntdll/testlist.c +++ b/rostests/apitests/ntdll/testlist.c @@ -6,6 +6,7 @@ extern void func_LdrEnumResources(void); extern void func_NtAllocateVirtualMemory(void); extern void func_NtContinue(void); +extern void func_NtCreateFile(void); extern void func_NtCreateThread(void); extern void func_NtFreeVirtualMemory(void); extern void func_NtMapViewOfSection(void); @@ -31,6 +32,7 @@ const struct test winetest_testlist[] = { "LdrEnumResources", func_LdrEnumResources }, { "NtAllocateVirtualMemory", func_NtAllocateVirtualMemory }, { "NtContinue", func_NtContinue }, + { "NtCreateFile", func_NtCreateFile }, { "NtCreateThread", func_NtCreateThread }, { "NtFreeVirtualMemory", func_NtFreeVirtualMemory }, { "NtMapViewOfSection", func_NtMapViewOfSection },