mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Initial import
This commit is contained in:
commit
c91b3c5006
14915 changed files with 590219 additions and 0 deletions
88
libc/nt/enum/accessmask.h
Normal file
88
libc/nt/enum/accessmask.h
Normal file
|
@ -0,0 +1,88 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_ACCESSMASK_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_ACCESSMASK_H_
|
||||
|
||||
/**
|
||||
* Can also be described as follows:
|
||||
*
|
||||
* struct NtAccessMask {
|
||||
* union {
|
||||
* uint32_t value;
|
||||
* struct {
|
||||
* uint16_t SpecificRights;
|
||||
* unsigned char StandardRights;
|
||||
* unsigned AccessSystemAcl : 1;
|
||||
* unsigned Reserved : 3;
|
||||
* unsigned GenericAll : 1;
|
||||
* unsigned GenericExecute : 1;
|
||||
* unsigned GenericWrite : 1;
|
||||
* unsigned GenericRead : 1;
|
||||
* };
|
||||
* };
|
||||
* };
|
||||
*/
|
||||
#define kNtGenericRead 0x80000000u
|
||||
#define kNtGenericWrite 0x40000000u
|
||||
#define kNtGenericExecute 0x20000000u
|
||||
#define kNtGenericAll 0x10000000u
|
||||
#define kNtDelete 0x00010000u
|
||||
#define kNtReadControl 0x00020000u
|
||||
#define kNtWriteDac 0x00040000u
|
||||
#define kNtWriteOwner 0x00080000u
|
||||
#define kNtSynchronize 0x00100000u
|
||||
#define kNtStandardRightsRequired 0x000F0000u
|
||||
#define kNtStandardRightsRead kNtReadControl
|
||||
#define kNtStandardRightsWrite kNtReadControl
|
||||
#define kNtStandardRightsExecute kNtReadControl
|
||||
#define kNtStandardRightsAll 0x001F0000u
|
||||
#define kNtSpecificRightsAll 0x0000FFFFu
|
||||
#define kNtAccessSystemSecurity 0x01000000u
|
||||
#define kNtMaximumAllowed 0x02000000u
|
||||
#define kNtFileReadData 0x0001u
|
||||
#define kNtFileListDirectory 0x0001u
|
||||
#define kNtFileWriteData 0x0002u
|
||||
#define kNtFileAddFile 0x0002u
|
||||
#define kNtFileAppendData 0x0004u
|
||||
#define kNtFileAddSubdirectory 0x0004u
|
||||
#define kNtFileCreatePipeInstance 0x0004u
|
||||
#define kNtFileReadEa 0x0008u
|
||||
#define kNtFileWriteEa 0x0010u
|
||||
#define kNtFileExecute 0x0020u
|
||||
#define kNtFileTraverse 0x0020u
|
||||
#define kNtFileDeleteChild 0x0040u
|
||||
#define kNtFileReadAttributes 0x0080u
|
||||
#define kNtFileWriteAttributes 0x0100u
|
||||
#define kNtFileAllAccess (kNtStandardRightsRequired | kNtSynchronize | 0x1FFu)
|
||||
#define kNtFileGenericRead \
|
||||
(kNtStandardRightsRead | kNtFileReadData | kNtFileReadAttributes | \
|
||||
kNtFileReadEa | kNtSynchronize)
|
||||
#define kNtFileGenericWrite \
|
||||
(kNtStandardRightsWrite | kNtFileWriteData | kNtFileWriteAttributes | \
|
||||
kNtFileWriteEa | kNtFileAppendData | kNtSynchronize)
|
||||
#define kNtFileGenericExecute \
|
||||
(kNtStandardRightsExecute | kNtFileReadAttributes | kNtFileExecute | \
|
||||
kNtSynchronize)
|
||||
#define kNtTokenAssignPrimary 0x0001u
|
||||
#define kNtTokenDuplicate 0x0002u
|
||||
#define kNtTokenImpersonate 0x0004u
|
||||
#define kNtTokenQuery 0x0008u
|
||||
#define kNtTokenQuerySource 0x0010u
|
||||
#define kNtTokenAdjustPrivileges 0x0020u
|
||||
#define kNtTokenAdjustGroups 0x0040u
|
||||
#define kNtTokenAdjustDefault 0x0080u
|
||||
#define kNtTokenAdjustSessionid 0x0100u
|
||||
#define kNtTokenAllAccessP \
|
||||
(kNtStandardRightsRequired | kNtTokenAssignPrimary | kNtTokenDuplicate | \
|
||||
kNtTokenImpersonate | kNtTokenQuery | kNtTokenQuerySource | \
|
||||
kNtTokenAdjustPrivileges | kNtTokenAdjustGroups | kNtTokenAdjustDefault)
|
||||
#define kNtTokenAllAccess kNtTokenAllAccessP | kNtTokenAdjustSessionid
|
||||
#define kNtTokenRead kNtStandardRightsRead | kNtTokenQuery
|
||||
#define kNtTokenWrite \
|
||||
(kNtStandardRightsWrite | kNtTokenAdjustPrivileges | kNtTokenAdjustGroups | \
|
||||
kNtTokenAdjustDefault)
|
||||
#define kNtTokenExecute kNtStandardRightsExecute
|
||||
#define kNtTokenTrustConstraintMask \
|
||||
(kNtStandardRightsRead | kNtTokenQuery | kNtTokenQuerySource)
|
||||
#define kNtTokenAccessPseudoHandleWin8 kNtTokenQuery | kNtTokenQuerySource
|
||||
#define kNtTokenAccessPseudoHandle kNtTokenAccessPseudoHandleWin8
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_ACCESSMASK_H_ */
|
23
libc/nt/enum/consolemodeflags.h
Normal file
23
libc/nt/enum/consolemodeflags.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_CONSOLEMODEFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_CONSOLEMODEFLAGS_H_
|
||||
|
||||
/* input mode */
|
||||
#define kNtEnableProcessedInput 0x0001u
|
||||
#define kNtEnableLineInput 0x0002u
|
||||
#define kNtEnableEchoInput 0x0004u
|
||||
#define kNtEnableWindowInput 0x0008u
|
||||
#define kNtEnableMouseInput 0x0010u
|
||||
#define kNtEnableInsertMode 0x0020u
|
||||
#define kNtEnableQuickEditMode 0x0040u
|
||||
#define kNtEnableExtendedFlags 0x0080u
|
||||
#define kNtEnableAutoPosition 0x0100u
|
||||
#define kNtEnableVirtualTerminalInput 0x0200u
|
||||
|
||||
/* output mode */
|
||||
#define kNtEnableProcessedOutput 0x0001u
|
||||
#define kNtEnableWrapAtEolOutput 0x0002u
|
||||
#define kNtEnableVirtualTerminalProcessing 0x0004u
|
||||
#define kNtDisableNewlineAutoReturn 0x0008u
|
||||
#define kNtEnableLvbGridWorldwide 0x0010u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_CONSOLEMODEFLAGS_H_ */
|
10
libc/nt/enum/consoleselectionflags.h
Normal file
10
libc/nt/enum/consoleselectionflags.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_CONSOLESELECTIONFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_CONSOLESELECTIONFLAGS_H_
|
||||
|
||||
#define kNtConsoleNoSelection 0x0000u
|
||||
#define kNtConsoleSelectionInProgress 0x0001u
|
||||
#define kNtConsoleSelectionNotEmpty 0x0002u
|
||||
#define kNtConsoleMouseSelection 0x0004u
|
||||
#define kNtConsoleMouseDown 0x0008u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_CONSOLESELECTIONFLAGS_H_ */
|
10
libc/nt/enum/creationdisposition.h
Normal file
10
libc/nt/enum/creationdisposition.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_CREATIONDISPOSITION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_CREATIONDISPOSITION_H_
|
||||
|
||||
#define kNtCreateNew 1
|
||||
#define kNtCreateAlways 2
|
||||
#define kNtOpenExisting 3
|
||||
#define kNtOpenAlways 4
|
||||
#define kNtTruncateExisting 5
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_CREATIONDISPOSITION_H_ */
|
10
libc/nt/enum/ctrlevent.h
Normal file
10
libc/nt/enum/ctrlevent.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_CTRLEVENT_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_CTRLEVENT_H_
|
||||
|
||||
#define kNtCtrlCEvent 0 /* SIGINT */
|
||||
#define kNtCtrlBreakEvent 1 /* SIGQUIT */
|
||||
#define kNtCtrlCloseEvent 2 /* SIGHUP */
|
||||
#define kNtCtrlLogoffEvent 5 /* SIGTERM */
|
||||
#define kNtCtrlShutdownEvent 6
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_CTRLEVENT_H_ */
|
20
libc/nt/enum/dialogresult.h
Normal file
20
libc/nt/enum/dialogresult.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_DIALOGRESULT_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_DIALOGRESULT_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum DialogResult {
|
||||
kNtIdok = 1,
|
||||
kNtIdcancel = 2,
|
||||
kNtIdabort = 3,
|
||||
kNtIdretry = 4,
|
||||
kNtIdignore = 5,
|
||||
kNtIdyes = 6,
|
||||
kNtIdno = 7,
|
||||
kNtIdclose = 8,
|
||||
kNtIdhelp = 9,
|
||||
kNtIdtryagain = 10,
|
||||
kNtIdcontinue = 11
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_DIALOGRESULT_H_ */
|
15
libc/nt/enum/errormodeflags.h
Normal file
15
libc/nt/enum/errormodeflags.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_ERRORMODEFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_ERRORMODEFLAGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum NtErrorModeFlags {
|
||||
kNtErrorModeDefault = 0x0,
|
||||
kNtSemFailcriticalerrors = 0x1,
|
||||
kNtSemNogpfaulterrorbox = 0x2,
|
||||
kNtSemNoopenfileerrorbox = 0x8000
|
||||
};
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_ERRORMODEFLAGS_H_ */
|
8
libc/nt/enum/eventtype.h
Normal file
8
libc/nt/enum/eventtype.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_EVENTTYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_EVENTTYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtEventType { kNtNotificationEvent, kNtSynchronizationEvent };
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_EVENTTYPE_H_ */
|
8
libc/nt/enum/exceptionhandleractions.h
Normal file
8
libc/nt/enum/exceptionhandleractions.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_EXCEPTIONHANDLERACTIONS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_EXCEPTIONHANDLERACTIONS_H_
|
||||
|
||||
#define kNtExceptionExecuteHandler 0x1u
|
||||
#define kNtExceptionContinueExecution 0xffffffffu
|
||||
#define kNtExceptionContinueSearch 0x0u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_EXCEPTIONHANDLERACTIONS_H_ */
|
45
libc/nt/enum/fileflagandattributes.h
Normal file
45
libc/nt/enum/fileflagandattributes.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILEFLAGANDATTRIBUTES_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILEFLAGANDATTRIBUTES_H_
|
||||
|
||||
/**
|
||||
* MS-DOS File Attributes.
|
||||
*
|
||||
* @see GetFileInformationByHandle()
|
||||
* @see libc/sysv/consts.sh
|
||||
*/
|
||||
#define kNtFileAttributeReadonly 0x00000001u
|
||||
#define kNtFileAttributeHidden 0x00000002u
|
||||
#define kNtFileAttributeSystem 0x00000004u
|
||||
#define kNtFileAttributeVolumelabel 0x00000008u
|
||||
#define kNtFileAttributeDirectory 0x00000010u
|
||||
#define kNtFileAttributeArchive 0x00000020u
|
||||
|
||||
/**
|
||||
* NT File Attributes.
|
||||
*/
|
||||
#define kNtFileAttributeDevice 0x00000040u
|
||||
#define kNtFileAttributeNormal 0x00000080u
|
||||
#define kNtFileAttributeTemporary 0x00000100u
|
||||
#define kNtFileAttributeSparseFile 0x00000200u
|
||||
#define kNtFileAttributeReparsePoint 0x00000400u
|
||||
#define kNtFileAttributeCompressed 0x00000800u
|
||||
#define kNtFileAttributeOffline 0x00001000u
|
||||
#define kNtFileAttributeNotContentIndexed 0x00002000u
|
||||
#define kNtFileAttributeEncrypted 0x00004000u
|
||||
|
||||
/**
|
||||
* NT File Flags.
|
||||
*/
|
||||
#define kNtFileFlagWriteThrough 0x80000000u
|
||||
#define kNtFileFlagOverlapped 0x40000000u
|
||||
#define kNtFileFlagNoBuffering 0x20000000u
|
||||
#define kNtFileFlagRandomAccess 0x10000000u
|
||||
#define kNtFileFlagSequentialScan 0x08000000u
|
||||
#define kNtFileFlagDeleteOnClose 0x04000000u
|
||||
#define kNtFileFlagBackupSemantics 0x02000000u
|
||||
#define kNtFileFlagPosixSemantics 0x01000000u
|
||||
#define kNtFileFlagOpenReparsePoint 0x00200000u /* or symlink */
|
||||
#define kNtFileFlagOpenNoRecall 0x00100000u
|
||||
#define kNtFileFlagFirstPipeInstance 0x00080000u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILEFLAGANDATTRIBUTES_H_ */
|
31
libc/nt/enum/fileinfobyhandleclass.h
Normal file
31
libc/nt/enum/fileinfobyhandleclass.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILEINFOBYHANDLECLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILEINFOBYHANDLECLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
#define kNtFileBasicInfo 0 /* struct NtFileBasicInformation */
|
||||
#define kNtFileStandardInfo 1 /* struct NtFileStandardInformation */
|
||||
#define kNtFileNameInfo 2 /* struct NtFileNameInformation */
|
||||
#define kNtFileStreamInfo 7 /* struct NtFileStreamInformation */
|
||||
#define kNtFileCompressionInfo 8 /* struct NtFileCompressionInfo */
|
||||
#define kNtFileAttributeTagInfo 9 /* struct NtFileAttributeTagInformation */
|
||||
#define kNtFileIdBothDirectoryInfo 10
|
||||
#define kNtFileIdBothDirectoryRestartInfo 11
|
||||
#define kNtFileRemoteProtocolInfo 13
|
||||
#define kNtFileFullDirectoryInfo 14 /* NtFileFullDirectoryInformation */
|
||||
#define kNtFileFullDirectoryRestartInfo 15
|
||||
#define kNtFileStorageInfo 16 /* win8+ */
|
||||
#define kNtFileAlignmentInfo 17 /* win8+ */
|
||||
#define kNtFileIdInfo 18 /* win8+ */
|
||||
#define kNtFileIdExtdDirectoryInfo 19 /* win8+ */
|
||||
#define kNtFileIdExtdDirectoryRestartInfo 20 /* win8+ */
|
||||
|
||||
/* #define kNtFileRenameInfo 4 */
|
||||
/* #define kNtFileDispositionInfo 5 */
|
||||
/* #define kNtFileAllocationInfo 6 */
|
||||
/* #define kNtFileEndOfFileInfo 7 */
|
||||
/* #define kNtFileIoPriorityHintInfo 13 */
|
||||
/* #define kNtFileDispositionInfoEx 22 /\* win10+ *\/ */
|
||||
/* #define kNtFileRenameInfoEx 23 /\* win10+ *\/ */
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILEINFOBYHANDLECLASS_H_ */
|
46
libc/nt/enum/fileinformationclass.h
Normal file
46
libc/nt/enum/fileinformationclass.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILEINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILEINFORMATIONCLASS_H_
|
||||
|
||||
#define kNtFileDirectoryInformation 1 /*→ struct NtFileDirectoryInformation */
|
||||
#define kNtFileFullDirectoryInformation 2 /*→ etc. */
|
||||
#define kNtFileBothDirectoryInformation 3
|
||||
#define kNtFileBasicInformation 4
|
||||
#define kNtFileStandardInformation 5
|
||||
#define kNtFileInternalInformation 6
|
||||
#define kNtFileEaInformation 7
|
||||
#define kNtFileAccessInformation 8
|
||||
#define kNtFileNameInformation 9
|
||||
#define kNtFileRenameInformation 10
|
||||
#define kNtFileLinkInformation 11
|
||||
#define kNtFileNamesInformation 12
|
||||
#define kNtFileDispositionInformation 13
|
||||
#define kNtFilePositionInformation 14
|
||||
#define kNtFileFullEaInformation 15
|
||||
#define kNtFileModeInformation 16
|
||||
#define kNtFileAlignmentInformation 17
|
||||
#define kNtFileAllInformation 18
|
||||
#define kNtFileAllocationInformation 19
|
||||
#define kNtFileEndOfFileInformation 20
|
||||
#define kNtFileAlternateNameInformation 21
|
||||
#define kNtFileStreamInformation 22
|
||||
#define kNtFilePipeInformation 23
|
||||
#define kNtFilePipeLocalInformation 24
|
||||
#define kNtFilePipeRemoteInformation 25
|
||||
#define kNtFileMailslotQueryInformation 26
|
||||
#define kNtFileMailslotSetInformation 27
|
||||
#define kNtFileCompressionInformation 28
|
||||
#define kNtFileObjectIdInformation 29
|
||||
#define kNtFileCompletionInformation 30
|
||||
#define kNtFileMoveClusterInformation 31
|
||||
#define kNtFileQuotaInformation 32
|
||||
#define kNtFileReparsePointInformation 33
|
||||
#define kNtFileNetworkOpenInformation 34
|
||||
#define kNtFileAttributeTagInformation 35
|
||||
#define kNtFileTrackingInformation 36
|
||||
#define kNtFileIdBothDirectoryInformation 37
|
||||
#define kNtFileIdFullDirectoryInformation 38
|
||||
#define kNtFileValidDataLengthInformation 39
|
||||
#define kNtFileShortNameInformation 40
|
||||
#define kNtFileInformation_MAX 40
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILEINFORMATIONCLASS_H_ */
|
11
libc/nt/enum/filelockflags.h
Normal file
11
libc/nt/enum/filelockflags.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILELOCKFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILELOCKFLAGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtFileLockFlags {
|
||||
kNtLockfileFailImmediately = 1,
|
||||
kNtLockfileExclusiveLock = 2,
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILELOCKFLAGS_H_ */
|
13
libc/nt/enum/filemapflags.h
Normal file
13
libc/nt/enum/filemapflags.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILEMAPFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILEMAPFLAGS_H_
|
||||
|
||||
/* Choose subset of NtPageFlags passed earlier. */
|
||||
#define kNtFileMapCopy 0x00000001u
|
||||
#define kNtFileMapWrite 0x00000002u
|
||||
#define kNtFileMapRead 0x00000004u
|
||||
#define kNtFileMapExecute 0x00000020u
|
||||
#define kNtFileMapReserve 0x80000000u
|
||||
#define kNtFileMapTargetsInvalid 0x40000000u
|
||||
#define kNtFileMapLargePages 0x20000000u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILEMAPFLAGS_H_ */
|
8
libc/nt/enum/filemovemethod.h
Normal file
8
libc/nt/enum/filemovemethod.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILEMOVEMETHOD_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILEMOVEMETHOD_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtFileMoveMethod { kNtFileBegin, kNtFileCurrent, kNtFileEnd };
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILEMOVEMETHOD_H_ */
|
9
libc/nt/enum/filesharemode.h
Normal file
9
libc/nt/enum/filesharemode.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILESHAREFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILESHAREFLAGS_H_
|
||||
|
||||
#define kNtFileShareExclusive 0x00000000u
|
||||
#define kNtFileShareRead 0x00000001u
|
||||
#define kNtFileShareWrite 0x00000002u
|
||||
#define kNtFileShareDelete 0x00000004u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILESHAREFLAGS_H_ */
|
20
libc/nt/enum/filetype.h
Normal file
20
libc/nt/enum/filetype.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FILETYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FILETYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
/**
|
||||
* NT Device File Types.
|
||||
*
|
||||
* @see GetFileType()
|
||||
* @see libc/sysv/consts.sh
|
||||
*/
|
||||
enum NtFileType {
|
||||
kNtFileTypeUnknown = 0x0000,
|
||||
kNtFileTypeDisk = 0x0001, /* @see S_ISBLK() */
|
||||
kNtFileTypeChar = 0x0002, /* @see S_ISCHR() */
|
||||
kNtFileTypePipe = 0x0003, /* @see S_ISFIFO() */
|
||||
kNtFileTypeRemote = 0x8000 /* unused -MSDN */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FILETYPE_H_ */
|
15
libc/nt/enum/fillattribute.h
Normal file
15
libc/nt/enum/fillattribute.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_NTFILLATTRIBUTE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_NTFILLATTRIBUTE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
#define kNtForegroundBlue 0x0001
|
||||
#define kNtForegroundGreen 0x0002
|
||||
#define kNtForegroundRed 0x0004
|
||||
#define kNtForegroundIntensity 0x0008
|
||||
#define kNtBackgroundBlue 0x0010
|
||||
#define kNtBackgroundGreen 0x0020
|
||||
#define kNtBackgroundRed 0x0040
|
||||
#define kNtBackgroundIntensity 0x0080
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_NTFILLATTRIBUTE_H_ */
|
12
libc/nt/enum/findexinfolevels.h
Normal file
12
libc/nt/enum/findexinfolevels.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FINDEXINFOLEVELS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FINDEXINFOLEVELS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtFindexInfoLevels {
|
||||
kNtFindExInfoStandard,
|
||||
kNtFindExInfoBasic,
|
||||
kNtFindExInfoMaxInfoLevel
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FINDEXINFOLEVELS_H_ */
|
13
libc/nt/enum/findexsearchops.h
Normal file
13
libc/nt/enum/findexsearchops.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FINDEXSEARCHOPS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FINDEXSEARCHOPS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtFindexSearchOps {
|
||||
kNtFindExSearchNameMatch,
|
||||
kNtFindExSearchLimitToDirectories,
|
||||
kNtFindExSearchLimitToDevices,
|
||||
kNtFindExSearchMaxSearchOp
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FINDEXSEARCHOPS_H_ */
|
16
libc/nt/enum/formatmessageflags.h
Normal file
16
libc/nt/enum/formatmessageflags.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FORMATMESSAGEFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FORMATMESSAGEFLAGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtFormatMessageFlags {
|
||||
kNtFormatMessageAllocateBuffer = 0x100,
|
||||
kNtFormatMessageIgnoreInserts = 0x200,
|
||||
kNtFormatMessageFromString = 0x400,
|
||||
kNtFormatMessageFromHmodule = 0x800,
|
||||
kNtFormatMessageFromSystem = 0x1000,
|
||||
kNtFormatMessageArgumentArray = 0x2000,
|
||||
kNtFormatMessageMaxWidthMask = 0xff
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FORMATMESSAGEFLAGS_H_ */
|
16
libc/nt/enum/fsctl.h
Normal file
16
libc/nt/enum/fsctl.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FSCTL_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FSCTL_H_
|
||||
|
||||
#define kNtFsctlDisableLocalBuffering 0x000902B8u
|
||||
#define kNtFsctlFilePrefetch 0x00090120u
|
||||
#define kNtFsctlFilesystemGetStatistics 0x00090060u
|
||||
#define kNtFsctlGetCompression 0x0009003Cu
|
||||
#define kNtFsctlGetNtfsFileRecord 0x00090068u
|
||||
#define kNtFsctlGetNtfsVolumeData 0x00090064u
|
||||
#define kNtFsctlQueryAllocatedRanges 0x000940CFu
|
||||
#define kNtFsctlScrubData 0x000902B0u
|
||||
#define kNtFsctlSetCompression 0x0009C040u
|
||||
#define kNtFsctlSetSparse 0x000900C4u
|
||||
#define kNtFsctlSetZeroData 0x000980C8u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FSCTL_H_ */
|
15
libc/nt/enum/fsinformationclass.h
Normal file
15
libc/nt/enum/fsinformationclass.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_FSINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_FSINFORMATIONCLASS_H_
|
||||
|
||||
#define kNtFileFsVolumeInformation 1
|
||||
#define kNtFileFsLabelInformation 2
|
||||
#define kNtFileFsSizeInformation 3
|
||||
#define kNtFileFsDeviceInformation 4
|
||||
#define kNtFileFsAttributeInformation 5
|
||||
#define kNtFileFsControlInformation 6
|
||||
#define kNtFileFsFullSizeInformation 7
|
||||
#define kNtFileFsObjectIdInformation 8
|
||||
#define kNtFileFsDriverPathInformation 9
|
||||
#define kNtFileFsInformation_MAX 10
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_FSINFORMATIONCLASS_H_ */
|
8
libc/nt/enum/getfileexinfolevels.h
Normal file
8
libc/nt/enum/getfileexinfolevels.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_GETFILEEXINFOLEVELS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_GETFILEEXINFOLEVELS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtGetFileexInfoLevels { kNtGetFileExInfoStandard, kNtGetFile_MAX };
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_GETFILEEXINFOLEVELS_H_ */
|
8
libc/nt/enum/imageauxsymboltype.h
Normal file
8
libc/nt/enum/imageauxsymboltype.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_IMAGEAUXSYMBOLTYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_IMAGEAUXSYMBOLTYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtImageAuxSymbolType { IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1 };
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_IMAGEAUXSYMBOLTYPE_H_ */
|
14
libc/nt/enum/importobjectnametype.h
Normal file
14
libc/nt/enum/importobjectnametype.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTNAMETYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTNAMETYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtImportObjectNameType {
|
||||
IMPORT_OBJECT_ORDINAL,
|
||||
IMPORT_OBJECT_NAME,
|
||||
IMPORT_OBJECT_NAME_NO_PREFIX,
|
||||
IMPORT_OBJECT_NAME_UNDECORATE,
|
||||
IMPORT_OBJECT_NAME_EXPORTAS
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTNAMETYPE_H_ */
|
12
libc/nt/enum/importobjecttype.h
Normal file
12
libc/nt/enum/importobjecttype.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTTYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTTYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtImportObjectType {
|
||||
IMPORT_OBJECT_CODE,
|
||||
IMPORT_OBJECT_DATA,
|
||||
IMPORT_OBJECT_CONST
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTTYPE_H_ */
|
6
libc/nt/enum/ioctl.h
Normal file
6
libc/nt/enum/ioctl.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_IOCTL_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_IOCTL_H_
|
||||
|
||||
#define kNtIoctlDiskGetDriveGeometry 0x00070000u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_IOCTL_H_ */
|
20
libc/nt/enum/jobobjectinfoclass.h
Normal file
20
libc/nt/enum/jobobjectinfoclass.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_JOBOBJECTINFOCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_JOBOBJECTINFOCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtJobObjectInfoClass {
|
||||
kNtJobObjectBasicAccountingInformation = 1,
|
||||
kNtJobObjectBasicLimitInformation,
|
||||
kNtJobObjectBasicProcessIdList,
|
||||
kNtJobObjectBasicUIRestrictions,
|
||||
kNtJobObjectSecurityLimitInformation,
|
||||
kNtJobObjectEndOfJobTimeInformation,
|
||||
kNtJobObjectAssociateCompletionPortInformation,
|
||||
kNtJobObjectBasicAndIoAccountingInformation,
|
||||
kNtJobObjectExtendedLimitInformation,
|
||||
kNtJobObjectJobSetInformation,
|
||||
kNtJobObjectInfoClass_MAX
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_JOBOBJECTINFOCLASS_H_ */
|
13
libc/nt/enum/keyaccess.h
Normal file
13
libc/nt/enum/keyaccess.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_KEYACCESS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_KEYACCESS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtKeyAccess {
|
||||
kNtKeyRead = 0x00020019,
|
||||
kNtKeyWrite = 0x00020006,
|
||||
kNtKeyExecute = 0x00020019,
|
||||
kNtKeyAllAccess = 0x000f003f
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_KEYACCESS_H_ */
|
13
libc/nt/enum/keyinformationclass.h
Normal file
13
libc/nt/enum/keyinformationclass.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_KEYINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_KEYINFORMATIONCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtKeyInformationClass {
|
||||
kNtKeyBasicInformation,
|
||||
kNtKeyNodeInformation,
|
||||
kNtKeyFullInformation,
|
||||
kNtKeyNameInformation
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_KEYINFORMATIONCLASS_H_ */
|
35
libc/nt/enum/kwaitreason.h
Normal file
35
libc/nt/enum/kwaitreason.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_KWAITREASON_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_KWAITREASON_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
#define kNtExecutive 0
|
||||
#define kNtFreePage 1
|
||||
#define kNtPageIn 2
|
||||
#define kNtPoolAllocation 3
|
||||
#define kNtDelayExecution 4
|
||||
#define kNtSuspended 5
|
||||
#define kNtUserRequest 6
|
||||
#define kNtWrExecutive 7
|
||||
#define kNtWrFreePage 8
|
||||
#define kNtWrPageIn 9
|
||||
#define kNtWrPoolAllocation 10
|
||||
#define kNtWrDelayExecution 11
|
||||
#define kNtWrSuspended 12
|
||||
#define kNtWrUserRequest 13
|
||||
#define kNtWrEventPair 14
|
||||
#define kNtWrQueue 15
|
||||
#define kNtWrLpcReceive 16
|
||||
#define kNtWrLpcReply 17
|
||||
#define kNtWrVirtualMemory 18
|
||||
#define kNtWrPageOut 19
|
||||
#define kNtWrRendezvous 20
|
||||
#define kNtSpare2 21
|
||||
#define kNtSpare3 22
|
||||
#define kNtSpare4 23
|
||||
#define kNtSpare5 24
|
||||
#define kNtSpare6 25
|
||||
#define kNtWrKernel 26
|
||||
#define kNtMaximumWaitReason 27
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_KWAITREASON_H_ */
|
11
libc/nt/enum/loadlibrarysearch.h
Normal file
11
libc/nt/enum/loadlibrarysearch.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_LOADLIBRARYSEARCH_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_LOADLIBRARYSEARCH_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
#define kNtLoadLibrarySearchApplicationDir 0x00000200u
|
||||
#define kNtLoadLibrarySearchSearchSystem32 0x00000800u
|
||||
#define kNtLoadLibrarySearchUserDirs 0x00000400u
|
||||
#define kNtLoadLibrarySearchDefaultDirs 0x00001000u
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_LOADLIBRARYSEARCH_H_ */
|
18
libc/nt/enum/memflags.h
Normal file
18
libc/nt/enum/memflags.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_MEMFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_MEMFLAGS_H_
|
||||
|
||||
#define kNtMemCommit 0x1000 /* perform physical memory reservation step */
|
||||
#define kNtMemReserve 0x2000 /* perform virtual memory reservation step */
|
||||
#define kNtMemDecommit 0x4000
|
||||
#define kNtMemRelease 0x8000
|
||||
#define kNtMemFree 0x10000
|
||||
#define kNtMemPrivate 0x20000
|
||||
#define kNtMemMapped 0x40000
|
||||
#define kNtMemReset 0x80000
|
||||
#define kNtMemTopDown 0x100000
|
||||
#define kNtMemWriteWatch 0x200000
|
||||
#define kNtMemPhysical 0x400000
|
||||
#define kNtMemLargePages 0x20000000
|
||||
#define kNtMem4mbPages 0x80000000
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_MEMFLAGS_H_ */
|
13
libc/nt/enum/memoryinformationclass.h
Normal file
13
libc/nt/enum/memoryinformationclass.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_MEMORYINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_MEMORYINFORMATIONCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtMemoryInformationClass {
|
||||
kNtMemoryBasicInformation,
|
||||
kNtMemoryWorkingSetList,
|
||||
kNtMemorySectionName,
|
||||
kNtMemoryBasicVlmInformation
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_MEMORYINFORMATIONCLASS_H_ */
|
46
libc/nt/enum/messageboxtype.h
Normal file
46
libc/nt/enum/messageboxtype.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_MESSAGEBOXTYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_MESSAGEBOXTYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum MessageBoxType {
|
||||
kNtMbOk = 0x00000000,
|
||||
kNtMbOkcancel = 0x00000001,
|
||||
kNtMbAbortretryignore = 0x00000002,
|
||||
kNtMbYesnocancel = 0x00000003,
|
||||
kNtMbYesno = 0x00000004,
|
||||
kNtMbRetrycancel = 0x00000005,
|
||||
kNtMbCanceltrycontinue = 0x00000006,
|
||||
kNtMbIconhand = 0x00000010,
|
||||
kNtMbIconquestion = 0x00000020,
|
||||
kNtMbIconexclamation = 0x00000030,
|
||||
kNtMbIconasterisk = 0x00000040,
|
||||
kNtMbUsericon = 0x00000080,
|
||||
kNtMbIconwarning = kNtMbIconexclamation,
|
||||
kNtMbIconerror = kNtMbIconhand,
|
||||
kNtMbIconinformation = kNtMbIconasterisk,
|
||||
kNtMbIconstop = kNtMbIconhand,
|
||||
kNtMbDefbutton1 = 0x00000000,
|
||||
kNtMbDefbutton2 = 0x00000100,
|
||||
kNtMbDefbutton3 = 0x00000200,
|
||||
kNtMbDefbutton4 = 0x00000300,
|
||||
kNtMbApplmodal = 0x00000000,
|
||||
kNtMbSystemmodal = 0x00001000,
|
||||
kNtMbTaskmodal = 0x00002000,
|
||||
kNtMbHelp = 0x00004000,
|
||||
kNtMbNofocus = 0x00008000,
|
||||
kNtMbSetforeground = 0x00010000,
|
||||
kNtMbDefaultDesktopOnly = 0x00020000,
|
||||
kNtMbTopmost = 0x00040000,
|
||||
kNtMbRight = 0x00080000,
|
||||
kNtMbRtlreading = 0x00100000,
|
||||
kNtMbServiceNotification = 0x00200000,
|
||||
kNtMbServiceNotificationNt3x = 0x00040000,
|
||||
kNtMbTypemask = 0x0000000F,
|
||||
kNtMbIconmask = 0x000000F0,
|
||||
kNtMbDefmask = 0x00000F00,
|
||||
kNtMbModemask = 0x00003000,
|
||||
kNtMbMiscmask = 0x0000C000
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_MESSAGEBOXTYPE_H_ */
|
15
libc/nt/enum/movefileexflags.h
Normal file
15
libc/nt/enum/movefileexflags.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_MOVEFILEEXFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_MOVEFILEEXFLAGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtMoveFileExFlags {
|
||||
kNtMovefileReplaceExisting = 1,
|
||||
kNtMovefileCopyAllowed = 2,
|
||||
kNtMovefileDelayUntilReboot = 4,
|
||||
kNtMovefileCreateHardlink = 16,
|
||||
kNtMovefileFailIfNotTrackable = 32,
|
||||
kNtMovefileWriteThrough = 8
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_MOVEFILEEXFLAGS_H_ */
|
14
libc/nt/enum/objectinformationclass.h
Normal file
14
libc/nt/enum/objectinformationclass.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_OBJECTINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_OBJECTINFORMATIONCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtObjectInformationClass {
|
||||
kNtObjectBasicInformation, /*→ struct NtObjectBasicInformation */
|
||||
kNtObjectNameInformation, /*→ etc. */
|
||||
kNtObjectTypeInformation,
|
||||
kNtObjectAllInformation,
|
||||
kNtObjectDataInformation
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_OBJECTINFORMATIONCLASS_H_ */
|
14
libc/nt/enum/offerpriority.h
Normal file
14
libc/nt/enum/offerpriority.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_OFFERPRIORITY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_OFFERPRIORITY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtOfferPriority {
|
||||
/* TODO(jart): Are these values correct? */
|
||||
kNtVmOfferPriorityVeryLow = 1, /* 0x00001000? */
|
||||
kNtVmOfferPriorityLow, /* 0x00002000? */
|
||||
kNtVmOfferPriorityBelowNormal, /* 0x00002000? */
|
||||
kNtVmOfferPriorityNormal /* 0x00002000? */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_OFFERPRIORITY_H_ */
|
26
libc/nt/enum/pageflags.h
Normal file
26
libc/nt/enum/pageflags.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_PAGEFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_PAGEFLAGS_H_
|
||||
|
||||
/* Pick One */
|
||||
#define kNtPageNoaccess 0x01
|
||||
#define kNtPageReadonly 0x02
|
||||
#define kNtPageReadwrite 0x04
|
||||
#define kNtPageWritecopy 0x08
|
||||
#define kNtPageExecute 0x10
|
||||
#define kNtPageExecuteRead 0x20
|
||||
#define kNtPageExecuteReadwrite 0x40
|
||||
#define kNtPageExecuteWritecopy 0x80
|
||||
#define kNtPageGuard 0x100
|
||||
#define kNtPageNocache 0x200
|
||||
#define kNtPageWritecombine 0x400
|
||||
|
||||
/* These may be OR'd */
|
||||
#define kNtSecReserve 0x4000000
|
||||
#define kNtSecCommit 0x8000000 /* ←default */
|
||||
#define kNtSecImage 0x1000000
|
||||
#define kNtSecImageNoExecute 0x11000000
|
||||
#define kNtSecLargePages 0x80000000
|
||||
#define kNtSecNocache 0x10000000
|
||||
#define kNtSecWritecombine 0x40000000
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_PAGEFLAGS_H_ */
|
21
libc/nt/enum/processaccess.h
Normal file
21
libc/nt/enum/processaccess.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_PROCESSACCESS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_PROCESSACCESS_H_
|
||||
#include "libc/nt/enum/accessmask.h"
|
||||
|
||||
#define kNtProcessCreateProcess 0x0080u
|
||||
#define kNtProcessCreateThread 0x0002u
|
||||
#define kNtProcessDupHandle 0x0040u
|
||||
#define kNtProcessQueryInformation 0x0400u
|
||||
#define kNtProcessQueryLimitedInformation 0x1000u
|
||||
#define kNtProcessSetInformation 0x0200u
|
||||
#define kNtProcessSetQuota 0x0100u
|
||||
#define kNtProcessSuspendResume 0x0800u
|
||||
#define kNtProcessTerminate 0x0001u
|
||||
#define kNtProcessVmOperation 0x0008u
|
||||
#define kNtProcessVmRead 0x0010u
|
||||
#define kNtProcessVmWrite 0x0020u
|
||||
#define kNtProcessSynchronize kNtSynchronize
|
||||
#define kNtProcessAllAccess \
|
||||
(kNtStandardRightsRequired | kNtSynchronize | 0xffffu)
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_PROCESSACCESS_H_ */
|
36
libc/nt/enum/processcreationflags.h
Normal file
36
libc/nt/enum/processcreationflags.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_PROCESSCREATIONFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_PROCESSCREATIONFLAGS_H_
|
||||
|
||||
#define kNtIdlePriorityClass 0x00000040u
|
||||
#define kNtBelowNormalPriorityClass 0x00004000u
|
||||
#define kNtNormalPriorityClass 0x00000020u
|
||||
#define kNtAboveNormalPriorityClass 0x00008000u
|
||||
#define kNtHighPriorityClass 0x00000080u
|
||||
#define kNtRealtimePriorityClass 0x00000100u
|
||||
|
||||
#define kNtDebugProcess 0x00000001u
|
||||
#define kNtDebugOnlyThisProcess 0x00000002u
|
||||
#define kNtCreateSuspended 0x00000004u
|
||||
#define kNtDetachedProcess 0x00000008u
|
||||
#define kNtCreateNewConsole 0x00000010u
|
||||
#define kNtCreateNewProcessGroup 0x00000200u
|
||||
#define kNtCreateUnicodeEnvironment 0x00000400u
|
||||
#define kNtCreateSeparateWowVdm 0x00000800u
|
||||
#define kNtCreateSharedWowVdm 0x00001000u
|
||||
#define kNtCreateForcedos 0x00002000u
|
||||
#define kNtInheritParentAffinity 0x00010000u
|
||||
#define kNtCreateProtectedProcess 0x00040000u
|
||||
#define kNtExtendedStartupinfoPresent 0x00080000u
|
||||
#define kNtProcessModeBackgroundBegin 0x00100000u
|
||||
#define kNtProcessModeBackgroundEnd 0x00200000u
|
||||
#define kNtCreateSecureProcess 0x00400000u
|
||||
#define kNtCreateBreakawayFromJob 0x01000000u
|
||||
#define kNtCreatePreserveCodeAuthzLevel 0x02000000u
|
||||
#define kNtCreateDefaultErrorMode 0x04000000u
|
||||
#define kNtCreateNoWindow 0x08000000u
|
||||
#define kNtProfileUser 0x10000000u
|
||||
#define kNtProfileKernel 0x20000000u
|
||||
#define kNtProfileServer 0x40000000u
|
||||
#define kNtCreateIgnoreSystemDefault 0x80000000u
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_PROCESSCREATIONFLAGS_H_ */
|
21
libc/nt/enum/processinfoclass.h
Normal file
21
libc/nt/enum/processinfoclass.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_PROCESSINFOCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_PROCESSINFOCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtProcessInfoClass {
|
||||
kNtProcessBasicInformation = 0,
|
||||
kNtProcessQuotaLimits = 1,
|
||||
kNtProcessIoCounters = 2,
|
||||
kNtProcessVmCounters = 3,
|
||||
kNtProcessTimes = 4,
|
||||
kNtProcessBasePriority = 5,
|
||||
kNtProcessRaisePriority = 6,
|
||||
kNtProcessDebugPort = 7,
|
||||
kNtProcessExceptionPort = 8,
|
||||
kNtProcessAccessToken = 9,
|
||||
kNtProcessWow64Information = 26,
|
||||
kNtProcessImageFileName = 27
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_PROCESSINFOCLASS_H_ */
|
7
libc/nt/enum/procthreadattributes.h
Normal file
7
libc/nt/enum/procthreadattributes.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_PROCTHREADATTRIBUTES_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_PROCTHREADATTRIBUTES_H_
|
||||
|
||||
#define kNtProcThreadAttributeReplaceValue 1
|
||||
#define kNtProcThreadAttributeHandleList 0x00020002
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_PROCTHREADATTRIBUTES_H_ */
|
24
libc/nt/enum/reggetvalueflags.h
Normal file
24
libc/nt/enum/reggetvalueflags.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_REGGETVALUEFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_REGGETVALUEFLAGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtRegGetValueFlags {
|
||||
kNtRrfRtRegNone = 0x00000001,
|
||||
kNtRrfRtRegSz = 0x00000002,
|
||||
kNtRrfRtRegExpandSz = 0x00000004,
|
||||
kNtRrfRtRegBinary = 0x00000008,
|
||||
kNtRrfRtRegDword = 0x00000010,
|
||||
kNtRrfRtRegMultiSz = 0x00000020,
|
||||
kNtRrfRtRegQword = 0x00000040,
|
||||
kNtRrfRtDword = kNtRrfRtRegBinary | kNtRrfRtRegDword,
|
||||
kNtRrfRtQword = kNtRrfRtRegBinary | kNtRrfRtRegQword,
|
||||
kNtRrfRtAny = 0x0000ffff,
|
||||
kNtRrfSubkeyWow6464key = 0x00010000,
|
||||
kNtRrfSubkeyWow6432key = 0x00020000,
|
||||
kNtRrfWow64Mask = 0x00030000,
|
||||
kNtRrfNoexpand = 0x10000000,
|
||||
kNtRrfZeroonfailure = 0x20000000
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_REGGETVALUEFLAGS_H_ */
|
21
libc/nt/enum/regtype.h
Normal file
21
libc/nt/enum/regtype.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_REGTYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_REGTYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtRegType {
|
||||
kNtRegNone = 0,
|
||||
kNtRegSz = 1, /* UTF-16 NUL-terminated string */
|
||||
kNtRegExpandSz = 2, /* UTF-16 NUL-terminated string w/ env vars refs */
|
||||
kNtRegBinary = 3,
|
||||
kNtRegDword = 4,
|
||||
kNtRegDwordBigEndian = 5,
|
||||
kNtRegLink = 6,
|
||||
kNtRegMultiSz = 7, /* UTF-16 double-NUL-terminated string list */
|
||||
kNtRegResourceList = 8,
|
||||
kNtRegFullResourceDescriptor = 9,
|
||||
kNtRegResourceRequirementsList = 10,
|
||||
kNtRegQword = 11,
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_REGTYPE_H_ */
|
11
libc/nt/enum/sectioninformationclass.h
Normal file
11
libc/nt/enum/sectioninformationclass.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINFORMATIONCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtSectionInformationClass {
|
||||
kNtSectionBasicInformation,
|
||||
kNtSectionImageInformation
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINFORMATIONCLASS_H_ */
|
8
libc/nt/enum/sectioninherit.h
Normal file
8
libc/nt/enum/sectioninherit.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINHERIT_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINHERIT_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtSectionInherit { kNtViewShare = 1, kNtViewUnmap = 2 };
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINHERIT_H_ */
|
15
libc/nt/enum/sectionmapflags.h
Normal file
15
libc/nt/enum/sectionmapflags.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_SECTIONMAPFLAGS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_SECTIONMAPFLAGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtSectionMapFlags {
|
||||
kNtSectionQuery = 0x0001,
|
||||
kNtSectionMapWrite = 0x0002,
|
||||
kNtSectionMapRead = 0x0004,
|
||||
kNtSectionMapExecute = 0x0008,
|
||||
kNtSectionExtendSize = 0x0010,
|
||||
kNtSectionMapExecuteExplicit = 0x0020
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_SECTIONMAPFLAGS_H_ */
|
13
libc/nt/enum/securityimpersonationlevel.h
Normal file
13
libc/nt/enum/securityimpersonationlevel.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_SECURITYIMPERSONATIONLEVEL_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_SECURITYIMPERSONATIONLEVEL_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtSecurityImpersonationLevel {
|
||||
kNtSecurityAnonymous,
|
||||
kNtSecurityIdentification,
|
||||
kNtSecurityImpersonation,
|
||||
kNtSecurityDelegation
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_SECURITYIMPERSONATIONLEVEL_H_ */
|
19
libc/nt/enum/securityinformation.h
Normal file
19
libc/nt/enum/securityinformation.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_SECURITYINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_SECURITYINFORMATION_H_
|
||||
|
||||
#define kNtOwnerSecurityInformation 0x00000001
|
||||
#define kNtGroupSecurityInformation 0x00000002
|
||||
#define kNtDaclSecurityInformation 0x00000004
|
||||
#define kNtSaclSecurityInformation 0x00000008
|
||||
#define kNtLabelSecurityInformation 0x00000010
|
||||
#define kNtAttributeSecurityInformation 0x00000020
|
||||
#define kNtScopeSecurityInformation 0x00000040
|
||||
#define kNtProcessTrustLabelSecurityInformation 0x00000080
|
||||
#define kNtAccessFilterSecurityInformation 0x00000100
|
||||
#define kNtBackupSecurityInformation 0x00010000
|
||||
#define kNtProtectedDaclSecurityInformation 0x80000000
|
||||
#define kNtProtectedSaclSecurityInformation 0x40000000
|
||||
#define kNtUnprotectedDaclSecurityInformation 0x20000000
|
||||
#define kNtUnprotectedSaclSecurityInformation 0x10000000
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_SECURITYINFORMATION_H_ */
|
19
libc/nt/enum/startf.h
Normal file
19
libc/nt/enum/startf.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_STARTF_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_STARTF_H_
|
||||
|
||||
#define kNtStartfUseshowwindow 0x00000001 /* otherwise wShowWindow ignored */
|
||||
#define kNtStartfUsesize 0x00000002 /* otherwise dwX / dwY ignored */
|
||||
#define kNtStartfUseposition 0x00000004 /* otherwise dwX/YSize ignored */
|
||||
#define kNtStartfUsecountchars 0x00000008 /* otherwise dwX/YCountChars ign. */
|
||||
#define kNtStartfUsefillattribute 0x00000010 /* etc. */
|
||||
#define kNtStartfRunfullscreen 0x00000020
|
||||
#define kNtStartfForceonfeedback 0x00000040
|
||||
#define kNtStartfForceofffeedback 0x00000080
|
||||
#define kNtStartfUsestdhandles 0x00000100 /* otherwise hStd... ignored */
|
||||
#define kNtStartfUsehotkey 0x00000200
|
||||
#define kNtStartfTitleislinkname 0x00000800
|
||||
#define kNtStartfTitleisappid 0x00001000
|
||||
#define kNtStartfPreventpinning 0x00002000
|
||||
#define kNtStartfUntrustedsource 0x00008000
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_STARTF_H_ */
|
80
libc/nt/enum/status.h
Normal file
80
libc/nt/enum/status.h
Normal file
|
@ -0,0 +1,80 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STATUS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STATUS_H_
|
||||
|
||||
/* high two bits = {success,informational,warning,error} */
|
||||
#define kNtStatusWait0 0x00000000 /* success statuses */
|
||||
#define kNtStatusAbandonedWait0 0x00000080
|
||||
#define kNtStatusUserApc 0x000000C0
|
||||
#define kNtStatusTimeout 0x00000102
|
||||
#define kNtStatusPending 0x00000103
|
||||
#define kNtStatusGuardPageViolation 0x80000001 /* warning statuses */
|
||||
#define kNtStatusDatatypeMisalignment 0x80000002
|
||||
#define kNtStatusBreakpoint 0x80000003
|
||||
#define kNtStatusSingleStep 0x80000004
|
||||
#define kNtStatusLongjump 0x80000026
|
||||
#define kNtStatusUnwindConsolidate 0x80000029
|
||||
#define kNtStatusAccessViolation 0xC0000005 /* error statuses */
|
||||
#define kNtStatusInPageError 0xC0000006
|
||||
#define kNtStatusInvalidHandle 0xC0000008
|
||||
#define kNtStatusInvalidParameter 0xC000000D
|
||||
#define kNtStatusNoMemory 0xC0000017
|
||||
#define kNtStatusIllegalInstruction 0xC000001D
|
||||
#define kNtStatusNoncontinuableException 0xC0000025
|
||||
#define kNtStatusInvalidDisposition 0xC0000026
|
||||
#define kNtStatusArrayBoundsExceeded 0xC000008C
|
||||
#define kNtStatusFloatDenormalOperand 0xC000008D
|
||||
#define kNtStatusFloatDivideByZero 0xC000008E
|
||||
#define kNtStatusFloatInexactResult 0xC000008F
|
||||
#define kNtStatusFloatInvalidOperation 0xC0000090
|
||||
#define kNtStatusFloatOverflow 0xC0000091
|
||||
#define kNtStatusFloatStackCheck 0xC0000092
|
||||
#define kNtStatusFloatUnderflow 0xC0000093
|
||||
#define kNtStatusIntegerDivideBYZero 0xC0000094
|
||||
#define kNtStatusIntegerOverflow 0xC0000095
|
||||
#define kNtStatusPrivilegedInstruction 0xC0000096
|
||||
#define kNtStatusStackOverflow 0xC00000FD
|
||||
#define kNtStatusDllNotFound 0xC0000135
|
||||
#define kNtStatusOrdinalNotFound 0xC0000138
|
||||
#define kNtStatusEntrypointNotFound 0xC0000139
|
||||
#define kNtStatusControlCExit 0xC000013A
|
||||
#define kNtStatusDllInitFailed 0xC0000142
|
||||
#define kNtStatusFloatMultipleFaults 0xC00002B4
|
||||
#define kNtStatusFloatMultipleTraps 0xC00002B5
|
||||
#define kNtStatusRegNatConsumption 0xC00002C9
|
||||
#define kNtStatusHeapCorruption 0xC0000374
|
||||
#define kNtStatusStackBufferOverrun 0xC0000409
|
||||
#define kNtStatusInvalidCruntimeParameter 0xC0000417
|
||||
#define kNtStatusAssertionFailure 0xC0000420
|
||||
#define kNtStatusEnclaveViolation 0xC00004A2
|
||||
#define kNtStatusSegmentNotification 0x40000005
|
||||
#define kNtStatusFatalAppExit 0x40000015
|
||||
/* statuses for the debugger facility */
|
||||
#define kNtDbgExceptionHandled 0x00010001
|
||||
#define kNtDbgContinue 0x00010002
|
||||
#define kNtDbgReplyLater 0x40010001
|
||||
#define kNtDbgTerminateThread 0x40010003
|
||||
#define kNtDbgTerminateProcess 0x40010004
|
||||
#define kNtDbgControlC 0x40010005
|
||||
#define kNtDbgPrintexceptionC 0x40010006
|
||||
#define kNtDbgRipexception 0x40010007
|
||||
#define kNtDbgControlBreak 0x40010008
|
||||
#define kNtDbgCommandException 0x40010009
|
||||
#define kNtDbgPrintexceptionWideC 0x4001000A
|
||||
#define kNtDbgExceptionNotHandled 0x80010001
|
||||
#define kNtStillActive kNtStatusPending
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
typedef uint32_t NtStatus;
|
||||
|
||||
forceinline int NtSeverity(NtStatus s) { return (unsigned)s >> 30; }
|
||||
forceinline bool32 NtSuccess(NtStatus s) { return NtSeverity(s) == 0; }
|
||||
forceinline bool32 NtInformation(NtStatus s) { return NtSeverity(s) == 1; }
|
||||
forceinline bool32 NtWarning(NtStatus s) { return NtSeverity(s) == 2; }
|
||||
forceinline bool32 NtError(NtStatus s) { return NtSeverity(s) == 3; }
|
||||
forceinline int NtCode(NtStatus s) { return s & 0xffff; }
|
||||
forceinline int NtFacility(NtStatus s) { return (s >> 16) & 0xfff; }
|
||||
forceinline int NtFacilityCode(NtStatus s) { return s & 0x0FFFFFFF; }
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STATUS_H_ */
|
20
libc/nt/enum/systeminformationclass.h
Normal file
20
libc/nt/enum/systeminformationclass.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_SYSTEMINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_SYSTEMINFORMATIONCLASS_H_
|
||||
|
||||
#define kNtSystemBasicInformation 0
|
||||
#define kNtSystemProcessorInformation 1
|
||||
#define kNtSystemPerformanceInformation 2
|
||||
#define kNtSystemTimeOfDayInformation 3
|
||||
#define kNtSystemProcessInformation 5
|
||||
#define kNtSystemProcessorTimes 8
|
||||
#define kNtSystemGlobalFlag 9
|
||||
#define kNtSystemModuleInformation 11
|
||||
#define kNtSystemLockInformation 12
|
||||
#define kNtSystemHandleInformation 16
|
||||
#define kNtSystemObjectInformation 17
|
||||
#define kNtSystemInterruptInformation 23
|
||||
#define kNtSystemExceptionInformation 33
|
||||
#define kNtSystemRegistryQuotaInformation 37
|
||||
#define kNtSystemLookasideInformation 45
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_SYSTEMINFORMATIONCLASS_H_ */
|
21
libc/nt/enum/threadaccess.h
Normal file
21
libc/nt/enum/threadaccess.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_THREADACCESS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_THREADACCESS_H_
|
||||
#include "libc/nt/enum/accessmask.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
#define kNtThreadTerminate 0x0001
|
||||
#define kNtThreadSuspendResume 0x0002
|
||||
#define kNtThreadGetContext 0x0008
|
||||
#define kNtThreadSetContext 0x0010
|
||||
#define kNtThreadQueryInformation 0x0040
|
||||
#define kNtThreadSetInformation 0x0020
|
||||
#define kNtThreadSetThreadToken 0x0080
|
||||
#define kNtThreadImpersonate 0x0100
|
||||
#define kNtThreadDirectImpersonation 0x0200
|
||||
#define kNtThreadSetLimitedInformation 0x0400
|
||||
#define kNtThreadQueryLimitedInformation 0x0800
|
||||
#define kNtThreadResume 0x1000
|
||||
#define kNtThreadAllAccess (kNtStandardRightsRequired | kNtSynchronize | 0xFFFF)
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_THREADACCESS_H_ */
|
28
libc/nt/enum/threadinfoclass.h
Normal file
28
libc/nt/enum/threadinfoclass.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_THREADINFOCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_THREADINFOCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtThreadInfoClass {
|
||||
kNtThreadBasicInformation,
|
||||
kNtThreadTimes,
|
||||
kNtThreadPriority,
|
||||
kNtThreadBasePriority,
|
||||
kNtThreadAffinityMask,
|
||||
kNtThreadImpersonationToken,
|
||||
kNtThreadDescriptorTableEntry,
|
||||
kNtThreadEnableAlignmentFaultFixup,
|
||||
kNtThreadEventPair_Reusable,
|
||||
kNtThreadQuerySetWin32StartAddress,
|
||||
kNtThreadZeroTlsCell,
|
||||
kNtThreadPerformanceCount,
|
||||
kNtThreadAmILastThread,
|
||||
kNtThreadIdealProcessor,
|
||||
kNtThreadPriorityBoost,
|
||||
kNtThreadSetTlsArrayAddress,
|
||||
kNtThreadIsIoPending,
|
||||
kNtThreadHideFromDebugger,
|
||||
kNtThreadInfoClass_MAX
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_THREADINFOCLASS_H_ */
|
17
libc/nt/enum/threadpriority.h
Normal file
17
libc/nt/enum/threadpriority.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_THREADPRIORITY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_THREADPRIORITY_H_
|
||||
|
||||
#define kNtThreadBasePriorityIdle (-15)
|
||||
#define kNtThreadBasePriorityMin (-2)
|
||||
#define kNtThreadBasePriorityMax 2
|
||||
#define kNtThreadBasePriorityLowrt 15
|
||||
|
||||
#define kNtThreadPriorityIdle kNtThreadBasePriorityIdle
|
||||
#define kNtThreadPriorityLowest kNtThreadBasePriorityMin
|
||||
#define kNtThreadPriorityBelowNormal (kNtThreadPriorityLowest + 1)
|
||||
#define kNtThreadPriorityNormal 0
|
||||
#define kNtThreadPriorityAboveNormal (kNtThreadPriorityHighest - 1)
|
||||
#define kNtThreadPriorityHighest kNtThreadBasePriorityMax
|
||||
#define kNtThreadPriorityTimeCritical kNtThreadBasePriorityLowrt
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_THREADPRIORITY_H_ */
|
19
libc/nt/enum/threadstate.h
Normal file
19
libc/nt/enum/threadstate.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_THREADSTATE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_THREADSTATE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum NtThreadState {
|
||||
kNtStateInitialized = 0,
|
||||
kNtStateReady,
|
||||
kNtStateRunning,
|
||||
kNtStateStandby,
|
||||
kNtStateTerminated,
|
||||
kNtStateWait,
|
||||
kNtStateTransition,
|
||||
kNtStateUnknown
|
||||
};
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_THREADSTATE_H_ */
|
23
libc/nt/enum/tokeninformationclass.h
Normal file
23
libc/nt/enum/tokeninformationclass.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_TOKENINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_TOKENINFORMATIONCLASS_H_
|
||||
|
||||
#define kNtTokenUser 1
|
||||
#define kNtTokenGroups 2
|
||||
#define kNtTokenPrivileges 3
|
||||
#define kNtTokenOwner 4
|
||||
#define kNtTokenPrimaryGroup 5
|
||||
#define kNtTokenDefaultDacl 6
|
||||
#define kNtTokenSource 7
|
||||
#define kNtTokenType 8
|
||||
#define kNtTokenImpersonationLevel 9
|
||||
#define kNtTokenStatistics 10
|
||||
#define kNtTokenRestrictedSids 11
|
||||
#define kNtTokenSessionId 12
|
||||
#define kNtTokenGroupsAndPrivileges 13
|
||||
#define kNtTokenSessionReference 14
|
||||
#define kNtTokenSandBoxInert 15
|
||||
#define kNtTokenAuditPolicy 16
|
||||
#define kNtTokenOrigin 17
|
||||
#define kNtTokenInfoClass_MAX 18
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_TOKENINFORMATIONCLASS_H_ */
|
8
libc/nt/enum/tokentype.h
Normal file
8
libc/nt/enum/tokentype.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_TOKENTYPE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_TOKENTYPE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtTokenType { kNtTokenPrimary = 1, kNtTokenImpersonation };
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_TOKENTYPE_H_ */
|
14
libc/nt/enum/valueinformationclass.h
Normal file
14
libc/nt/enum/valueinformationclass.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_VALUEINFORMATIONCLASS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_VALUEINFORMATIONCLASS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
enum NtKeyValueInformationClass {
|
||||
kNtKeyValueBasicInformation,
|
||||
kNtKeyValueFullInformation,
|
||||
kNtKeyValuePartialInformation,
|
||||
kNtKeyValueFullInformationAlign64,
|
||||
kNtKeyValuePartialInformationAlign64
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_VALUEINFORMATIONCLASS_H_ */
|
20
libc/nt/enum/version.h
Normal file
20
libc/nt/enum/version.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_VERSION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_VERSION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
/**
|
||||
* Known versions of the New Technology executive.
|
||||
* @see NtGetVersion()
|
||||
*/
|
||||
#define kNtVersionWindows10 0x0a00
|
||||
#define kNtVersionWindows81 0x0603
|
||||
#define kNtVersionWindows8 0x0602
|
||||
#define kNtVersionWindows7 0x0601
|
||||
#define kNtVersionWindowsVista 0x0600 /* intended baseline */
|
||||
#define kNtVersionWindowsXp64 0x0502 /* end of the road */
|
||||
#define kNtVersionWindowsXp 0x0501 /* snowball's chance */
|
||||
#define kNtVersionWindows2000 0x0500 /* the golden age */
|
||||
#define kNtVersionFuture 0x0b00
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_VERSION_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue