📄 win32api.txt
字号:
Const SUBLANG_DUTCH_BELGIAN = &H2 ' Dutch (Belgian)
Const SUBLANG_ENGLISH_US = &H1 ' English (USA)
Const SUBLANG_ENGLISH_UK = &H2 ' English (UK)
Const SUBLANG_ENGLISH_AUS = &H3 ' English (Australian)
Const SUBLANG_ENGLISH_CAN = &H4 ' English (Canadian)
Const SUBLANG_ENGLISH_NZ = &H5 ' English (New Zealand)
Const SUBLANG_ENGLISH_EIRE = &H6 ' English (Irish)
Const SUBLANG_FRENCH = &H1 ' French
Const SUBLANG_FRENCH_BELGIAN = &H2 ' French (Belgian)
Const SUBLANG_FRENCH_CANADIAN = &H3 ' French (Canadian)
Const SUBLANG_FRENCH_SWISS = &H4 ' French (Swiss)
Const SUBLANG_GERMAN = &H1 ' German
Const SUBLANG_GERMAN_SWISS = &H2 ' German (Swiss)
Const SUBLANG_GERMAN_AUSTRIAN = &H3 ' German (Austrian)
Const SUBLANG_ITALIAN = &H1 ' Italian
Const SUBLANG_ITALIAN_SWISS = &H2 ' Italian (Swiss)
Const SUBLANG_NORWEGIAN_BOKMAL = &H1 ' Norwegian (Bokma
Const SUBLANG_NORWEGIAN_NYNORSK = &H2 ' Norwegian (Nynorsk)
Const SUBLANG_PORTUGUESE = &H2 ' Portuguese
Const SUBLANG_PORTUGUESE_BRAZILIAN = &H1 ' Portuguese (Brazilian)
Const SUBLANG_SPANISH = &H1 ' Spanish (Castilian)
Const SUBLANG_SPANISH_MEXICAN = &H2 ' Spanish (Mexican)
Const SUBLANG_SPANISH_MODERN = &H3 ' Spanish (Modern)
'
' * Sorting IDs.
' *
' */
Const SORT_DEFAULT = &H0 ' sorting default
Const SORT_JAPANESE_XJIS = &H0 ' Japanese0xJIS order
Const SORT_JAPANESE_UNICODE = &H1 ' Japanese Unicode order
Const SORT_CHINESE_BIG5 = &H0 ' Chinese BIG5 order
Const SORT_CHINESE_UNICODE = &H1 ' Chinese Unicode order
Const SORT_KOREAN_KSC = &H0 ' Korean KSC order
Const SORT_KOREAN_UNICODE = &H1 ' Korean Unicode order
' The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
' devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these
' constants *MUST* always be in sync.
' The values are redefined in devioctl.h because they must be available to
' both DOS and NT.
'
Const FILE_READ_DATA = (&H1) ' file pipe
Const FILE_LIST_DIRECTORY = (&H1) ' directory
Const FILE_WRITE_DATA = (&H2) ' file pipe
Const FILE_ADD_FILE = (&H2) ' directory
Const FILE_APPEND_DATA = (&H4) ' file
Const FILE_ADD_SUBDIRECTORY = (&H4) ' directory
Const FILE_CREATE_PIPE_INSTANCE = (&H4) ' named pipe
Const FILE_READ_EA = (&H8) ' file directory
Const FILE_READ_PROPERTIES = FILE_READ_EA
Const FILE_WRITE_EA = (&H10) ' file directory
Const FILE_WRITE_PROPERTIES = FILE_WRITE_EA
Const FILE_EXECUTE = (&H20) ' file
Const FILE_TRAVERSE = (&H20) ' directory
Const FILE_DELETE_CHILD = (&H40) ' directory
Const FILE_READ_ATTRIBUTES = (&H80) ' all
Const FILE_WRITE_ATTRIBUTES = (&H100) ' all
Const FILE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H1FF)
Const FILE_GENERIC_READ = (STANDARD_RIGHTS_READ Or FILE_READ_DATA Or FILE_READ_ATTRIBUTES Or FILE_READ_EA Or SYNCHRONIZE)
Const FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE Or FILE_WRITE_DATA Or FILE_WRITE_ATTRIBUTES Or FILE_WRITE_EA Or FILE_APPEND_DATA Or SYNCHRONIZE)
Const FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE Or FILE_READ_ATTRIBUTES Or FILE_EXECUTE Or SYNCHRONIZE)
Const FILE_SHARE_READ = &H1
Const FILE_SHARE_WRITE = &H2
Const FILE_ATTRIBUTE_READONLY = &H1
Const FILE_ATTRIBUTE_HIDDEN = &H2
Const FILE_ATTRIBUTE_SYSTEM = &H4
Const FILE_ATTRIBUTE_DIRECTORY = &H10
Const FILE_ATTRIBUTE_ARCHIVE = &H20
Const FILE_ATTRIBUTE_NORMAL = &H80
Const FILE_ATTRIBUTE_TEMPORARY = &H100
Const FILE_ATTRIBUTE_COMPRESSED = &H800
Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1
Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2
Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4
Const FILE_NOTIFY_CHANGE_SIZE = &H8
Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10
Const FILE_NOTIFY_CHANGE_SECURITY = &H100
Const MAILSLOT_NO_MESSAGE = (-1)
Const MAILSLOT_WAIT_FOREVER = (-1)
Const FILE_CASE_SENSITIVE_SEARCH = &H1
Const FILE_CASE_PRESERVED_NAMES = &H2
Const FILE_UNICODE_ON_DISK = &H4
Const FILE_PERSISTENT_ACLS = &H8
Const FILE_FILE_COMPRESSION = &H10
Const FILE_VOLUME_IS_COMPRESSED = &H8000
Const IO_COMPLETION_MODIFY_STATE = &H2
Const IO_COMPLETION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H3)
Const DUPLICATE_CLOSE_SOURCE = &H1
Const DUPLICATE_SAME_ACCESS = &H2
' //////////////////////////////////////////////////////////////////////
' //
' ACCESS MASK //
' //
' //////////////////////////////////////////////////////////////////////
'
' Define the access mask as a longword sized structure divided up as
' follows:
' typedef struct _ACCESS_MASK {
' WORD SpecificRights;
' Byte StandardRights;
' Byte AccessSystemAcl : 1;
' Byte Reserved : 3;
' Byte GenericAll : 1;
' Byte GenericExecute : 1;
' Byte GenericWrite : 1;
' Byte GenericRead : 1;
' } ACCESS_MASK;
' typedef ACCESS_MASK *PACCESS_MASK;
'
' but to make life simple for programmer's we'll allow them to specify
' a desired access mask by simply OR'ing together mulitple single rights
' and treat an access mask as a DWORD. For example
'
' DesiredAccess = DELETE Or READ_CONTROL
'
' So we'll declare ACCESS_MASK as DWORD
'
' begin_ntddk begin_nthal begin_ntifs
' //////////////////////////////////////////////////////////////////////
' //
' ACCESS TYPES //
' //
' //////////////////////////////////////////////////////////////////////
' begin_ntddk begin_nthal begin_ntifs
'
' The following are masks for the predefined standard access types
' AccessSystemAcl access type
Const ACCESS_SYSTEM_SECURITY = &H1000000
' MaximumAllowed access type
Const MAXIMUM_ALLOWED = &H2000000
' These are the generic rights.
Const GENERIC_READ = &H80000000
Const GENERIC_WRITE = &H40000000
Const GENERIC_EXECUTE = &H20000000
Const GENERIC_ALL = &H10000000
' Define the generic mapping array. This is used to denote the
' mapping of each generic access right to a specific access mask.
Type GENERIC_MAPPING
GenericRead As Long
GenericWrite As Long
GenericExecute As Long
GenericAll As Long
End Type
' //////////////////////////////////////////////////////////////////////
' //
' LUID_AND_ATTRIBUTES //
' //
' //////////////////////////////////////////////////////////////////////
'
Type LUID
LowPart As Long
HighPart As Long
End Type
Type LUID_AND_ATTRIBUTES
pLuid As LUID
Attributes As Long
End Type
' //////////////////////////////////////////////////////////////////////
' //
' ACL and ACE //
' //
' //////////////////////////////////////////////////////////////////////
'
' Define an ACL and the ACE format. The structure of an ACL header
' followed by one or more ACEs. Pictorally the structure of an ACL header
' is as follows:
'
' The current AclRevision is defined to be ACL_REVISION.
'
' AclSize is the size, in bytes, allocated for the ACL. This includes
' the ACL header, ACES, and remaining free space in the buffer.
'
' AceCount is the number of ACES in the ACL.
'
' begin_ntddk begin_ntifs
' This is the *current* ACL revision
Const ACL_REVISION = (2)
' This is the history of ACL revisions. Add a new one whenever
' ACL_REVISION is updated
Const ACL_REVISION1 = (1)
Const ACL_REVISION2 = (2)
Type ACL
AclRevision As Byte
Sbz1 As Byte
AclSize As Integer
AceCount As Integer
Sbz2 As Integer
End Type
' typedef ACL *PACL;
' end_ntddk
' The structure of an ACE is a common ace header followed by ace type
' specific data. Pictorally the structure of the common ace header is
' as follows:
' AceType denotes the type of the ace, there are some predefined ace
' types
'
' AceSize is the size, in bytes, of ace.
'
' AceFlags are the Ace flags for audit and inheritance, defined Integerly.
Type ACE_HEADER
AceType As Byte
AceFlags As Byte
AceSize As Long
End Type
'
' The following are the predefined ace types that go into the AceType
' field of an Ace header.
Const ACCESS_ALLOWED_ACE_TYPE = &H0
Const ACCESS_DENIED_ACE_TYPE = &H1
Const SYSTEM_AUDIT_ACE_TYPE = &H2
Const SYSTEM_ALARM_ACE_TYPE = &H3
' The following are the inherit flags that go into the AceFlags field
' of an Ace header.
Const OBJECT_INHERIT_ACE = &H1
Const CONTAINER_INHERIT_ACE = &H2
Const NO_PROPAGATE_INHERIT_ACE = &H4
Const INHERIT_ONLY_ACE = &H8
Const VALID_INHERIT_FLAGS = &HF
' The following are the currently defined ACE flags that go into the
' AceFlags field of an ACE header. Each ACE type has its own set of
' AceFlags.
'
' SUCCESSFUL_ACCESS_ACE_FLAG - used only with system audit and alarm ACE
' types to indicate that a message is generated for successful accesses.
'
' FAILED_ACCESS_ACE_FLAG - used only with system audit and alarm ACE types
' to indicate that a message is generated for failed accesses.
' SYSTEM_AUDIT and SYSTEM_ALARM AceFlags
'
' These control the signaling of audit and alarms for success or failure.
Const SUCCESSFUL_ACCESS_ACE_FLAG = &H40
Const FAILED_ACCESS_ACE_FLAG = &H80
'
' We'll define the structure of the predefined ACE types. Pictorally
' the structure of the predefined ACE's is as follows:
' Mask is the access mask associated with the ACE. This is either the
' access allowed, access denied, audit, or alarm mask.
'
' Sid is the Sid associated with the ACE.
'
' The following are the four predefined ACE types.
' Examine the AceType field in the Header to determine
' which structure is appropriate to use for casting.
Type ACCESS_ALLOWED_ACE
Header As ACE_HEADER
Mask As Long
SidStart As Long
End Type
Type ACCESS_DENIED_ACE
Header As ACE_HEADER
Mask As Long
SidStart As Long
End Type
Type SYSTEM_AUDIT_ACE
Header As ACE_HEADER
Mask As Long
SidStart As Long
End Type
Type SYSTEM_ALARM_ACE
Header As ACE_HEADER
Mask As Long
SidStart As Long
End Type
' The following declarations are used for setting and querying information
' about and ACL. First are the various information classes available to
' the user.
'
Const AclRevisionInformation = 1
Const AclSizeInformation = 2
'
' This record is returned/sent if the user is requesting/setting the
' AclRevisionInformation
'
Type ACL_REVISION_INFORMATION
AclRevision As Long
End Type
'
' This record is returned if the user is requesting AclSizeInformation
'
Type ACL_SIZE_INFORMATION
AceCount As Long
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -