⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ntdef.h

📁 linux unified kernel 0.1.0
💻 H
字号:
/* * ntdef.h * * Copyright (C) 2006  Insigme Co., Ltd * * Authors:  * - Decao Mao, Chenzhan Hu, Lixing Chu, Limin Jin, Liwei Zhou, Zhiqiang Jiao * * This software has been developed while working on the Linux Unified Kernel * project (http://linux.insigma.com.cn) in the Insigma Reaserch Institute,   * which is a subdivision of Insigma Co., Ltd (http://www.insigma.com.cn). *  * The project is sponsored by Insigma Co., Ltd. * * The authors can be reached at linux@insigma.com.cn. * * This program is free software; you can redistribute it and/or modify it * under the terms of  the GNU General  Public License as published by the * Free Software Foundation; either version 2 of the  License, or (at your * option) any later version. * * Revision History: *   Jan 2006 - Created. */ #ifndef _NTDEF_H#define _NTDEF_H#include <windows.h>#define NTAPI __stdcall#define STDCALL __stdcall#define FILE_SUPERSEDE			0x00000000#define FILE_OPEN			0x00000001#define FILE_CREATE			0x00000002#define FILE_OPEN_IF			0x00000003#define FILE_OVERWRITE			0x00000004#define FILE_OVERWRITE_IF		0x00000005#define FILE_MAXIMUM_DISPOSITION	0x00000005#define OBJ_INHERIT          0x00000002#define OBJ_PERMANENT        0x00000010#define OBJ_EXCLUSIVE        0x00000020#define OBJ_CASE_INSENSITIVE 0x00000040#define OBJ_OPENIF           0x00000080#define OBJ_OPENLINK         0x00000100#define OBJ_KERNEL_HANDLE    0x00000200#define OBJ_VALID_ATTRIBUTES (OBJ_KERNEL_HANDLE | OBJ_OPENLINK | \		OBJ_OPENIF | OBJ_CASE_INSENSITIVE | OBJ_EXCLUSIVE | \		OBJ_PERMANENT | OBJ_INHERIT)#define MASK_PAGE_FLAGS (PAGE_READONLY | PAGE_READWRITE | PAGE_WRITECOPY)#define MASK_SEC_FLAGS  (SEC_COMMIT | SEC_IMAGE | SEC_NOCACHE | SEC_RESERVE)#ifndef NT_SUCCESS#define NT_SUCCESS(x) ((x)>=0)#define STATUS_SUCCESS ((NTSTATUS)0)#endif#define InitializeObjectAttributes(p,n,a,r,s) \do { \	(p)->Length = sizeof(OBJECT_ATTRIBUTES); \	(p)->RootDirectory = r; \	(p)->Attributes = a; \	(p)->ObjectName = n; \	(p)->SecurityDescriptor = s; \	(p)->SecurityQualityOfService = NULL; \} while (0)typedef LONG NTSTATUS, *PNTSTATUS;typedef struct _STRING {  USHORT Length;  USHORT MaximumLength;  PCHAR  Buffer;} STRING, *PSTRING;typedef STRING ANSI_STRING;typedef struct _UNICODE_STRING {  USHORT Length;  USHORT MaximumLength;  PWSTR  Buffer;} UNICODE_STRING, *PUNICODE_STRING;typedef struct _OBJECT_ATTRIBUTES {  ULONG Length;  HANDLE RootDirectory;  PUNICODE_STRING ObjectName;  ULONG Attributes;  PVOID SecurityDescriptor;  PVOID SecurityQualityOfService;} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;typedef enum _EVENT_TYPE {  NotificationEvent,  SynchronizationEvent} EVENT_TYPE;typedef unsigned long ULONG_PTR, *PULONG_PTR;typedef struct _IO_STATUS_BLOCK {  union {    NTSTATUS Status;    PVOID Pointer;  } DUMMYUNIONNAME;  ULONG_PTR Information;} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;typedef struct _FILE_POSITION_INFORMATION {    LARGE_INTEGER CurrentByteOffset;} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;typedef enum _FILE_INFORMATION_CLASS {    FileDirectoryInformation = 1,    FileFullDirectoryInformation,    FileBothDirectoryInformation,    FileBasicInformation,    FileStandardInformation,    FileInternalInformation,    FileEaInformation,    FileAccessInformation,    FileNameInformation,    FileRenameInformation,    FileLinkInformation,    FileNamesInformation,    FileDispositionInformation,    FilePositionInformation,    FileFullEaInformation,    FileModeInformation,    FileAlignmentInformation,    FileAllInformation,    FileAllocationInformation,    FileEndOfFileInformation,    FileAlternateNameInformation,    FileStreamInformation,    FilePipeInformation,    FilePipeLocalInformation,    FilePipeRemoteInformation,    FileMailslotQueryInformation,    FileMailslotSetInformation,    FileCompressionInformation,    FileObjectIdInformation,    FileCompletionInformation,    FileMoveClusterInformation,    FileQuotaInformation,    FileReparsePointInformation,    FileNetworkOpenInformation,    FileAttributeTagInformation,    FileTrackingInformation,    FileMaximumInformation} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;extern HANDLE hBaseDir;#endif /* _NTDEF_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -