📜  vba 声明 api 64 位 32 位 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:54.784000             🧑  作者: Mango

代码示例1
' At the top of your module: works for both 32 and 64 bits
#If VBA7 Then
Public Declare PtrSafe Function GetVersionExA _            ' 64 bits
        Lib "kernel32" (lpVersionInformation As OSVERSIONINFO) As Integer
#Else
  Public Declare Function GetVersionExA _                ' 32 bits
        Lib "kernel32" (lpVersionInformation As OSVERSIONINFO) As Integer
#End If