System::Runtime::InteropServices::Marshal::GetDelegateForFunctionPointer method

Marshal::GetDelegateForFunctionPointer 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)
ParameterDescription
TDelegateThe type of the delegate to return.
ParameterTypeDescription
ptrIntPtrThe unmanaged function pointer to convert.

ReturnValue

A instance of the specified delegate type.

Remarks

An rough stub for future implementation

See Also