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

📄 win32api.txt

📁 win32api文档
💻 TXT
📖 第 1 页 / 共 5 页
字号:
Public Const SUBLANG_ITALIAN_SWISS = &H2                 '  Italian (Swiss)
Public Const SUBLANG_NORWEGIAN_BOKMAL = &H1              '  Norwegian (Bokma
Public Const SUBLANG_NORWEGIAN_NYNORSK = &H2             '  Norwegian (Nynorsk)
Public Const SUBLANG_PORTUGUESE = &H2                    '  Portuguese
Public Const SUBLANG_PORTUGUESE_BRAZILIAN = &H1          '  Portuguese (Brazilian)
Public Const SUBLANG_SPANISH = &H1                       '  Spanish (Castilian)
Public Const SUBLANG_SPANISH_MEXICAN = &H2               '  Spanish (Mexican)
Public Const SUBLANG_SPANISH_MODERN = &H3                '  Spanish (Modern)

'
'  *  Sorting IDs.
'  *
'  */
Public Const SORT_DEFAULT = &H0                          '  sorting default

Public Const SORT_JAPANESE_XJIS = &H0                    '  Japanese0xJIS order
Public Const SORT_JAPANESE_UNICODE = &H1                 '  Japanese Unicode order

Public Const SORT_CHINESE_BIG5 = &H0                     '  Chinese BIG5 order
Public Const SORT_CHINESE_UNICODE = &H1                  '  Chinese Unicode order

Public Const SORT_KOREAN_KSC = &H0                       '  Korean KSC order
Public 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.
'

Public Const FILE_READ_DATA = (&H1)                     '  file pipe
Public Const FILE_LIST_DIRECTORY = (&H1)                '  directory

Public Const FILE_WRITE_DATA = (&H2)                    '  file pipe
Public Const FILE_ADD_FILE = (&H2)                      '  directory

Public Const FILE_APPEND_DATA = (&H4)                   '  file
Public Const FILE_ADD_SUBDIRECTORY = (&H4)              '  directory
Public Const FILE_CREATE_PIPE_INSTANCE = (&H4)          '  named pipe

Public Const FILE_READ_EA = (&H8)                       '  file directory
Public Const FILE_READ_PROPERTIES = FILE_READ_EA

Public Const FILE_WRITE_EA = (&H10)                     '  file directory
Public Const FILE_WRITE_PROPERTIES = FILE_WRITE_EA

Public Const FILE_EXECUTE = (&H20)                      '  file
Public Const FILE_TRAVERSE = (&H20)                     '  directory

Public Const FILE_DELETE_CHILD = (&H40)                 '  directory

Public Const FILE_READ_ATTRIBUTES = (&H80)              '  all

Public Const FILE_WRITE_ATTRIBUTES = (&H100)            '  all

Public Const FILE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H1FF)

Public Const FILE_GENERIC_READ = (STANDARD_RIGHTS_READ Or FILE_READ_DATA Or FILE_READ_ATTRIBUTES Or FILE_READ_EA Or SYNCHRONIZE)


Public 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)


Public Const FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE Or FILE_READ_ATTRIBUTES Or FILE_EXECUTE Or SYNCHRONIZE)

Public Const FILE_SHARE_READ = &H1
Public Const FILE_SHARE_WRITE = &H2
Public Const FILE_ATTRIBUTE_READONLY = &H1
Public Const FILE_ATTRIBUTE_HIDDEN = &H2
Public Const FILE_ATTRIBUTE_SYSTEM = &H4
Public Const FILE_ATTRIBUTE_DIRECTORY = &H10
Public Const FILE_ATTRIBUTE_ARCHIVE = &H20
Public Const FILE_ATTRIBUTE_NORMAL = &H80
Public Const FILE_ATTRIBUTE_TEMPORARY = &H100
Public Const FILE_ATTRIBUTE_COMPRESSED = &H800
Public Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1
Public Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2
Public Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4
Public Const FILE_NOTIFY_CHANGE_SIZE = &H8
Public Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10
Public Const FILE_NOTIFY_CHANGE_SECURITY = &H100
Public Const MAILSLOT_NO_MESSAGE = (-1)
Public Const MAILSLOT_WAIT_FOREVER = (-1)
Public Const FILE_CASE_SENSITIVE_SEARCH = &H1
Public Const FILE_CASE_PRESERVED_NAMES = &H2
Public Const FILE_UNICODE_ON_DISK = &H4
Public Const FILE_PERSISTENT_ACLS = &H8
Public Const FILE_FILE_COMPRESSION = &H10
Public Const FILE_VOLUME_IS_COMPRESSED = &H8000
Public Const IO_COMPLETION_MODIFY_STATE = &H2
Public Const IO_COMPLETION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H3)
Public Const DUPLICATE_CLOSE_SOURCE = &H1
Public 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

Public Const ACCESS_SYSTEM_SECURITY = &H1000000

'  MaximumAllowed access type

Public Const MAXIMUM_ALLOWED = &H2000000

'   These are the generic rights.

Public Const GENERIC_READ = &H80000000
Public Const GENERIC_WRITE = &H40000000
Public Const GENERIC_EXECUTE = &H20000000
Public 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

Public Const ACL_REVISION = (2)

'  This is the history of ACL revisions.  Add a new one whenever
'  ACL_REVISION is updated

Public Const ACL_REVISION1 = (1)
Public 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.

Public Const ACCESS_ALLOWED_ACE_TYPE = &H0
Public Const ACCESS_DENIED_ACE_TYPE = &H1
Public Const SYSTEM_AUDIT_ACE_TYPE = &H2
Public Const SYSTEM_ALARM_ACE_TYPE = &H3

'   The following are the inherit flags that go into the AceFlags field
'   of an Ace header.

Public Const OBJECT_INHERIT_ACE = &H1
Public Const CONTAINER_INHERIT_ACE = &H2
Public Const NO_PROPAGATE_INHERIT_ACE = &H4
Public Const INHERIT_ONLY_ACE = &H8
Public 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.

Public Const SUCCESSFUL_ACCESS_ACE_FLAG = &H40
Public 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.
'

Public Const AclRevisionInformation = 1
Public 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

⌨️ 快捷键说明

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