VBA 64位API声明语句第007讲

跟我学VBA,我这里专注VBA, 授人以渔。我98年开始,从源码接触VBA已经20余年了,随着年龄的增长,越来越觉得有必要把这项技能传递给需要这项技术的职场人员。希望职场和数据打交道的朋友,都来学习VBA,利用VBA,起码可以提高自己的工作效率,可以有时间多陪陪父母,多陪陪家人,何乐而不为呢?我的教程一共九套,从入门开始一直讲到程序的分发,是学习利用VBA的实用教程。这份API资料是随高级教程赠送的.

这讲我们继续学习VBA 64位API声明语句第007讲,这些内容是MS的权威资料,看似枯燥,但对于想学习API函数的朋友是非常有用的。

今日霍州(www.jrhz.info)©️

【分享成果,随喜正能量】 大喜易失言,大怒易失礼,大惊易失态,大哀易失颜,大乐易失察,大惧易失节,大醉易失德,大话易失信,大欲易失命。谨记!。

当学员学习到高级阶段,如果引用API,这个资料可以直接查到64位写法。大多数情况下我们是将低版本的程序文件升级到高版本,这时您就不必为如下的错误提示所困扰了:

今日霍州(www.jrhz.info)©️

' //////////////////////////////////////////////////////////////////////

' //

' 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 Integer

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

今日霍州(www.jrhz.info)©️

我20多年的VBA实践经验,全部浓缩在下面的各个教程中:

今日霍州(www.jrhz.info)©️

今日霍州(www.jrhz.info)©️

特别声明:[VBA 64位API声明语句第007讲] 该文观点仅代表作者本人,今日霍州系信息发布平台,霍州网仅提供信息存储空间服务。

猜你喜欢

OPPO申请摄像模组及电子设备专利,能够缩短对焦镜组的对焦行程(oppo手机的摄像权限在什么地方)

通过天眼查大数据分析,OPPO广东移动通信有限公司共对外投资了44家企业,参与招投标项目69次,财产线索方面有商标™️信息5000条,专利信息5000条,此外企业还拥有行政许可80个。 声明:市场有风险,投资需谨…

OPPO申请摄像模组及电子设备专利,能够缩短对焦镜组的对焦行程(oppo手机的摄像权限在什么地方)

道歉成瘾却屡教不改,曾志伟卸任遭群嘲,体面终究败给了过往劣迹(道歉成瘾却屡禁不止)

到底是他拯救了TVB,还是他在过去五年中透支了这家百年老店的最后一丝底气?TVB的财报在2024年显示亏损大幅缩小,虽然数据漂亮,但曾志伟在市场上的成功,却让TVB的港味逐渐消失。 曾志伟虽然为TVB止住…

道歉成瘾却屡教不改,曾志伟卸任遭群嘲,体面终究败给了过往劣迹(道歉成瘾却屡禁不止)

曾志伟卸任TVB总经理,谭咏麟上台为其颁奖,高层艺人动容不舍(曾志伟卸任tvb总导演)

台下,TVB的高层和众多艺人纷纷为他送上热烈的掌声,眼神中满是不舍与感激,整个场面温馨而感人,这一刻,成了颁奖典礼中最难忘的注脚。 在那场告别的颁奖礼上,曾志伟深情地表示:到了今天,我也觉得自己江郎才尽了…

曾志伟卸任TVB总经理,谭咏麟上台为其颁奖,高层艺人动容不舍(曾志伟卸任tvb总导演)

怎么治疗经常性便秘(经常性会怎么样)

经常性便秘可以通过调整饮食、增加运动、建立排便习惯、药物治疗和生物反馈治疗等方式改善。常见的原因包括膳食纤维摄入不足、肠道蠕动减弱、排便反射抑制、肠道菌群失衡以及器质性疾病等

怎么治疗经常性便秘(经常性会怎么样)

脑梗塞哪些东西不能吃(脑梗塞什么东西不能吃或少吃)

脑梗塞患者在饮食上需避免高盐、高脂、高糖食物,限制酒精摄入,减少加工食品和刺激性食物的摄入。 高盐饮食会导致血压升高,增加血管负担,不利于脑梗塞患者的康复。患者应避免食用腌制食品、咸菜、酱料等高盐食物,每日盐摄入量应控制在5克以下

脑梗塞哪些东西不能吃(脑梗塞什么东西不能吃或少吃)