I have a sample code from MSDN that I am trying to adapt for use, but the VBA compiler rejects the contents of the angle brackets < > . I have the following code in a module:
Imports System Imports System.Runtime.InteropServices <DllImport("../../insert_dll_name_here.dll", CallingConvention:=CallingConvention.Cdecl)> _ Public Function Test(file() As String) As Integer End Function
I am trying to use this code to call a simple function from a C ++ dll that expects an array of strings, but I get a compilation error "expected line number or label or operator or end of instruction" and cannot find the menu help intended to be used. I tried the square brackets [ ] in case this is a VBA version issue to no avail. Can anyone point out my mistake in using COM interoperability services.
c ++ vba com
Oohay
source share