64位Office API声明语句第118讲

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

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

a5fc523436c76bdef5a5a5cfcf16c53e.jpeg

【分享成果,随喜正能量】 人不能因为一件好事,高兴一整年,却能因为一个创伤,郁郁终生。痛苦给人的刺激,总是远远大于快乐。成年人的烦恼,和谁说都不合适,悲喜自渡,他人难悟。人最强大的时候,不是坚持,而是放下。这一生,各有各的渡口,努力努力,众生自渡。。

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

028d3c1b925586860385b1b970dd2f27.jpeg

Declare PtrSafe Function EnumResourceTypes Lib "kernel32" Alias "EnumResourceTypesA" (ByVal hModule As LongPtr, ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function FreeEnvironmentStrings Lib "kernel32" Alias "FreeEnvironmentStringsA" (ByVal lpsz As String) As Long

Declare PtrSafe Sub FreeLibraryAndExitThread Lib "kernel32" Alias "FreeLibraryAndExitThread" (ByVal hLibModule As LongPtr, ByVal dwExitCode As Long)

Declare PtrSafe Function FreeResource Lib "kernel32" Alias "FreeResource" (ByVal hResData As LongPtr) As Long

Declare PtrSafe Function GetCommConfig Lib "kernel32" Alias "GetCommConfig" (ByVal hCommDev As LongPtr, lpCC As COMMCONFIG, lpdwSize As Long) As Long

Declare PtrSafe Function GetCompressedFileSize Lib "kernel32" Alias "GetCompressedFileSizeA" (ByVal lpFileName As String, lpFileSizeHigh As Long) As Long

Declare PtrSafe Function GetDefaultCommConfig Lib "kernel32" Alias "GetDefaultCommConfigA" (ByVal lpszName As String, lpCC As COMMCONFIG, lpdwSize As Long) As Long

Declare PtrSafe Function GetHandleInformation Lib "kernel32" Alias "GetHandleInformation" (ByVal hObject As LongPtr, lpdwFlags As Long) As Long

Declare PtrSafe Function GetProcessHeaps Lib "kernel32" Alias "GetProcessHeaps" (ByVal NumberOfHeaps As Long, ProcessHeaps As LongPtr) As Long

Declare PtrSafe Function GetProcessWorkingSetSize Lib "kernel32" Alias "GetProcessWorkingSetSize" (ByVal hProcess As LongPtr, lpMinimumWorkingSetSize As LongPtr, lpMaximumWorkingSetSize As LongPtr) As Long

Declare PtrSafe Function GetQueuedCompletionStatus Lib "kernel32" Alias "GetQueuedCompletionStatus" (ByVal CompletionPort As LongPtr, lpNumberOfBytesTransferred As Long, lpCompletionKey As LongPtr, lpOverlapped As LongPtr, ByVal dwMilliseconds As Long) As Long

Declare PtrSafe Function GetSystemTimeAdjustment Lib "kernel32" Alias "GetSystemTimeAdjustment" (lpTimeAdjustment As Long, lpTimeIncrement As Long, lpTimeAdjustmentDisabled As Long) As Long

Declare PtrSafe Function GlobalCompact Lib "kernel32" Alias "GlobalCompact" (ByVal dwMinFree As Long) As LongPtr

Declare PtrSafe Sub GlobalFix Lib "kernel32" Alias "GlobalFix" (ByVal hMem As LongPtr)

Declare PtrSafe Sub GlobalUnfix Lib "kernel32" Alias "GlobalUnfix" (ByVal hMem As LongPtr)

Declare PtrSafe Function GlobalWire Lib "kernel32" Alias "GlobalWire" (ByVal hMem As LongPtr) As LongPtr

Declare PtrSafe Function GlobalUnWire Lib "kernel32" Alias "GlobalUnWire" (ByVal hMem As LongPtr) As Long

Declare PtrSafe Function IsBadCodePtr Lib "kernel32" Alias "IsBadCodePtr" (ByVal lpfn As LongPtr) As Long

Declare PtrSafe Function LocalCompact Lib "kernel32" Alias "LocalCompact" (ByVal uMinFree As Long) As LongPtr

Declare PtrSafe Function LocalShrink Lib "kernel32" Alias "LocalShrink" (ByVal hMem As LongPtr, ByVal cbNewSize As Long) As LongPtr

Declare PtrSafe Sub ZeroMemory Lib "KERNEL32" Alias "RtlZeroMemory" (dest As Any, ByVal numBytes As LongPtr)

Declare PtrSafe Function ReadFileEx Lib "kernel32" Alias "ReadFileEx" (ByVal hFile As LongPtr, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpOverlapped As OVERLAPPED, ByVal lpCompletionRoutine As LongPtr) As Long

Declare PtrSafe Function SetCommConfig Lib "kernel32" Alias "SetCommConfig" (ByVal hCommDev As LongPtr, lpCC As COMMCONFIG, ByVal dwSize As Long) As Long

Declare PtrSafe Function SetDefaultCommConfig Lib "kernel32" Alias "SetDefaultCommConfigA" (ByVal lpszName As String, lpCC As COMMCONFIG, ByVal dwSize As Long) As Long

Declare PtrSafe Sub SetFileApisToANSI Lib "kernel32" Alias "SetFileApisToANSI" ()

Declare PtrSafe Function SetHandleInformation Lib "kernel32" Alias "SetHandleInformation" (ByVal hObject As LongPtr, ByVal dwMask As Long, ByVal dwFlags As Long) As Long

Declare PtrSafe Function SetProcessWorkingSetSize Lib "kernel32" Alias "SetProcessWorkingSetSize" (ByVal hProcess As LongPtr, ByVal dwMinimumWorkingSetSize As LongPtr, ByVal dwMaximumWorkingSetSize As LongPtr) As Long

Declare PtrSafe Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As LongPtr

Declare PtrSafe Function lstrcpyn Lib "kernel32" Alias "lstrcpynA" (ByVal lpString1 As String, ByVal lpString2 As String, ByVal iMaxLength As Long) As LongPtr

Declare PtrSafe Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, ByVal lpString2 As String) As LongPtr

