Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetDelegateForFunctionPointer()

static Delegate System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer ( IntPtr ptr,
Type t )
inlinestatic

Definition at line 1414 of file Marshal.cs.

1415 {
1416 if (ptr == IntPtr.Zero)
1417 {
1418 throw new ArgumentNullException("ptr");
1419 }
1420 if ((object)t == null)
1421 {
1422 throw new ArgumentNullException("t");
1423 }
1424 if (!t.IsRuntimeImplemented())
1425 {
1426 throw new ArgumentException(SR.Argument_MustBeRuntimeType, "t");
1427 }
1428 if (t.IsGenericType)
1429 {
1430 throw new ArgumentException(SR.Argument_NeedNonGenericType, "t");
1431 }
1432 if (t.BaseType != typeof(MulticastDelegate) && t != typeof(MulticastDelegate))
1433 {
1434 throw new ArgumentException(SR.Arg_MustBeDelegate, "t");
1435 }
1437 }
static Delegate GetDelegateForFunctionPointerInternal(IntPtr ptr, Type t)

References System.SR.Arg_MustBeDelegate, System.SR.Argument_MustBeRuntimeType, System.SR.Argument_NeedNonGenericType, System.Type.BaseType, System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointerInternal(), System.Type.IsGenericType, System.Type.IsRuntimeImplemented(), and System.IntPtr.Zero.

Referenced by System.Net.Quic.Implementations.MsQuic.Internal.MsQuicApi.MsQuicApi(), System.Net.Sockets.DynamicWinsockMethods.CreateDelegate< T >(), System.Runtime.InteropServices.StandardOleMarshalObject.GetMarshalSizeMax(), and System.Runtime.InteropServices.StandardOleMarshalObject.MarshalInterface().