64位Office API声明语句第109讲

news2024/11/26 16:44:09

【分享成果,随喜正能量】你要做的是,果断拒绝那些给你制造不安的人,远离那些让你经常陷入负面情绪的人,失去他们,是你幸福的开始。。

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

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

f620a018df103e5f68ec1ca813f314c3.jpeg

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

16559555a9e921c714fdc2e1dbd3ceff.jpeg

' The divisor for a sample, used with the previous counter to form a

' sampled %. You must check for >0 before dividing by this! This

' counter will directly follow the numerator counter. It should not

' be displayed to the user.

Const PERF_SAMPLE_BASE = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_DISPLAY_NOSHOW Or &H1) ' for compatibility with pre-beta versions

' A timer which, when divided by an average base, produces a time

' in seconds which is the average time of some operation. This

' timer times total operations, and the base is the number of opera-

' tions. Display Suffix: "sec"

Const PERF_AVERAGE_TIMER = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_FRACTION Or PERF_DISPLAY_SECONDS)

' Used as the denominator in the computation of time or count

' averages. Must directly follow the numerator counter. Not dis-

' played to the user.

Const PERF_AVERAGE_BASE = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_DISPLAY_NOSHOW Or &H2) ' for compatibility with pre-beta versions

' A bulk count which, when divided (typically) by the number of

' operations, gives (typically) the number of bytes per operation.

' No Display Suffix.

Const PERF_AVERAGE_BULK = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_FRACTION Or PERF_DISPLAY_NOSHOW)

' 64-bit Timer in 100 nsec units. Display delta divided by

' delta time. Display suffix: "%"

Const PERF_100NSEC_TIMER = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_DELTA_COUNTER Or PERF_DISPLAY_PERCENT)

' 64-bit Timer inverse (e.g., idle is measured, but display busy As Integer)

' Display 100 - delta divided by delta time. Display suffix: "%"

Const PERF_100NSEC_TIMER_INV = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_DELTA_COUNTER Or PERF_INVERSE_COUNTER Or PERF_DISPLAY_PERCENT)

' 64-bit Timer. Divide delta by delta time. Display suffix: "%"

' Timer for multiple instances, so result can exceed 100%.

Const PERF_COUNTER_MULTI_TIMER = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_DELTA_COUNTER Or PERF_TIMER_TICK Or PERF_MULTI_COUNTER Or PERF_DISPLAY_PERCENT)

' 64-bit Timer inverse (e.g., idle is measured, but display busy As Integer)

' Display 100 _MULTI_BASE - delta divided by delta time.

' Display suffix: "%" Timer for multiple instances, so result

' can exceed 100%. Followed by a counter of type _MULTI_BASE.

Const PERF_COUNTER_MULTI_TIMER_INV = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_DELTA_COUNTER Or PERF_MULTI_COUNTER Or PERF_TIMER_TICK Or PERF_INVERSE_COUNTER Or PERF_DISPLAY_PERCENT)

' Number of instances to which the preceding _MULTI_..._INV counter

' applies. Used as a factor to get the percentage.

Const PERF_COUNTER_MULTI_BASE = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_MULTI_COUNTER Or PERF_DISPLAY_NOSHOW)

' 64-bit Timer in 100 nsec units. Display delta divided by delta time.

' Display suffix: "%" Timer for multiple instances, so result can exceed 100%.

Const PERF_100NSEC_MULTI_TIMER = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_DELTA_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_MULTI_COUNTER Or PERF_DISPLAY_PERCENT)

' 64-bit Timer inverse (e.g., idle is measured, but display busy As Integer)

' Display 100 _MULTI_BASE - delta divided by delta time.

' Display suffix: "%" Timer for multiple instances, so result

' can exceed 100%. Followed by a counter of type _MULTI_BASE.

Const PERF_100NSEC_MULTI_TIMER_INV = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_DELTA_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_MULTI_COUNTER Or PERF_INVERSE_COUNTER Or PERF_DISPLAY_PERCENT)

' Indicates the data is a fraction of the following counter which

' should not be time averaged on display (such as free space over

' total space.) Display as is. Display the quotient as "%".

Const PERF_RAW_FRACTION = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_FRACTION Or PERF_DISPLAY_PERCENT)

' Indicates the data is a base for the preceding counter which should

' not be time averaged on display (such as free space over total space.)

Const PERF_RAW_BASE = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_DISPLAY_NOSHOW Or &H3) ' for compatibility with pre-beta versions

' The data collected in this counter is actually the start time of the

' item being measured. For display, this data is subtracted from the

