Changeset 2019 for trunk/src/kmk/w32/tstFileInfo.c
- Timestamp:
- Nov 2, 2008, 1:21:05 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/w32/tstFileInfo.c
r1179 r2019 1 /* $Id: $ */ 2 /** @file 3 * Test program for some NtQueryInformationFile functionality. 4 */ 5 6 /* 7 * Copyright (c) 2007-2008 knut st. osmundsen <bird-src-spam@anduin.net> 8 * 9 * This file is part of kBuild. 10 * 11 * kBuild is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 3 of the License, or 14 * (at your option) any later version. 15 * 16 * kBuild is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with kBuild. If not, see <http://www.gnu.org/licenses/> 23 * 24 */ 25 26 1 27 2 28 #include <stdio.h> … … 53 79 typedef LONG NTSTATUS; 54 80 55 typedef struct _IO_STATUS_BLOCK 81 typedef struct _IO_STATUS_BLOCK 56 82 { 57 83 union … … 63 89 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; 64 90 65 NTSYSAPI 91 NTSYSAPI 66 92 NTSTATUS 67 93 NTAPI 68 NtQueryInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, 69 ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); 94 NtQueryInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, 95 ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); 70 96 71 97 … … 76 102 int i; 77 103 78 NTSTATUS (NTAPI *pfnNtQueryInformationFile)(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, 79 ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); 104 NTSTATUS (NTAPI *pfnNtQueryInformationFile)(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, 105 ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); 80 106 81 107 pfnNtQueryInformationFile = GetProcAddress(LoadLibrary("ntdll.dll"), "NtQueryInformationFile"); … … 104 130 printf("#%d: %s - rcNt=%#x - FileNameInformation:\n" 105 131 " FileName: %ls\n" 106 " FileNameLength: %lu\n", 107 i, argv[i], rcNt, 108 pFileNameInfo->FileName, 132 " FileNameLength: %lu\n", 133 i, argv[i], rcNt, 134 pFileNameInfo->FileName, 109 135 pFileNameInfo->FileNameLength 110 136 ); … … 123 149 return rc; 124 150 } 151
Note:
See TracChangeset
for help on using the changeset viewer.