VBA 64位API声明语句第008讲

news2025/5/10 17:00:51

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

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

【分享成果,随喜正能量】 102 我们不是圣人,所以常走错路,路,没有错,错的只是选择。如果,在一条走错的路上,别人都步履蹒跚,愁眉不展,而我们却依旧笑颜如花,坦然前行,久而久之,就成了错误路上的一道风景,亮丽了别人的眼睛,也愉悦了自己的心。当我们的心不同了,脚下的路也就不同了,阳光会明媚,伤痛也会远离。。

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

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

'

Const SECURITY_DESCRIPTOR_REVISION = (1)

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

'

Const SECURITY_DESCRIPTOR_MIN_LENGTH = (20)

Const SE_OWNER_DEFAULTED = &H1

Const SE_GROUP_DEFAULTED = &H2

Const SE_DACL_PRESENT = &H4

Const SE_DACL_DEFAULTED = &H8

Const SE_SACL_PRESENT = &H10

Const SE_SACL_DEFAULTED = &H20

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 Integer

Owner As LongPtr

Group As LongPtr

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

'

Const SE_PRIVILEGE_ENABLED_BY_DEFAULT = &H1

Const SE_PRIVILEGE_ENABLED = &H2

Const SE_PRIVILEGE_USED_FOR_ACCESS = &H80000000

'

' Privilege Set Control flags

'

Const PRIVILEGE_SET_ALL_NECESSARY = (1)

'

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



本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2327732.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Linux信号——信号的保存(2)

关于core和term两种终止方式 core是什么? 将进程在内存中的核心数据(与调试有关)转存到磁盘中形成core,core.pid的文件。 core dump:核心转储。 core与term的区别: term只是普通的终止,而core终止方式还要…

【蓝桥杯嵌入式——学习笔记一】2016年第七届省赛真题重难点解析记录,闭坑指南(文末附完整代码)

在读题过程中发现本次使用的是串口2,需要配置串口2。 但在查看产品手册时发现PA14同时也是SWCLK。 所以在使用串口2时需要拔下跳线帽去连接CH340。 可能是用到串口2的缘故,在烧录时发现报了一个错误。这时我们要想烧录得按着复位键去点击烧录&#xff0c…

基础常问 (概念、代码)

读源码 代码题 Void方法 ,也可以提前rerun;结束 RandomAccessFile类(随机访问文件) 在 Java 中,可以使用RandomAccessFile类来实现文件指针操作。RandomAccessFile提供了对文件内容的随机访问功能,它的文件指针可以通…

J1 ResNet-50算法实战与解析

🍨 本文為🔗365天深度學習訓練營 中的學習紀錄博客🍖 原作者:K同学啊 | 接輔導、項目定制 一、理论知识储备 1. 残差网络的由来 ResNet主要解决了CNN在深度加深时的退化问题(梯度消失与梯度爆炸)。 虽然B…

[MySQL初阶]MySQL(8)索引机制:下

