GetDelegateForFunctionPointer()

Marshal::GetDelegateForFunctionPointer(IntPtr) method

Converts an unmanaged function pointer to a delegate of a specified type.

template<typename TDelegate> static TDelegate System::Runtime::InteropServices::Marshal::GetDelegateForFunctionPointer(IntPtr ptr)

Template parameters

ParameterDescription
TDelegateThe type of the delegate to return.

Arguments

ParameterTypeDescription
ptrIntPtrThe unmanaged function pointer to convert.

Return Value

A instance of the specified delegate type.

Remarks

An rough stub for future implementation

See Also