Calling conventions and thread safeness

Post your LabVIEW discussions here
Post Reply
Posts: 0
Joined: Wed Oct 16, 2019 6:22 am

Calling conventions and thread safeness

Post by silmaril »

could you please clarify, which is the correct calling convention for ps5000a.dll and ps5000aWrap.dll?
From the include files I think it should be stdcall, but I am unsure because the documentation only mentions cdecl (at least for Linux and macOS). Is this different for Windows?

My own software seems to work using cdecl, but I see the official LabVIEW examples are using stdcall - I hope you can solve this once and for all :D

My second question: are alle the functions in those DLLs thread safe?
In LabVIEW terms this means, I can (and should) use "Run in any thread".
For functions that are not thread-safe, I should use "Run in UI thread".
The latter would be the safe option for all use cases, but it would also reduce the performance if used without need.

Thank you very much for your help!

Post Reply