I’m going to pass some complex customed data from one dll to another by using customed struct type, and I found a pointer called userData. There doesn’t exist much documentation about how to use it. So, anyone can help me or give some example code?
I can provide an example, but the userData pointer is local to each DLL instance and cannot be passed between DLL blocks as you are intending. The value of the userData pointer would be to retain data internal to each DLL between successive calls. The userData pointer should be used in place of global variables within a DLL.
If the pointer was passed between DLLs, the same issues that arise using globals in C scripts would occur (https://forum.plexim.com/3971/how-to-share-global-variable-in-different-c-script).
The best path forward is to create one DLL which integrates all your code or pass vectorized signals between DLL outputs and inputs.
Happy to provide more detailed information if you believe the userData functionality will be helpful in the common DLL approach.