mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Add some more Ntdll calls
This commit is contained in:
+107
-1
@@ -15,10 +15,27 @@ foreign ntdll_lib {
|
|||||||
ProcessInformationLength: u32,
|
ProcessInformationLength: u32,
|
||||||
ReturnLength: ^u32,
|
ReturnLength: ^u32,
|
||||||
) -> u32 ---
|
) -> u32 ---
|
||||||
|
|
||||||
|
NtQueryInformationFile :: proc(
|
||||||
|
FileHandle: HANDLE,
|
||||||
|
IoStatusBlock: PIO_STATUS_BLOCK,
|
||||||
|
FileInformation: rawptr,
|
||||||
|
Length: ULONG,
|
||||||
|
FileInformationClass: FILE_INFORMATION_CLASS,
|
||||||
|
) -> NTSTATUS ---
|
||||||
|
}
|
||||||
|
|
||||||
|
PIO_STATUS_BLOCK :: ^IO_STATUS_BLOCK
|
||||||
|
IO_STATUS_BLOCK :: struct {
|
||||||
|
using _: struct #raw_union {
|
||||||
|
Status: NTSTATUS,
|
||||||
|
Pointer: rawptr,
|
||||||
|
},
|
||||||
|
Information: ULONG_PTR,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PROCESS_INFO_CLASS :: enum i32 {
|
PROCESS_INFO_CLASS :: enum c_int {
|
||||||
ProcessBasicInformation = 0,
|
ProcessBasicInformation = 0,
|
||||||
ProcessDebugPort = 7,
|
ProcessDebugPort = 7,
|
||||||
ProcessWow64Information = 26,
|
ProcessWow64Information = 26,
|
||||||
@@ -29,6 +46,95 @@ PROCESS_INFO_CLASS :: enum i32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PFILE_INFORMATION_CLASS :: ^FILE_INFORMATION_CLASS
|
||||||
|
FILE_INFORMATION_CLASS :: enum c_int {
|
||||||
|
FileDirectoryInformation = 1,
|
||||||
|
FileFullDirectoryInformation = 2,
|
||||||
|
FileBothDirectoryInformation = 3,
|
||||||
|
FileBasicInformation = 4,
|
||||||
|
FileStandardInformation = 5,
|
||||||
|
FileInternalInformation = 6,
|
||||||
|
FileEaInformation = 7,
|
||||||
|
FileAccessInformation = 8,
|
||||||
|
FileNameInformation = 9,
|
||||||
|
FileRenameInformation = 10,
|
||||||
|
FileLinkInformation = 11,
|
||||||
|
FileNamesInformation = 12,
|
||||||
|
FileDispositionInformation = 13,
|
||||||
|
FilePositionInformation = 14,
|
||||||
|
FileFullEaInformation = 15,
|
||||||
|
FileModeInformation = 16,
|
||||||
|
FileAlignmentInformation = 17,
|
||||||
|
FileAllInformation = 18,
|
||||||
|
FileAllocationInformation = 19,
|
||||||
|
FileEndOfFileInformation = 20,
|
||||||
|
FileAlternateNameInformation = 21,
|
||||||
|
FileStreamInformation = 22,
|
||||||
|
FilePipeInformation = 23,
|
||||||
|
FilePipeLocalInformation = 24,
|
||||||
|
FilePipeRemoteInformation = 25,
|
||||||
|
FileMailslotQueryInformation = 26,
|
||||||
|
FileMailslotSetInformation = 27,
|
||||||
|
FileCompressionInformation = 28,
|
||||||
|
FileObjectIdInformation = 29,
|
||||||
|
FileCompletionInformation = 30,
|
||||||
|
FileMoveClusterInformation = 31,
|
||||||
|
FileQuotaInformation = 32,
|
||||||
|
FileReparsePointInformation = 33,
|
||||||
|
FileNetworkOpenInformation = 34,
|
||||||
|
FileAttributeTagInformation = 35,
|
||||||
|
FileTrackingInformation = 36,
|
||||||
|
FileIdBothDirectoryInformation = 37,
|
||||||
|
FileIdFullDirectoryInformation = 38,
|
||||||
|
FileValidDataLengthInformation = 39,
|
||||||
|
FileShortNameInformation = 40,
|
||||||
|
FileIoCompletionNotificationInformation = 41,
|
||||||
|
FileIoStatusBlockRangeInformation = 42,
|
||||||
|
FileIoPriorityHintInformation = 43,
|
||||||
|
FileSfioReserveInformation = 44,
|
||||||
|
FileSfioVolumeInformation = 45,
|
||||||
|
FileHardLinkInformation = 46,
|
||||||
|
FileProcessIdsUsingFileInformation = 47,
|
||||||
|
FileNormalizedNameInformation = 48,
|
||||||
|
FileNetworkPhysicalNameInformation = 49,
|
||||||
|
FileIdGlobalTxDirectoryInformation = 50,
|
||||||
|
FileIsRemoteDeviceInformation = 51,
|
||||||
|
FileUnusedInformation = 52,
|
||||||
|
FileNumaNodeInformation = 53,
|
||||||
|
FileStandardLinkInformation = 54,
|
||||||
|
FileRemoteProtocolInformation = 55,
|
||||||
|
FileRenameInformationBypassAccessCheck = 56,
|
||||||
|
FileLinkInformationBypassAccessCheck = 57,
|
||||||
|
FileVolumeNameInformation = 58,
|
||||||
|
FileIdInformation = 59,
|
||||||
|
FileIdExtdDirectoryInformation = 60,
|
||||||
|
FileReplaceCompletionInformation = 61,
|
||||||
|
FileHardLinkFullIdInformation = 62,
|
||||||
|
FileIdExtdBothDirectoryInformation = 63,
|
||||||
|
FileDispositionInformationEx = 64,
|
||||||
|
FileRenameInformationEx = 65,
|
||||||
|
FileRenameInformationExBypassAccessCheck = 66,
|
||||||
|
FileDesiredStorageClassInformation = 67,
|
||||||
|
FileStatInformation = 68,
|
||||||
|
FileMemoryPartitionInformation = 69,
|
||||||
|
FileStatLxInformation = 70,
|
||||||
|
FileCaseSensitiveInformation = 71,
|
||||||
|
FileLinkInformationEx = 72,
|
||||||
|
FileLinkInformationExBypassAccessCheck = 73,
|
||||||
|
FileStorageReserveIdInformation = 74,
|
||||||
|
FileCaseSensitiveInformationForceAccessCheck = 75,
|
||||||
|
FileKnownFolderInformation = 76,
|
||||||
|
FileStatBasicInformation = 77,
|
||||||
|
FileId64ExtdDirectoryInformation = 78,
|
||||||
|
FileId64ExtdBothDirectoryInformation = 79,
|
||||||
|
FileIdAllExtdDirectoryInformation = 80,
|
||||||
|
FileIdAllExtdBothDirectoryInformation = 81,
|
||||||
|
FileStreamReservationInformation,
|
||||||
|
FileMupProviderInfo,
|
||||||
|
FileMaximumInformation,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PROCESS_BASIC_INFORMATION :: struct {
|
PROCESS_BASIC_INFORMATION :: struct {
|
||||||
ExitStatus: NTSTATUS,
|
ExitStatus: NTSTATUS,
|
||||||
|
|||||||
+17
-17
@@ -2714,41 +2714,41 @@ NEON128 :: struct {
|
|||||||
|
|
||||||
EXCEPTION_POINTERS :: struct {
|
EXCEPTION_POINTERS :: struct {
|
||||||
ExceptionRecord: ^EXCEPTION_RECORD,
|
ExceptionRecord: ^EXCEPTION_RECORD,
|
||||||
ContextRecord: ^CONTEXT,
|
ContextRecord: ^CONTEXT,
|
||||||
}
|
}
|
||||||
|
|
||||||
PVECTORED_EXCEPTION_HANDLER :: #type proc "system" (ExceptionInfo: ^EXCEPTION_POINTERS) -> LONG
|
PVECTORED_EXCEPTION_HANDLER :: #type proc "system" (ExceptionInfo: ^EXCEPTION_POINTERS) -> LONG
|
||||||
|
|
||||||
CONSOLE_READCONSOLE_CONTROL :: struct {
|
CONSOLE_READCONSOLE_CONTROL :: struct {
|
||||||
nLength: ULONG,
|
nLength: ULONG,
|
||||||
nInitialChars: ULONG,
|
nInitialChars: ULONG,
|
||||||
dwCtrlWakeupMask: ULONG,
|
dwCtrlWakeupMask: ULONG,
|
||||||
dwControlKeyState: ULONG,
|
dwControlKeyState: ULONG,
|
||||||
}
|
}
|
||||||
|
|
||||||
PCONSOLE_READCONSOLE_CONTROL :: ^CONSOLE_READCONSOLE_CONTROL
|
PCONSOLE_READCONSOLE_CONTROL :: ^CONSOLE_READCONSOLE_CONTROL
|
||||||
|
|
||||||
BY_HANDLE_FILE_INFORMATION :: struct {
|
BY_HANDLE_FILE_INFORMATION :: struct {
|
||||||
dwFileAttributes: DWORD,
|
dwFileAttributes: DWORD,
|
||||||
ftCreationTime: FILETIME,
|
ftCreationTime: FILETIME,
|
||||||
ftLastAccessTime: FILETIME,
|
ftLastAccessTime: FILETIME,
|
||||||
ftLastWriteTime: FILETIME,
|
ftLastWriteTime: FILETIME,
|
||||||
dwVolumeSerialNumber: DWORD,
|
dwVolumeSerialNumber: DWORD,
|
||||||
nFileSizeHigh: DWORD,
|
nFileSizeHigh: DWORD,
|
||||||
nFileSizeLow: DWORD,
|
nFileSizeLow: DWORD,
|
||||||
nNumberOfLinks: DWORD,
|
nNumberOfLinks: DWORD,
|
||||||
nFileIndexHigh: DWORD,
|
nFileIndexHigh: DWORD,
|
||||||
nFileIndexLow: DWORD,
|
nFileIndexLow: DWORD,
|
||||||
}
|
}
|
||||||
|
|
||||||
LPBY_HANDLE_FILE_INFORMATION :: ^BY_HANDLE_FILE_INFORMATION
|
LPBY_HANDLE_FILE_INFORMATION :: ^BY_HANDLE_FILE_INFORMATION
|
||||||
|
|
||||||
FILE_STANDARD_INFO :: struct {
|
FILE_STANDARD_INFO :: struct {
|
||||||
AllocationSize: LARGE_INTEGER,
|
AllocationSize: LARGE_INTEGER,
|
||||||
EndOfFile: LARGE_INTEGER,
|
EndOfFile: LARGE_INTEGER,
|
||||||
NumberOfLinks: DWORD,
|
NumberOfLinks: DWORD,
|
||||||
DeletePending: BOOLEAN,
|
DeletePending: BOOLEAN,
|
||||||
Directory: BOOLEAN,
|
Directory: BOOLEAN,
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE_ATTRIBUTE_TAG_INFO :: struct {
|
FILE_ATTRIBUTE_TAG_INFO :: struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user