' sample time to yield the elapsed time as the difference between the two.

' In the definition below, the PerfTime field of the Object contains

' the sample time as indicated by the PERF_OBJECT_TIMER bit and the

' difference is scaled by the PerfFreq of the Object to convert the time

' units into seconds.

Const PERF_ELAPSED_TIME = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_ELAPSED Or PERF_OBJECT_TIMER Or PERF_DISPLAY_SECONDS)

' The following counter type can be used with the preceding types to

' define a range of values to be displayed in a histogram.

Const PERF_COUNTER_HISTOGRAM_TYPE = &H80000000 ' Counter begins or ends a histogram

' The following are used to determine the level of detail associated

' with the counter. The user will be setting the level of detail

' that should be displayed at any given time.

Const PERF_DETAIL_NOVICE = 100 ' The uninformed can understand it

Const PERF_DETAIL_ADVANCED = 200 ' For the advanced user

Const PERF_DETAIL_EXPERT = 300 ' For the expert user

Const PERF_DETAIL_WIZARD = 400 ' For the system designer

Type PERF_COUNTER_DEFINITION

        ByteLength As Long

        CounterNameTitleIndex As Long

#If Win64 Then

        CounterNameTitle As Long

#Else

        CounterNameTitle As String

#End If

        CounterHelpTitleIndex As Long

#If Win64 Then

        CounterHelpTitle As Long

#Else

        CounterHelpTitle As String

#End If

        DefaultScale As Long

        DetailLevel As Long

        CounterType As Long

        CounterSize As Long

        CounterOffset As Long

End Type

Const PERF_NO_UNIQUE_ID = -1

Type PERF_INSTANCE_DEFINITION

        ByteLength As Long

        ParentObjectTitleIndex As Long

        ParentObjectInstance As Long

        UniqueID As Long

        NameOffset As Long

        NameLength As Long

End Type

Type PERF_COUNTER_BLOCK

        ByteLength As Long

End Type

Const CDERR_DIALOGFAILURE = &HFFFF&

Const CDERR_GENERALCODES = &H0

Const CDERR_STRUCTSIZE = &H1

Const CDERR_INITIALIZATION = &H2

Const CDERR_NOTEMPLATE = &H3

Const CDERR_NOHINSTANCE = &H4

Const CDERR_LOADSTRFAILURE = &H5

Const CDERR_FINDRESFAILURE = &H6

Const CDERR_LOADRESFAILURE = &H7

Const CDERR_LOCKRESFAILURE = &H8

Const CDERR_MEMALLOCFAILURE = &H9

Const CDERR_MEMLOCKFAILURE = &HA

Const CDERR_NOHOOK = &HB

Const CDERR_REGISTERMSGFAIL = &HC

Const PDERR_PRINTERCODES = &H1000

Const PDERR_SETUPFAILURE = &H1001

Const PDERR_PARSEFAILURE = &H1002

Const PDERR_RETDEFFAILURE = &H1003

Const PDERR_LOADDRVFAILURE = &H1004

Const PDERR_GETDEVMODEFAIL = &H1005

Const PDERR_INITFAILURE = &H1006

Const PDERR_NODEVICES = &H1007

Const PDERR_NODEFAULTPRN = &H1008

Const PDERR_DNDMMISMATCH = &H1009

Const PDERR_CREATEICFAILURE = &H100A

Const PDERR_PRINTERNOTFOUND = &H100B

Const PDERR_DEFAULTDIFFERENT = &H100C

Const CFERR_CHOOSEFONTCODES = &H2000

Const CFERR_NOFONTS = &H2001

Const CFERR_MAXLESSTHANMIN = &H2002

Const FNERR_FILENAMECODES = &H3000

Const FNERR_SUBCLASSFAILURE = &H3001

Const FNERR_INVALIDFILENAME = &H3002

Const FNERR_BUFFERTOOSMALL = &H3003

Const FRERR_FINDREPLACECODES = &H4000

Const FRERR_BUFFERLENGTHZERO = &H4001

Const CCERR_CHOOSECOLORCODES = &H5000

' Public interface to LZEXP?.LIB

' LZEXPAND error return codes

Const LZERROR_BADINHANDLE = (-1) ' invalid input handle

Const LZERROR_BADOUTHANDLE = (-2) ' invalid output handle

Const LZERROR_READ = (-3) ' corrupt compressed file format

Const LZERROR_WRITE = (-4) ' out of space for output file

Const LZERROR_PUBLICLOC = (-5) ' insufficient memory for LZFile struct

Const LZERROR_GLOBLOCK = (-6) ' bad Global handle

