I'm having trouble with a DLL call in my script too, however mine was made in VB6.
I made a test DLL with this function:
code:
Public Function Test() As String
Test = "hello"
End Function
...and my script code is:
code:
function OnEvent_Initialize(MessengerStart)
{
Debug.Trace(Interop.Call(MsgPlus.ScriptFilesPath + "\\Project1.dll", "Test"));
}
However, I keep getting this error:
code:
Script is now loaded and ready
Function called: OnEvent_Initialize
Interop.Call failed to locate function "Test"
Error: unknown.
Line: 4. Code: -2147467259.
Function OnEvent_Initialize returned an error. Code: -2147352567
Any ideas what I am doing wrong? Thanks
EDIT: I've tried Interop.Call2 as well, but no luck!