ReactOS 0.4.16-dev-197-g92996da
NtQueryInformationFile.c File Reference
#include "precomp.h"
Include dependency graph for NtQueryInformationFile.c:

Go to the source code of this file.

Macros

#define ntv6(x)   (LOBYTE(LOWORD(GetVersion())) >= 6 ? (x) : 0)
 

Functions

 START_TEST (NtQueryInformationFile)
 

Macro Definition Documentation

◆ ntv6

#define ntv6 (   x)    (LOBYTE(LOWORD(GetVersion())) >= 6 ? (x) : 0)

Definition at line 10 of file NtQueryInformationFile.c.

Function Documentation

◆ START_TEST()

START_TEST ( NtQueryInformationFile  )

Definition at line 12 of file NtQueryInformationFile.c.

13{
15
18 ntv6(Status == STATUS_NOT_IMPLEMENTED), "Status = %lx\n", Status);
19
20 Status = NtQueryInformationFile(NULL, NULL, NULL, 0, 0x80000000);
22 ntv6(Status == STATUS_NOT_IMPLEMENTED), "Status = %lx\n", Status);
23
24 /* Get the full path of the current executable */
27 ok(Length != 0, "GetModuleFileNameA failed\n");
28 if (Length == 0)
29 return;
30
31 /* Open the file */
35 NULL,
38 NULL);
39 ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA failed\n");
41 return;
42
43 /* Query FileEndOfFileInformation */
44 FILE_END_OF_FILE_INFORMATION EndOfFileInformation;
45 EndOfFileInformation.EndOfFile.QuadPart = 0xdeaddead;
47 NULL,
48 &EndOfFileInformation,
49 sizeof(EndOfFileInformation),
52 ok(EndOfFileInformation.EndOfFile.QuadPart == 0xdeaddead, "EndOfFile is modified\n");
53
55}
#define ntv6(x)
PRTL_UNICODE_STRING_BUFFER Path
#define ok_hex(expression, result)
Definition: atltest.h:94
#define ok(value,...)
Definition: atltest.h:57
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
#define NULL
Definition: types.h:112
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define GENERIC_READ
Definition: compat.h:135
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define FILE_SHARE_READ
Definition: compat.h:136
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
unsigned long DWORD
Definition: ntddk_ex.h:95
@ FileEndOfFileInformation
Definition: from_kernel.h:81
Status
Definition: gdiplustypes.h:25
_In_ HANDLE hFile
Definition: mswsock.h:90
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_INVALID_INFO_CLASS
Definition: ntstatus.h:240
#define _countof(array)
Definition: sndvol32.h:70
LONGLONG QuadPart
Definition: typedefs.h:114
char CHAR
Definition: xmlstorage.h:175