Referencing 32bit dll for a GrassHopper component on x64 Win system

OK, .NET magic again.

I need some dll’s for my GH component, but one of the dlls compiles only as x86 in VS. But when I turn from x64 to 32 bit in VS the final GH component doesn’t show up in the GrassHopper ribbon (I use Win10 x64 and Rhino5 x64).

Shouldn’t x64 bit systems be able to run 32 bit binaries?

// Rolf

Hi Rolf

the answer is no, a 64-bit process can only load 64-bit assemblies (or “Any CPU” assemblies). Not 32-bit ones. On most 64-bit Windows, you can run 32-bit processes but they are run in a different “space”.

So I’m out of luck with 32 bit dll’s then? I was trying to connect to the MeshMixer API

// Rolf

Hm, seems like a choice between colera, colera and not possible.

COM objects works fine but deployment can become a nightmare. Rewriting the dll for x64 isn’t possible without the sources, and a 32 bit version of the app won’t run in Rhino/GH x64.

And I’m new to .NET.

// Rolf

You always could write a wrapper app that publishes an API either through a (named) pipe or on top of a protocol like UDP or TCP or HTTP

Probably the best thing to do is contact the author of that project to see if you can get a 64 bit version.

I will definitely drop him a mail.

It surpasses my current “technological level” to wrap this, and I’m running out of time. But I will wrap some other tools in the meantime.

I have compared a bunsh of mesh tools and I have found out that MeshMixer produces remarkable good mesh quality with only a few simple and useful commands, so it would be a very valuable component to have in GH.

// Rolf