Declare PtrSafe Function SetSystemTimeAdjustment Lib "kernel32" Alias "SetSystemTimeAdjustment" (ByVal dwTimeAdjustment As Long, ByVal bTimeAdjustmentDisabled As Long) As Long

Declare PtrSafe Function SetThreadAffinityMask Lib "kernel32" Alias "SetThreadAffinityMask" (ByVal hThread As LongPtr, ByVal dwThreadAffinityMask As LongPtr) As LongPtr

Declare PtrSafe Function SetUnhandledExceptionFilter Lib "kernel32" Alias "SetUnhandledExceptionFilter" (ByVal lpTopLevelExceptionFilter As LongPtr) As LongPtr

Declare PtrSafe Function SystemTimeToTzSpecificLocalTime Lib "kernel32" Alias "SystemTimeToTzSpecificLocalTime" (lpTimeZoneInformation As TIME_ZONE_INFORMATION, lpUniversalTime As SYSTEMTIME, lpLocalTime As SYSTEMTIME) As Long

Declare PtrSafe Function WriteFileEx Lib "kernel32" Alias "WriteFileEx" (ByVal hFile As LongPtr, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpOverlapped As OVERLAPPED, ByVal lpCompletionRoutine As LongPtr) As Long

Type PIXELFORMATDESCRIPTOR

nSize As Integer

nVersion As Integer

dwFlags As Long

iPixelType As Byte

cColorBits As Byte

cRedBits As Byte

cRedShift As Byte

cGreenBits As Byte

cGreenShift As Byte

cBlueBits As Byte

cBlueShift As Byte

cAlphaBits As Byte

cAlphaShift As Byte

cAccumBits As Byte

cAccumRedBits As Byte

cAccumGreenBits As Byte

cAccumBlueBits As Byte

cAccumAlphaBits As Byte

cDepthBits As Byte

cStencilBits As Byte

cAuxBuffers As Byte

iLayerType As Byte

bReserved As Byte

dwLayerMask As Long

dwVisibleMask As Long

dwDamageMask As Long

End Type

Declare PtrSafe Function ChoosePixelFormat Lib "gdi32" Alias "ChoosePixelFormat" (ByVal hDC As LongPtr, pPixelFormatDescriptor As PIXELFORMATDESCRIPTOR) As Long

