Open forderud opened 8 years ago
Possible solution: https://github.com/forderud/public/tree/master/nonwin-com . It satisfies all the desired properties, except for out-of-process marshaling.
Hi Fredrik, everyone, I'm also concerned about (unhappy with?) the Windows only COM based interface. I'd prefer using a C style interface with primitive types that can be loaded (in-process) dynamically. The reason for this is that it seems to have the most universal support among platforms and languages (e.g. .NET PInvoke, Python ctypes). What do you think? Any general concerns before starting to look into it?
Best, Thomas
@TheHubbit If you take a look at the TestPython
and TestViewer
sample projects, then you'll see that Image3dAPI already support interoperability against .NET and Python. This works out-of-the-box, without the need for maintaining any language wrappers.
Some nice properties when accessing COM interfaces from "managed" languages like .NET and Pyton:
HRESULT
error-codes are automatically translated to exceptions.[retval]
method arguments are automatically translated to return-values.Thanks for getting back and pointing to the TestPython and TestViewer examples! I looked at the example and agree with the benefits of COM you’ve highlighted. The reason I brought up C style interfaces was in the context of cross platform support, namely not being restricted to Windows operating system.
Image3dAPI is currently Windows-only. This might become a problem.
TASK:
DESIRED PROPERTIES: