📄 win32api.txt
字号:
'
' This record is returned if the user is requesting AclSizeInformation
'
Type ACL_SIZE_INFORMATION
AceCount As Long
AclBytesInUse As Long
AclBytesFree As Long
End Type
' //////////////////////////////////////////////////////////////////////
' //
' SECURITY_DESCRIPTOR //
' //
' //////////////////////////////////////////////////////////////////////
'
' Define the Security Descriptor and related data types.
' This is an opaque data structure.
'
' begin_ntddk begin_ntifs
'
' Current security descriptor revision value
'
Public Const SECURITY_DESCRIPTOR_REVISION = (1)
Public Const SECURITY_DESCRIPTOR_REVISION1 = (1)
' end_ntddk
'
' Minimum length, in bytes, needed to build a security descriptor
' (NOTE: This must manually be kept consistent with the)
' (sizeof(SECURITY_DESCRIPTOR) )
'
Public Const SECURITY_DESCRIPTOR_MIN_LENGTH = (20)
Public Const SE_OWNER_DEFAULTED = &H1
Public Const SE_GROUP_DEFAULTED = &H2
Public Const SE_DACL_PRESENT = &H4
Public Const SE_DACL_DEFAULTED = &H8
Public Const SE_SACL_PRESENT = &H10
Public Const SE_SACL_DEFAULTED = &H20
Public Const SE_SELF_RELATIVE = &H8000
'
' Where:
'
' SE_OWNER_DEFAULTED - This boolean flag, when set, indicates that the
' SID pointed to by the Owner field was provided by a
' defaulting mechanism rather than explicitly provided by the
' original provider of the security descriptor. This may
' affect the treatment of the SID with respect to inheritence
' of an owner.
'
' SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the
' SID in the Group field was provided by a defaulting mechanism
' rather than explicitly provided by the original provider of
' the security descriptor. This may affect the treatment of
' the SID with respect to inheritence of a primary group.
'
' SE_DACL_PRESENT - This boolean flag, when set, indicates that the
' security descriptor contains a discretionary ACL. If this
' flag is set and the Dacl field of the SECURITY_DESCRIPTOR is
' null, then a null ACL is explicitly being specified.
'
' SE_DACL_DEFAULTED - This boolean flag, when set, indicates that the
' ACL pointed to by the Dacl field was provided by a defaulting
' mechanism rather than explicitly provided by the original
' provider of the security descriptor. This may affect the
' treatment of the ACL with respect to inheritence of an ACL.
' This flag is ignored if the DaclPresent flag is not set.
'
' SE_SACL_PRESENT - This boolean flag, when set, indicates that the
' security descriptor contains a system ACL pointed to by the
' Sacl field. If this flag is set and the Sacl field of the
' SECURITY_DESCRIPTOR is null, then an empty (but present)
' ACL is being specified.
'
' SE_SACL_DEFAULTED - This boolean flag, when set, indicates that the
' ACL pointed to by the Sacl field was provided by a defaulting
' mechanism rather than explicitly provided by the original
' provider of the security descriptor. This may affect the
' treatment of the ACL with respect to inheritence of an ACL.
' This flag is ignored if the SaclPresent flag is not set.
'
' SE_SELF_RELATIVE - This boolean flag, when set, indicates that the
' security descriptor is in self-relative form. In this form,
' all fields of the security descriptor are contiguous in memory
' and all pointer fields are expressed as offsets from the
' beginning of the security descriptor. This form is useful
' for treating security descriptors as opaque data structures
' for transmission in communication protocol or for storage on
' secondary media.
'
'
'
' In general, this data structure should be treated opaquely to ensure future
' compatibility.
'
'
Type SECURITY_DESCRIPTOR
Revision As Byte
Sbz1 As Byte
Control As Long
Owner As Long
Group As Long
Sacl As ACL
Dacl As ACL
End Type
' Where:
'
' Revision - Contains the revision level of the security
' descriptor. This allows this structure to be passed between
' systems or stored on disk even though it is expected to
' change in the future.
'
' Control - A set of flags which qualify the meaning of the
' security descriptor or individual fields of the security
' descriptor.
'
' Owner - is a pointer to an SID representing an object's owner.
' If this field is null, then no owner SID is present in the
' security descriptor. If the security descriptor is in
' self-relative form, then this field contains an offset to
' the SID, rather than a pointer.
'
' Group - is a pointer to an SID representing an object's primary
' group. If this field is null, then no primary group SID is
' present in the security descriptor. If the security descriptor
' is in self-relative form, then this field contains an offset to
' the SID, rather than a pointer.
'
' Sacl - is a pointer to a system ACL. This field value is only
' valid if the DaclPresent control flag is set. If the
' SaclPresent flag is set and this field is null, then a null
' ACL is specified. If the security descriptor is in
' self-relative form, then this field contains an offset to
' the ACL, rather than a pointer.
'
' Dacl - is a pointer to a discretionary ACL. This field value is
' only valid if the DaclPresent control flag is set. If the
' DaclPresent flag is set and this field is null, then a null
' ACL (unconditionally granting access) is specified. If the
' security descriptor is in self-relative form, then this field
' contains an offset to the ACL, rather than a pointer.
'
' //////////////////////////////////////////////////////////////////////
' //
' Privilege Related Data Structures //
' //
' //////////////////////////////////////////////////////////////////////
' Privilege attributes
'
Public Const SE_PRIVILEGE_ENABLED_BY_DEFAULT = &H1
Public Const SE_PRIVILEGE_ENABLED = &H2
Public Const SE_PRIVILEGE_USED_FOR_ACCESS = &H80000000
'
' Privilege Set Control flags
'
Public Const PRIVILEGE_SET_ALL_NECESSARY = (1)
'
' Privilege Set - This is defined for a privilege set of one.
' If more than one privilege is needed, then this structure
' will need to be allocated with more space.
'
' Note: don't change this structure without fixing the INITIAL_PRIVILEGE_SET
' structure (defined in se.h)
'
Type PRIVILEGE_SET
PrivilegeCount As Long
Control As Long
Privilege(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES
End Type
'//////////////////////////////////////////////////////////////////////
' //
' NT Defined Privileges //
' //
' //////////////////////////////////////////////////////////////////////
Public Const SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege"
Public Const SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege"
Public Const SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege"
Public Const SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege"
Public Const SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege"
Public Const SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege"
Public Const SE_TCB_NAME = "SeTcbPrivilege"
Public Const SE_SECURITY_NAME = "SeSecurityPrivilege"
Public Const SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege"
Public Const SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege"
Public Const SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege"
Public Const SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege"
Public Const SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"
Public Const SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"
Public Const SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege"
Public Const SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege"
Public Const SE_BACKUP_NAME = "SeBackupPrivilege"
Public Const SE_RESTORE_NAME = "SeRestorePrivilege"
Public Const SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
Public Const SE_DEBUG_NAME = "SeDebugPrivilege"
Public Const SE_AUDIT_NAME = "SeAuditPrivilege"
Public Const SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege"
Public Const SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege"
Public Const SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege"
' //////////////////////////////////////////////////////////////////
' //
' Security Quality Of Service //
' //
' //
' //////////////////////////////////////////////////////////////////
' begin_ntddk begin_nthal begin_ntifs
'
' Impersonation Level
'
' Impersonation level is represented by a pair of bits in Windows.
' If a new impersonation level is added or lowest value is changed from
' 0 to something else, fix the Windows CreateFile call.
'
Public Const SecurityAnonymous = 1
Public Const SecurityIdentification = 2
'//////////////////////////////////////////////////////////////////////
' //
' Registry API Constants //
' //
' //////////////////////////////////////////////////////////////////////
' Reg Data Types...
Public Const REG_NONE = 0 ' No value type
Public Const REG_SZ = 1 ' Unicode nul terminated string
Public Const REG_EXPAND_SZ = 2 ' Unicode nul terminated string
Public Const REG_BINARY = 3 ' Free form binary
Public Const REG_DWORD = 4 ' 32-bit number
Public Const REG_DWORD_LITTLE_ENDIAN = 4 ' 32-bit number (same as REG_DWORD)
Public Const REG_DWORD_BIG_ENDIAN = 5 ' 32-bit number
Public Const REG_LINK = 6 ' Symbolic Link (unicode)
Public Const REG_MULTI_SZ = 7 ' Multiple Unicode strings
Public Const REG_RESOURCE_LIST = 8 ' Resource list in the resource map
Public Const REG_FULL_RESOURCE_DESCRIPTOR = 9 ' Resource list in the hardware description
Public Const REG_RESOURCE_REQUIREMENTS_LIST = 10
Public Const REG_CREATED_NEW_KEY = &H1 ' New Registry Key created
Public Const REG_OPENED_EXISTING_KEY = &H2 ' Existing Key opened
Public Const REG_WHOLE_HIVE_VOLATILE = &H1 ' Restore whole hive volatile
Public Const REG_REFRESH_HIVE = &H2 ' Unwind changes to last flush
Public Const REG_NOTIFY_CHANGE_NAME = &H1 ' Create or delete (child)
Public Const REG_NOTIFY_CHANGE_ATTRIBUTES = &H2
Public Const REG_NOTIFY_CHANGE_LAST_SET = &H4 ' Time stamp
Public Const REG_NOTIFY_CHANGE_SECURITY = &H8
Public Const REG_LEGAL_CHANGE_FILTER = (REG_NOTIFY_CHANGE_NAME Or REG_NOTIFY_CHANGE_ATTRIBUTES Or REG_NOTIFY_CHANGE_LAST_SET Or REG_NOTIFY_CHANGE_SECURITY)
Public Const REG_LEGAL_OPTION = (REG_OPTION_RESERVED Or REG_OPTION_NON_VOLATILE Or REG_OPTION_VOLATILE Or REG_OPTION_CREATE_LINK Or REG_OPTION_BACKUP_RESTORE)
' Reg Create Type Values...
Public Const REG_OPTION_RESERVED = 0 ' Parameter is reserved
Public Const REG_OPTION_NON_VOLATILE = 0 ' Key is preserved when system is rebooted
Public Const REG_OPTION_VOLATILE = 1 ' Key is not preserved when system is rebooted
Public Const REG_OPTION_CREATE_LINK = 2 ' Created key is a symbolic link
Public Const REG_OPTION_BACKUP_RESTORE = 4 ' open for backup or restore
' Reg Key Security Options
Public Const READ_CONTROL = &H20000
Public Const KEY_QUERY_VALUE = &H1
Public Const KEY_SET_VALUE = &H2
Public Const KEY_CREATE_SUB_KEY = &H4
Public Const KEY_ENUMERATE_SUB_KEYS = &H8
Public Const KEY_NOTIFY = &H10
Public Const KEY_CREATE_LINK = &H20
Public Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))
Public Const KEY_WRITE = ((STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE))
Public Const KEY_EXECUTE = (KEY_READ)
Public Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))
Public Const STANDARD_RIGHTS_READ = (READ_CONTROL)
Public Const STANDARD_RIGHTS_WRITE = (READ_CONTROL)
Public Const KEY_EXECUTE = ((KEY_READ) And (Not SYNCHRONIZE))
' end winnt.txt
' Debug APIs
Public Const EXCEPTION_DEBUG_EVENT = 1
Public Const CREATE_THREAD_DEBUG_EVENT = 2
Public Const CREATE_PROCESS_DEBUG_EVENT = 3
Public Const EXIT_THREAD_DEBUG_EVENT = 4
Public Const EXIT_PROCESS_DEBUG_EVENT = 5
Public Const LOAD_DLL_DEBUG_EVENT = 6
Public Const UNLOAD_DLL_DEBUG_EVENT = 7
Public Const OUTPUT_DEBUG_STRING_EVENT = 8
Public Const RIP_EVENT = 9
Public Const EXCEPTION_MAXIMUM_PARAMETERS = 15
Type EXCEPTION_RECORD
ExceptionCode As Long
ExceptionFlags As Long
pExceptionRecord As Long ' Pointer to an EXCEPTION_RECORD structure
ExceptionAddress As Long
NumberParameters As Long
ExceptionInformation(EXCEPTION_MAXIMUM_PARAMETERS) As Long
End Type
Type EXCEPTION_DEBUG_INFO
pExceptionRecord As EXCEPTION_RECORD
dwFirstChance As Long
End Type
Type CREATE_THREAD_DEBUG_INFO
hThread As Long
lpThreadLocalBase As Long
lpStartAddress As Long
End Type
Type CREATE_PROCESS_DEBUG_INFO
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -