Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CsScript loading DLL throws error
#1
Hi -

I can run the example CsScript programs just fine. But when I attempt to load a DLL that I believe is a x86 DLL on a 64 bit machine under Windows 7 I get the following error:

Quote:Error (RT) in LeapMotion: 0x80131600,
(0,0): error CS0009: Metadata file 'c:\Program Files (x86)\Quick Macros 2\Leap.dll' could not be opened -- 'An attempt was made to load a program with an incorrect format. '.

The QuickMacros code starts like this:
Code:
Copy      Help
CsScript x.AddCode("")
x.SetOptions("references=System.Data;System.Threading;Leap;")
IDispatch o=x.CreateObject("SampleListener")


#ret
//C# code
using System;
using System.Threading;
using Leap;
In the CsScript documentation it claims that this could happen if you're trying to load an x64 dll
http://csscript.net/help/vista.html
and their fix is to compile as an external application. I don't want to do this because the library is going to be feeding user gestures from the LeapMotion sensor into QuickMacros and I don't want the latency.

The only alternative I can think of is to make a COM interface that glues everthing together. Is there a simpler way?

Thanks

Sean


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)