Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Use userData in DLL ??

0 votes
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?
asked Jul 17 by lich365net (12 points)

1 Answer

0 votes
The userData pointer is local to each DLL instance and cannot be passed between DLL blocks as you are intending.  Please see this forum post for a more detailed explanation:

If you would like to use the userData pointer to pass data between time-steps within a DLL, a simple example is included in answer to this forum question:
answered Jul 19 by Bryan Lieblick (767 points)