C# - Custom Data Types and External Libraries

I see that the dynamic plugin tutorials are yet to be finished (look forward to that, please):

dynamic plugin tutorials

Meanwhile, can someone please illuminate me on:

  • 10 - Working with your own Data Type
  • 12 - Working with External Libraries

Thank you!

i agree with d723lld.

in particuliar i would really like to see something about talking with external dlls tutorial. ;-)

I think i can write one, but i’m busy until the end of august.

  1. You can create any custom data type and input||output it from your plugins. For example, for particle engine you can easily create Particle data type, that will handle speed and position and allow you to send all of this params from one pin.

  2. Working with another libraries is simple - just add any managed dll to you dynamic plugin project in ProjectExplorer. After this you will be allowed to use any public classes from it.

Hi alg, in fact until now i didnt take time to explore csharp. Whitecat project is taking all my free time of developpment.

But i have possibility to write and test because i have the hardware and experience about dmx devices and other little things i can contribute. I would like to.
No matter about time and schehulde.

My main problem is: i want to use only sharp developp ( not being a visual c++ boy with knowledge of VS and its different versions - free - not free - working - not working -, i m mingw32 ). So basic tutorial with it would be definitively great.

I dont have too much time to battle with external callings to dlls.
Each time i tried was a day or two.
If you could or anybody provide a canvas for sharp developp talking with dlls that would be really great and maybe help me break my personnal wall with c#.

especially this kind of code:

extern "C" 
typedef int (CALLBACK *LPFN_OPEN_USB)(void);
typedef int (CALLBACK *LPFN_SEND_USB)(unsigned char *data);
typedef int (CALLBACK *LPFN_CLOSE_USB)(void);
typedef int (CALLBACK  *LPFN_OPEN_IN_USB)(void);
typedef int (CALLBACK  *LPFN_RECEIVE_USB)(unsigned char *data);
typedef int (CALLBACK  *LPFN_CLOSE_IN_USB)(void);

and getproc adress structures

hDLL = LoadLibrary(USB_DLL) ;
if (hDLL !=NULL)

Other thing would be an example on how to deal with enums wich is hardware question problematic

Voila! i know this is a lot. ;-)

you are totally right. until we get time for that however i uploaded some uncommented demo code, hat may help you a bit: code-of-node10-advanced-plugin-coding-topics-and-patterns-workshop

nice, thanks for sharing

Indeed, thanks. That’s a start. Look forward to some docs.