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


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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

力扣295. 数据流的中位数

Problem: 295. 数据流的中位数 文章目录 题目描述思路复杂度Code 题目描述 思路 1.定义一个大顶堆和小顶堆; 2.当添加的数据小于大顶堆的堆顶元素或者大顶堆为空时,将元素添加到大顶堆;当元素大于大顶堆堆顶元素时添加到小顶堆;同…

18 如何设计微服务才能防止宕机?

在上一讲里,介绍了构建一个稳健的微服务的具体法则:防备上游、做好自己、怀疑下游, 并介绍了为什么要防备上游,以及一些防备上游的具体手段。 在本讲里,咱们一起来学习,做好微服务自身的设计和代码编写的常…

Android4.4真机移植过程笔记(一)

1、RK源码编译 获取内核源码: git clone git172.28.1.172:rk3188_kernel -b xtc_ok1000 内核编译环境: 从172.28.1.132编译服务器的/data1/ZouZhiPing目录下拷贝toolchain.tar.gz(交叉编译工具链)并解压到与rk3188_kernel同级目…

【项目部署】手把手带你从零部署项目:宝塔 + uwsgi + Django + 腾讯云 + Websocket

1. 前言 哈喽,大家好,我是jiaoxingk。今天带来的是有关Django项目部署的教程。 当我们完成了一个项目作品之后,我们肯定会迫不及待的就准备上线部署啦, 这篇教程将带你从服务器的配置选购,再通过安装宝塔的形式进行项目…

QT程序通过GPIB-USB-HS转接线控制数字万用表

1、硬件准备 1.1、数字万用表 型号 :Agilent 34401A 前面图示: 后面图示:有GPIB接口 1.2、GPIB-USB-HS转接线 2、GPIB协议基础了解 2.1、引脚 8条数据线:DIO1 ~ DIO8 5条管理线:IFC、ATN、REN、EOI、SRQ 3条交握线…

拆单算法交易(Algorithmic Trading)

TWAP TWAP交易时间加权平均价格Time Weighted Average Price 模型,是把一个母单的数量平均地分配到一个交易时段上。该模型将交易时间进行均匀分割,并在每个分割节点上将拆分的订单进行提交。例如,可以将某个交易日的交易时间平均分为N 段&am…

【云原生】Pod 的生命周期(一)

【云原生】Pod 的生命周期(一)【云原生】Pod 的生命周期(二) Pod 的生命周期(一) 1.Pod 生命期2.Pod 阶段3.容器状态3.1 Waiting (等待)3.2 Running(运行中)3…

鸿蒙内核源码分析(消息队列篇) | 进程间如何异步传递大数据

基本概念 队列又称消息队列,是一种常用于任务间通信的数据结构。队列接收来自任务或中断的不固定长度消息,并根据不同的接口确定传递的消息是否存放在队列空间中。 任务能够从队列里面读取消息,当队列中的消息为空时,挂起读取任务…

Discourse 清理存储空间的方法

Discourse 使用一段时间以后会发现硬盘空间占用非常多。 主要是因为 Docker Image 的问题,如果升级次数越多,空间占用越多。 运行下面的命令: ./launcher cleanup 能够帮助你清理 Discourse 占用的空间。 如下面代码所示: […

牛客热题:单链表排序

📟作者主页:慢热的陕西人 🌴专栏链接:力扣刷题日记 📣欢迎各位大佬👍点赞🔥关注🚓收藏,🍉留言 文章目录 牛客热题:单链表排序题目链接方法一&…

Windows php 安装 Memcached扩展、php缺失 Memcached扩展、Class ‘Memcached‘ not found

在Windows系统下如何安装 php Memcached 扩展 下载dll文件 pecl地址:https://pecl.php.net/package/memcached 根据版本进行选择 : 解压下载的文件后得到了这么样的文件结构: 配置 移动dll文件到相应文件位置 重点: libme…

jdk环境安装

jdk安装 创建软件安装的目录 mkdir -p /bigdata/{soft,server} /bigdata/soft 安装文件的存放目录 /bigdata/server 软件安装的目录 把安装的软件上传到/bigdata/soft 目录 解压到指定目录 -C :指定解压到指定目录 tar -zxvf /bigdata/soft/jdk-8u241-linux-x64.tar.gz -C /b…

【Osek网络管理测试】[TG3_TC3]tSleepRequestMin_L

🙋‍♂️ 【Osek网络管理测试】系列💁‍♂️点击跳转 文章目录 1.环境搭建2.测试目的3.测试步骤4.预期结果5.测试结果 1.环境搭建 硬件:VN1630 软件:CANoe 2.测试目的 验证DUT进入NMLimpHome状态后请求睡眠的最短时间是否正确…

Android --- 消息机制与异步任务

在Android中,只有在UIThread(主线程)中才能直接更新界面, 在Android中,长时间的工作联网都需要在workThread(分线程)中执行 在分线程中获取服务器数据后,需要立即到主线程中去更新UI来显示数据, 所以,如…

NI CRIO 9045 LABVIEW2020

1.labview工程如果要访问CRIO,需要设置以下,否则在项目中连接失败。 2.项目中如果要传文件,需要安装WebDEV 3.使用WebDAV将文件传输到实时(RT)目标 https://knowledge.ni.com/KnowledgeArticleDetails?idkA03q000000YGytCAG&lzh-CN

Mars3d实现用一个button控制一个map.control的显示与隐藏

原生js,想做一个button,控制比如compass的显示与隐藏 点一下显示 再次单击的时候就隐藏掉 写了一个function控制显示隐藏 function addCompass(){ if(compass.showtrue) { compass.showfalse; } else{ compass.showtrue; } } 功能示例(Vue版) | Mars3D三维可视化平台 | 火星…

深入了解C/C++的内存区域划分

🔥个人主页:北辰水墨 🔥专栏:C学习仓 本节我们来讲解C/C的内存区域划分,文末会附加一道题目来检验成果(有参考答案) 一、大体有哪些区域?分别存放什么变量开辟的空间? …

【微服务】网关(详细知识以及登录验证)

微服务网关 网关网关路由快速入门路由属性 路由断言网关登录校验自定义过滤器实现登录校验网关传递用户OpenFeign传递用户 网关 网络的关口,负责请求的路由,转发,身份校验 当我们把一个单体项目分成多个微服务并部署在多台服务器中&#xff…

Redis__数据类型

文章目录 😊 作者:Lion J 💖 主页: https://blog.csdn.net/weixin_69252724 🎉 主题:Redis__数据类型 ⏱️ 创作时间:2024年04月28日 ———————————————— 这里写目录标题 文…

大模型争霸的下一站:不仅是超越GPT-4,更是寻求模型之间的平衡应用

文 | 智能相对论 作者 | 沈浪 知名科学杂志《Nature》发表了一篇关于大模型规模参数大小争议的文章《In Al, is bigger always better?》——AI大模型,越大越好吗?随着大模型应用走向实践,这一问题不可避免地成为了当前AI行业发展的焦点与…