Declare PtrSafe Function CreateDIBSection Lib "gdi32" Alias "CreateDIBSection" (ByVal hDC As LongPtr, pBitmapInfo As BITMAPINFO, ByVal un As Long, ByVal lplpVoid As LongPtr, ByVal handle As LongPtr, ByVal dw As Long) As LongPtr

Declare PtrSafe Function DescribePixelFormat Lib "gdi32" Alias "DescribePixelFormat" (ByVal hDC As LongPtr, ByVal n As Long, ByVal un As Long, lpPixelFormatDescriptor As PIXELFORMATDESCRIPTOR) As Long

Declare PtrSafe Function EnumFonts Lib "gdi32" Alias "EnumFontsA" (ByVal hDC As LongPtr, ByVal lpsz As String, ByVal lpFontEnumProc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumMetaFile Lib "gdi32" Alias "EnumMetaFile" (ByVal hDC As LongPtr, ByVal hMetafile As LongPtr, ByVal lpMFEnumProc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumObjects Lib "gdi32" Alias "EnumObjects" (ByVal hDC As LongPtr, ByVal n As Long, ByVal lpGOBJEnumProc As LongPtr, lpVoid As Any) As Long

e8eb8620eb6b4e216c59f6c1ddeb2365.jpeg

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

a88762b950d2a7d4fd0dbba1abdd69fe.jpeg


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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

文件夹加密软件哪个好?文件夹加密软件排行榜

许多人给小编说,我们公司想实现文件私自发出呈乱码状态,这说明公司逐渐认识到文件加密的重要性。 目前,加密软件已经广泛应用于企业办公、商业贸易、个人应用等多个领域,成为保护数据安全和隐私的重要手段。 为了保护企业机密&am…

【driver2】设备读写,同步和互斥,ioctl,进程休眠,时间和延时,延缓

文章目录 1.实现设备读写:write函数中一个进程写没问题,两进程写:第一个进程运行到kzalloc时,第二个进程也执行了kzalloc,只第二个进程地址保存在c中,第一个进程分配内存空间地址丢失造成内存泄漏。第一个进…

sqlalchemy 分表实现方案

1.需求及场景概述 现有系统中因历史数据量过大,产生了将历史数据进行按月存储的要求,系统和数据库交互使用的是sqlalchemy,假设系统的原来的历史记录表(record)如下: 为了将历史数据按月分表存储,我们需要以此表为基础按月创建对应的月表来进行分表存储,同时又要使用or…

学华为沟通,汇总5大项目沟通技巧

高效沟通在项目管理中的重要性不容小觑,它是确保项目顺利进行、提升团队协作效率、实现项目目标的关键因素。如果沟通不畅,往往容易导致成员对项目目标理解不一致,或信息传递不及时不准确,导致项目工作方向偏差,增加项…

前端工程化05-初始前端工程化Node基本介绍安装配置基础知识

6、初始前端工程化 6.1、工程化概述 虽然前几篇我的目录标题写的前端工程化,但是那些东西并不属于前端工程化的内容,更倾向于是js、jq当中的东西,下面我们将接触真正的前端工程化。 前端工程化开发其实现在是离不开一个东西的,…

Matlab 手写板设计

1、介绍 MATLAB手写板可以作为一个很好的数据输入口,其可以获取该手写板上任意字母、数字,甚至可以制作样本数据。具体用途体现在如下几方面: 数学公式输入:手写板允许用户直接用手写方式输入复杂的数学公式,这对于使…

电子书制作神器,简单操作

​随着数字化时代的到来,电子书籍越来越受到人们的喜爱。而一款优秀的电子翻页书制作软件,则能够帮助你轻松制作出专业级的电子书,让你的阅读体验更加丰富多彩。 今天,我们就来为大家推荐一款优秀的电子翻页书制作软件——FLBOOK在…

Burp和Proxifier抓包微信小程序

1、Burp设置代理 2、浏览器下载证书 3、安装证书 4、Proxifier设置代理 5、Proxifier设置Proxification Rule 6、Burp查看抓包数据 打开一个小程序,可以看到WeChatAppEx的流量先经过Proxifier,再经过127.0.0.1:8080到Burp

如何使用ArcGIS Pro进行选房分析

无论是研究城市规划布局还是寻找理想的住房,都需要综合考虑购物、医疗、教育和休闲等多方面因素,此时我们的GIS软件就可以派上用场了,这里为大家介绍一下如何使用 ArcGIS Pro 进行选房分析,希望能对你有所帮助。 数据来源 教程所…

性能优化 | el-table中内嵌大量el-input控件导致渲染卡顿的问题

场景 项目中有一个应用场景,用户需要在表单中大量使用选择框以及输入框填写数据(每一行大概有三十几个输入框),当选择框与输入框达到一定数量的时候,页面会出现输入不连续、卡顿的现象,如下图:…

LoRa无线通讯入门

本文图片来自于深入浅出讲解LoRa通信技术,LoRa技术介绍,LoRa开发与应用,物联网学习必备知识点!_哔哩哔哩_bilibili LoRa无线通讯 LoRa(Long Range)是一种低功耗广域网(LPWAN)技术&a…

【春招特供】Unity面试题总结 | Unity基础篇

物体发生碰撞的必要条件? 两个物体都必须带有碰撞器(Collider),其中一个物体还必须带有Rigidbody刚体,而且必须是运动的物体带有Rigidbody脚本才能检测到碰撞。 2. Unity3d中的碰撞器和触发器的区别? 碰…

颠覆传统?「一束光子,两种频率」的量子纠缠!

在最新的研究中,科学家们开发了一种革命性的量子纠缠方式——“频域光子数路纠缠”(frequency-domain photon number-path entanglement)。这一量子物理学的重大进展涉及到一个创新性的工具:频率分束器(frequency beam…

B2985A是德科技B2985A高阻计

181/2461/8938产品概述: B2985A 静电计/高阻表 描述 B2985A 静电计/高阻表是全球少有具有图形显示功能的静电计,可凭借 0.01 fA(0.01 x 10-15 A)的分辨率帮助您可靠测量弱电流,并可测量高达 10 PΩ(10 x 1…

[leetcode] 62. 不同路径

文章目录 题目描述解题方法方法一:动态规划java代码复杂度分析 方法二:排列组合java代码复杂度分析 相似题目 题目描述 一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为 “Start” )。 机器人每次只能向下或者向右…

毕业设计:《基于 Prometheus 和 ELK 的基础平台监控系统设计与实现》

前言 《基于 Prometheus 和 ELK 的基础平台监控系统设计与实现》,这是我在本科阶段的毕业设计,通过引入 Prometheus 和 ELK 架构实现企业对指标与日志的全方位监控。并且基于云原生,使用容器化持续集成部署的开发方式,通过 Sprin…

开源模型应用落地-CodeQwen模型小试-SQL专家测试(二)

一、前言 代码专家模型是基于人工智能的先进技术,它能够自动分析和理解大量的代码库,并从中学习常见的编码模式和最佳实践。这种模型可以提供准确而高效的代码建议,帮助开发人员在编写代码时避免常见的错误和陷阱。 通过学习代码专家模型&…

使用Bandzip分卷压缩文件

需求 部分文件太大,例如超过10G,就不能使用企业微信等传输,如果可以把一个10G的文件分割成为10个1G的文件就可以方便传输了。 实现方式 使用bandzip,把超过10G的文件分卷压缩成为多个小的zip文件。 把生成的多个文件放在同一目…

网红隋总揭秘:高效实施人力RPO项目的秘诀

随着企业对于招聘流程效率和专业性的追求日益提升,RPO(招聘流程外包)项目逐渐成为人力资源领域的热门话题。隋总凭借丰富的行业经验和独特的视角,分享了关于如何高效实施人力RPO项目的秘诀。 一、明确目标,找准定位 在启动RPO项目之前&#x…

零基础入门篇④ 初识Python(注释、编码规范、关键字...)

Python从入门到精通系列专栏面向零基础以及需要进阶的读者倾心打造,9.9元订阅即可享受付费专栏权益,一个专栏带你吃透Python,专栏分为零基础入门篇、模块篇、网络爬虫篇、Web开发篇、办公自动化篇、数据分析篇…学习不断,持续更新,火热订阅中🔥专栏订阅地址 👉Python从…