© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
33 replies
Vasoli

Marshalling bool

In my C++ file I have method which have Bool parameter. For Linux I need to have UnmanagedType.VariantBool marshaller and for windows (for some reason) UnmanagedType.Bool.

Is there a way to make custom marshaller what will just select and call any of those 2 marshallers based on RuntimeInformation.IsOSPlatform?
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

Strange Marshalling issue
C#CC# / help
2y ago
How does marshalling work?
C#CC# / help
5mo ago
Help with LibraryImport and custom marshalling
C#CC# / help
2y ago
Private bool gets changed
C#CC# / help
11mo ago