Having a separate helper assembly containing only P/Invoke declarations for legacy 3rd party components, I wonder which of these two ways is The Better One™ if the assembly must be marked CLS compliant:
- Use
Int32
in a public P/Invoke declaration where the unmanaged declaration hasunsigned int
. - Use
UInt32
in an internal P/Invoke declaration where the unmanaged declaration hasunsigned int
, and wrap it in a public method that takes anInt32
and converts it toUInt32
when calling the internal method.
What are the up- and downsides of these?