我有一个要在 VBA 中使用的 64 位 DLL。VB.net 中的示例在 VBA 中不起作用,因为 Int32 不是已知的 VBA 数据类型。是否有可能在 VBA 中使用它?如果是这样,我是否必须编写自己的课程?我包括了这个例子的几行。谢谢你。
Imports System Imports System.Runtime.InteropServices Friend Class LinkVCMOWRAP Declare Function wcmo_init Lib "vcmowr64.dll" ( _ <MarshalAs(UnmanagedType.AnsiBStr), [In]()> ByRef WCMOarg_Handle As String, _ <MarshalAs(UnmanagedType.AnsiBStr), [In]()> ByRef WCMOarg_User As String, _ <Out()> ByRef IntPtr_DataOut As IntPtr, _ <Out()> ByRef IntPtr_ErrOut As IntPtr) _ As Int32