Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Runtime.​InteropServices.​ICustomMarshaler
Assembly: System.Runtime.InteropServices
Provides custom wrappers for handling method calls.
Methods
public
void
CleanUpManagedData​(object ManagedObj)
ManagedObj
The managed object to be destroyed.
Performs necessary cleanup of the managed data when it is no longer needed.
public
void
CleanUpNativeData​(nint pNativeData)
pNativeData
A pointer to the unmanaged data to be destroyed.
Performs necessary cleanup of the unmanaged data when it is no longer needed.
public
int
GetNativeDataSize​() Returns The size, in bytes, of the native data.
Returns the size of the native data to be marshaled.
public
nint
MarshalManagedToNative​(object ManagedObj)
ManagedObj
The managed object to be converted.
Returns A pointer to the COM view of the managed object.
Converts the managed data to unmanaged data.
public
object
MarshalNativeToManaged​(nint pNativeData)
pNativeData
A pointer to the unmanaged data to be wrapped.
Returns An object that represents the managed view of the COM data.
Converts the unmanaged data to managed data.