Using Marvelmind in C#

Frequent questions asked online, offline, in forums are answered here
Post Reply
ImBadatCoding
Posts: 1
Joined: Tue Mar 06, 2018 11:15 pm

Using Marvelmind in C#

Post by ImBadatCoding »

Hello,

I have legacy code and I am required to call the marvel mind functions in C#. A couple of things I have tried are using the P\invoke commands to make a DLL to pass the coordinates between. I am having an issue with this because of lack of experience with P\invoke and do not know how to pass the marvel mind structure across the two languages.

Another solution I have seen is to write a serial reader for C#. Though, I do not understand the output values. I have zero experience with this, so anything is appreciated.

Thanks for Any Help.

smoker77
Posts: 327
Joined: Sat Feb 06, 2016 4:03 pm

Re: Using Marvelmind in C#

Post by smoker77 »

Hello,
I'm not familiar with C#, but I think more simple way is to use Marvelmind C library as dll from C# code.
You will need add some changes (export functions) to the example to compile it as dll library.
Here is example of using dll from C project in C#:
https://www.codeproject.com/Articles/98 ... n-use-it-w
Here is example of exporting complex data structures from C dll to C#:
https://social.msdn.microsoft.com/Forum ... arpgeneral
Hope this will help.

Post Reply