algorithmic modeling for Rhino
I've created a GH component that call a method in an unmanaged 32 bits dll :
[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport("MetaCalc.dll")]
public static extern unsafe void CalculateVertexValues(...);
When I run the component in Grasshopper I have a message "trying to load a program with incorrect format" (HRESULT = 0x8007000B).
In Visual Studio 2010 project build is set to x86 only, so I don't think it's a 32/64 bits problem (I use Grasshopper 0.9.0014 with Rhino 5.0 beta x64 on Windows 7)
I tried to use the same method in a C# executable, it runs flawlessly...
Thanks in advance for your help !
Tags:
Some news...
My component runs fine with Rhino 4.0 SR 9, so it seems that Grasshopper 0.9.0014 is compiled for both x86 and x64 but a 32 bits component can't call a 32 bits unmanaged dll in Rhino 5.0 x64.
I can't recompile my dll to x64, is there some code option in C# to define that you want to call a 32 bits method ?
Hi Olivier,
The operating system won't let you call native 32bit DLLs from a 64bit process. You need to either figure out how to compile your DLL to 64bit or run the 32bit version of Rhino 5.
-Steve
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by