© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
24 replies
Demonik

Crossplatform VarArg PInvoke

What's the current correct way to declare PInvoke C library function with vararg parameters that works on at least Mac, Windows, Android and Linux? I know the actual maximum number of parameters so I don't care if I have to write multiple functions, what I'm interested in is if it will work correctly on all platforms.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Interoperability issues (PInvoke)
C#CC# / help
4y ago
PInvoke.GetRawInputData returns -1
C#CC# / help
7mo ago
❔ Crossplatform disk formatting code
C#CC# / help
3y ago
✅ CsWin32 not generating PInvoke for GetThreadContext
C#CC# / help
9mo ago