Const LZERROR_BADVALUE = (-7) ' input parameter out of range

Const LZERROR_UNKNOWNALG = (-8) ' compression algorithm not recognized

Declare PtrSafe Function LZCopy Lib "lz32.dll" Alias "LZCopy" (ByVal hfSource As Long, ByVal hfDest As Long) As Long

Declare PtrSafe Function LZInit Lib "lz32.dll" Alias "LZInit" (ByVal hfSrc As Long) As Long

Declare PtrSafe Function GetExpandedName Lib "lz32.dll" Alias "GetExpandedNameA" (ByVal lpszSource As String, ByVal lpszBuffer As String) As Long

Declare PtrSafe Function LZOpenFile Lib "lz32.dll" Alias "LZOpenFileA" (ByVal lpszFile As String, lpOf As OFSTRUCT, ByVal style As Long) As Long

Declare PtrSafe Function LZSeek Lib "lz32.dll" Alias "LZSeek" (ByVal hfFile As Long, ByVal lOffset As Long, ByVal nOrigin As Long) As Long

Declare PtrSafe Function LZRead Lib "lz32.dll" Alias "LZRead" (ByVal hfFile As Long, ByVal lpvBuf As String, ByVal cbread As Long) As Long

Declare PtrSafe Sub LZClose Lib "lz32.dll" Alias "LZClose" (ByVal hfFile As Long)

84c543548f7a52921a24745b053fa853.jpeg

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


87202626633fcd84e5dd31230ddc0943.jpeg

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

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

相关文章

rk3399移植linux kernel

rk3399移植linux kernel 0.前言一、移植ubuntu根文件系统二、移植linux1.支持NFS(可选)2.配置uevent helper3.支持etx4文件系统(默认已支持)4.配置DRM驱动5.有线网卡驱动6.无线网卡驱动 三、设备树四、内核镜像文件制作五、烧录六、总结 参考文章: 1.RK3399移植u-bo…

MySQL变量(二十七)

二八佳人体似酥,腰悬利剑斩愚夫,虽然不见人头落,暗里教君骨髓枯。 一. 变量 在MySQL数据库的存储过程和函数中,可以使用变量来存储查询或计算的中间结果数据,或者输出最终的结果数据。 在 MySQL 数据库中,变量分为系…

leetcode每日一练-第278题-第一个错误的版本

一、思路 二分查找——因为它可以快速地将版本范围缩小一半,从而更快地找到第一个坏版本。 二、解题方法 维护一个左边界 left 和一个右边界 right,在每一步循环中,我们计算中间版本 mid,然后检查它是否是坏版本。如果是坏版本…

【UE】AI导航,多个导航物体无法走到同一终点问题

如不需要开启导航物体的碰撞,则需要关闭Use RVOAvoidance 不然会导致多个导航物体无法到达同一个目标点,都在附近晃。无法结束寻路。 ue小白,判定导航终点的半径,没有找到。如果有大佬知道怎么设置请在评论区指出,谢…

Linux mmap系统调用视角看缺页中断

问题 1. mmap具体是怎么实现比read/write少一次内存copy的 2.mmap共享映射和私有映射在内核实现的时候到底有什么区别 3.mmap的文件映射和匿名映射在内核实现的时候到底有什么区别 4.父子进程的COW具体怎么实现的 概述 实际开发过程中经常使用或者看到mmap函数&#xff0…

实力认证!TDengine 入选 Gartner 中国数据分析与人工智能技术成熟度曲线

近日,国际权威研究机构 Gartner 发布了《2023 年中国数据分析及人工智能技术成熟度曲线》(即《Hype Cycle for Data, Analytics and AI in China, 2023》)报告,TDengine 成功入选实时数据管理领域代表产品。 作为评估全球新技术成…

HPRNet: Whole-Body 2D 姿态估计

HPRNet: Hierarchical Point Regression for Whole-Body Human Pose Estimation解析 摘要1. 简介2. Related Work2.1 Human Body Pose Estimation2.2 Whole-body Pose Estimation 3. Model3.1 全身关键点的层次回归3.2 足部关键点回归3.3 网络架构3.4 目标函数PCH and BKH >…

【MFC】05.MFC第一大机制:程序启动机制-笔记

MFC程序开发所谓是非常简单,但是对于我们逆向人员来说,如果想要逆向MFC程序,那么我们就必须了解它背后的机制,这样我们才能够清晰地逆向出MFC程序,今天这篇文章就来带领大家了解MFC的第一大机制:程序启动机…

