Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The audience for this section includes programmers who use platform invoke, COM interop, or both to marshal data. Certain marshaling rules and default data types differ between the two mechanisms:
Interop marshaling governs how data is passed in method arguments and return values between managed and unmanaged memory during calls. Interop marshaling is a run-time activity performed by the common language runtime's marshaling service.
This section provides an overview of the interop marshaling service and presents detailed information about how data types that have different or ambiguous representations in unmanaged memory are marshaled. It also describes how to apply the MarshalAsAttribute attribute and use methods exposed by the Marshal class to alter the default marshaling behavior.
Please sign in to use this experience.
Sign in