Page 1 of 1

Script node - unmanaged dependencies of a reference

Posted: 31 Jul 2013, 11:11
by craig
I'm trying to prove a little demo using the Leap Motion controller. This isn't a Leap specific question, otherwise I would have tagged it onto one of the other threads. :)

I've added the .NET 3.5 dll to the GAC, and referenced it from my Ventuz script. My implementation is sound, as it works in Visual Studio. But, the error I get is "The type initializer for ‘Leap.LeapPINVOKE’ threw an exception". I googled this first - in case it was anything obvious, and it appears that you have to copy the unmanaged libraries into the same directory as the executable for the application. I've proved this with Visual Studio - I get the same error until I copy the dependencies into the \bin\debug folder. (http://bit.ly/1cdacNa)

So - my question is, where is the equivalent folder for a compiled ventuz script node? I thought it would be C:\Users\....\AppData\Local\Temp, as when I debug from Visual Studio it tells me that this is where the DLL resides. I still get the same error when I drop the unmanaged dependencies into that folder.

Any clues?

Cheers,
Craig.

Re: Script node - unmanaged dependencies of a reference

Posted: 31 Jul 2013, 11:24
by craig
I think I've just found the solution - the \appdata\local\temp directory does appear to be correct I think. I was running as Administrator too in case there was a credentials issue accessing that folder.

Restarting Ventuz as a standard user seems to have fixed it for me. :)

Re: Script node - unmanaged dependencies of a reference

Posted: 08 Aug 2013, 07:32
by allen hyoga
Hi CRAIQ,
You meant the path "C:\Users\....\AppData\Local\Temp" is same like the debug folder for VS ?Could you describe more about this ?
I met a same problem like you said.I solved in VS,however It failed in ventuz. I have copied all the related unmanaged dll to the folder and ventuz gave a error said Leap.LeapPINVOKE exception...

Thanks.

Regards
Allen