《向量数据库指南》——Rockset 为实时数据库添加向量嵌入支持(一)

2023年4月18日,数据库供应商 Rockset 公布了对向量嵌入的支持,此举旨在使用户能够实时搜索和操作任何类型的数据。 位于加利福尼亚州圣马特奥的 Rockset 以前支持结构化和半结构化数据,让用户可以使用 SQL 和 NoSQL 实时搜索和分析数据。 现在,通过增加对向量嵌入的支持…

海康威视摄像头二次开发_云台控制_视频画面实时预览(基于Qt实现)

一、项目背景 需求:需要在公司的产品里集成海康威视摄像头的SDK,用于控制海康威视的摄像头。 拍照抓图、视频录制、云台控制、视频实时预览等等功能。 开发环境: windows-X64(系统) + Qt5.12.6(Qt版本) + MSVC2017_X64(使用的编译器) 海康威视提供了设备网络SDK,设备网…

2023暑假牛客多校6- E.Sequence

题目描述 You have an array of elements . For each task, you have three integers . Ask whether you can find an array of integers satisfy: are the multiplies of 2 Specially, if , it should satisfy is the multiply of 2 We define . If possible, print…

Java虚拟机怎样设置CLASSPATH的环境变量?

CLASSPATH环境变量用于保存一系列类包的路径,它和PATH环境变量的查看与配置方式完全相同。当Java虚拟机需要运行一个类时,会在CLASSPATH环境变量定义的路径下寻找所需的.class文件和类包。 为了让Java虚拟机能找到所需的class文件,就需要对C…

模拟实现消息队列项目(系列3) -- 服务器模块(硬盘管理)

目录 前言 1. 创建项目 2. 创建核心类 2.1 Exchange 2.2 MSQueue 2.3 Binding 2.4 Message 3. 数据库设计 3.1 SQLite 配置 3.2 Mapper层代码实现 3.2.1 创建表操作 3.2.2 交换机 队列 绑定的增加和删除 3.3 实现DataBaseManager 3.4 DataBaseManager单元测试 4.…

【JS】实现系统取色器

效果 使用环境说明 根据当前的信息,截至到 2023 年 8 月,以下是一些支持使用 new EyeDropper() 的主要浏览器(可能还有其他浏览器也提供了类似的功能): Google Chrome:从 Chrome 94 版本开始引入了 new Ey…

Linux下共享windows 一键搞定

编写脚本 [rootlocalhost ~]# vim dd.sh#!/bin/bash yum -y install samba mkdir -p /home/shar sss dddecho " [share]comment Shared Folderpath /homebrowseable yeswritable yesguest ok yes " > /etc/samba/smb.confchmod x /home/* useradd qqqq s…

Qgis核密度分析

不建议使用Qgis进行核密度分析,建议使用arcgis,arcgis更简单。 arcgis核密度分析 Qgis核密度分析有两种: 法一:符号化,热图。 缺点:使用不方便,只适合看一下效果。 法二:工具栏搜索&#xff…

linux和C++中的 线程同步与线程安全 对比

线程同步与线程安全 线程进程与线程的区别并发和并行的区别linux线程常用接口函数函数定义函数使用 多线程理解 线程同步五个线程同时启动&#xff0c;每一个循环打印3次五个线程&#xff0c;每一个循环1000 结果是<5000代码和测试结果测试结果分析可以用信号量和互斥锁解决…

C语言标准定义的32个关键字

欢迎关注博主 Mindtechnist 或加入【智能科技社区】一起学习和分享Linux、C、C、Python、Matlab&#xff0c;机器人运动控制、多机器人协作&#xff0c;智能优化算法&#xff0c;滤波估计、多传感器信息融合&#xff0c;机器学习&#xff0c;人工智能等相关领域的知识和技术。 …

PyTorch搭建神经网络

PyTorch版本&#xff1a;1.12.1PyTorch官方文档PyTorch中文文档 PyTorch中搭建并训练一个神经网络分为以下几步&#xff1a; 定义神经网络定义损失函数以及优化器训练&#xff1a;反向传播、梯度下降 下面以LeNet-5为例&#xff0c;搭建一个卷积神经网络用于手写数字识别。 …

日志分析和流量分析

目录 [陇剑杯 2021]日志分析&#xff08;问1&#xff09; [陇剑杯 2021]日志分析&#xff08;问2&#xff09; [陇剑杯 2021]日志分析&#xff08;问3&#xff09; [陇剑杯 2021]简单日志分析&#xff08;问1&#xff09; [陇剑杯 2021]简单日志分析&#xff08;问3&#…