标题:[MySQL初阶]MySQL(8)索引机制:下 水墨不写bug 文章目录 四、从问题到底层,从现象到本质1.为什么插入的数据默认排好序2.MySQL的Page(1)为什么选择用Page?(2&#x…

Muduo网络库实现 [九] - EventLoopThread模块

目录 设计思路 类的设计 模块的实现 私有接口 公有接口 设计思路 我们说过一个EventLoop要绑定一个线程,未来该EventLoop所管理的所有的连接的操作都需要在这个EventLoop绑定的线程中进行,所以我们该如何实现将EventLoop和线程绑定呢?…

《K230 从熟悉到...》识别机器码(AprilTag)

《K230 从熟悉到...》识别机器码(aprirltag) tag id 《庐山派 K230 从熟悉到...》 识别机器码(AprilTag) AprilTag是一种基于二维码的视觉标记系统,最早是由麻省理工学院(MIT)在2008年开发的。A…

栈和队列的概念

1.栈的概念 只允许在固定的一端进行插入和删除,进行数据的插入和数据的删除操作的一端数栈顶,另一端称为栈底。 栈中数据元素遵循后进先出LIFO (Last In First Out) 压栈:栈的插入。 出栈:栈的删除。出入数据在栈顶。 那么下面…

红日靶场一实操笔记

一,网络拓扑图 二,信息搜集 1.kali机地址:192.168.50.129 2.探测靶机 注:需要win7开启c盘里面的phpstudy的服务。 nmap -sV -Pn 192.168.50.128 或者扫 nmap -PO 192.168.50.0/24 可以看出来win7(ip为192.168.50.128)的靶机开…

【目标检测】【深度学习】【Pytorch版本】YOLOV2模型算法详解

【目标检测】【深度学习】【Pytorch版本】YOLOV2模型算法详解 文章目录 【目标检测】【深度学习】【Pytorch版本】YOLOV2模型算法详解前言YOLOV2的模型结构YOLOV2模型的基本执行流程YOLOV2模型的网络参数YOLOV2模型的训练方式 YOLOV2的核心思想前向传播阶段反向传播阶段 总结 前…

NineData云原生智能数据管理平台新功能发布|2025年3月版

本月发布 15 项更新,其中重点发布 3 项、功能优化 11 项、性能优化 1 项。 重点发布 基础服务 - MFA 多因子认证 新增 MFA 多因子认证,提升账号安全性。系统管理员开启后,所有组织成员需绑定认证器,登录时需输入动态验证码。 数…

GLSL(OpenGL 着色器语言)基础语法

GLSL(OpenGL 着色器语言)基础语法 GLSL(OpenGL Shading Language)是 OpenGL 计算着色器的语言,语法类似于 C 语言,但提供了针对 GPU 的特殊功能,如向量运算和矩阵运算。 着色器的开头总是要声明…

Redis基础知识-3

RedisTemplate对多种数据结构的操作 1. String类型 示例代码: // 保存数据 redisTemplate.opsForValue().set("user:1001", "John Doe"); // 设置键值对,无过期时间 redisTemplate.opsForValue().set("user:1002", &qu…

unity各个面板说明

游戏开发,unity各个面板说明 提示:帮帮志会陆续更新非常多的IT技术知识,希望分享的内容对您有用。本章分享的是Python基础语法。前后每一小节的内容是存在的有:学习and理解的关联性,希望对您有用~ unity简介-unity基础…

游戏引擎学习第199天

回顾并发现我们可能破坏了某些东西 目前,我们的调试 UI 运行得相对顺利,可以创建可修改的调试变量,也可以插入分析器(profiler)等特殊视图组件,并进行一些交互操作。然而,在上一次结束时&#…

Linux红帽:RHCSA认证知识讲解(十)使用 tar创建归档和压缩文件

Linux红帽:RHCSA认证知识讲解(十)使用 tar创建归档和压缩文件 前言一、归档与压缩的基本概念1.1 归档与压缩的区别 二、使用tar创建归档文件2.1 tar命令格式2.2 示例操作 三、使用tar进行压缩3.2 命令格式3.3 示例操作 前言 在红帽 Linux 系…

端到端机器学习流水线(MLflow跟踪实验)

目录 端到端机器学习流水线(MLflow跟踪实验)1. 引言2. 项目背景与意义2.1 端到端机器学习流水线的重要性2.2 MLflow的作用2.3 工业级数据处理需求3. 数据集生成与介绍3.1 数据集构成3.2 数据生成方法4. 机器学习流水线与MLflow跟踪4.1 端到端机器学习流水线4.2 MLflow跟踪实验…

相平面案例分析爱情故事

动态系统的分析可以分为三个步骤:第一步描述系统,通过语言来描述系统的特性,第一步描述系统,即通过语言来描述系统的特性;第二步数学分析,即使用数学工具对系统进行量化解析;第三步结果与讨论&a…

《2024年全球DDoS攻击态势分析》

从攻击态势来看,2024年DDoS攻击频次继续呈增长趋势,2024年同步增加1.3倍;超大规模攻击激增,超800Gbps同比增长3.1倍,累计高达771次,且互联网史上最大带宽和最大包速率攻击均被刷新;瞬时泛洪攻击…

RTC实时时钟M41T11M6F国产替代FRTC4111S

由NYFEA徕飞公司制造的FRTC4111S是一种低功耗的串行实时时钟(RTC),国产直接替代ST的M41T11M6F,其具有56字节的NVRAM,32.768 kHz振荡器(由外部晶体控制)和RAM的前8字节用于时钟/日历功能并以二进制编码十进制(BCD)格式配置。地址和数据通过两行双向总线串…