Marshal.GetFunctionPointerForDelegate 메서드

정의

오버로드

GetFunctionPointerForDelegate(Delegate)
사용되지 않음.

대리자를 비관리 코드에서 호출할 수 있는 함수 포인터로 변환합니다.

GetFunctionPointerForDelegate<TDelegate>(TDelegate)

지정된 형식의 대리자를 관리되지 않는 코드에서 호출할 수 있는 함수 포인터로 변환합니다.

GetFunctionPointerForDelegate(Delegate)

Source:
Marshal.cs
Source:
Marshal.cs
Source:
Marshal.cs

주의

GetFunctionPointerForDelegate(Delegate) may be unavailable in future releases. Instead, use GetFunctionPointerForDelegate<T>(T). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296522

대리자를 비관리 코드에서 호출할 수 있는 함수 포인터로 변환합니다.

public:
 static IntPtr GetFunctionPointerForDelegate(Delegate ^ d);
[System.Obsolete("GetFunctionPointerForDelegate(Delegate) may be unavailable in future releases. Instead, use GetFunctionPointerForDelegate<T>(T). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296522")]
[System.Security.SecurityCritical]
public static IntPtr GetFunctionPointerForDelegate (Delegate d);
public static IntPtr GetFunctionPointerForDelegate (Delegate d);
[System.Security.SecurityCritical]
public static IntPtr GetFunctionPointerForDelegate (Delegate d);
[<System.Obsolete("GetFunctionPointerForDelegate(Delegate) may be unavailable in future releases. Instead, use GetFunctionPointerForDelegate<T>(T). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296522")>]
[<System.Security.SecurityCritical>]
static member GetFunctionPointerForDelegate : Delegate -> nativeint
static member GetFunctionPointerForDelegate : Delegate -> nativeint
[<System.Security.SecurityCritical>]
static member GetFunctionPointerForDelegate : Delegate -> nativeint
Public Shared Function GetFunctionPointerForDelegate (d As Delegate) As IntPtr

매개 변수

d
Delegate

비관리 코드에 전달할 대리자입니다.

반환

IntPtr

nativeint

비관리 코드에 전달할 수 있는 값입니다. 비관리 코드에서는 이 값을 사용하여 관리되는 내부 대리자를 호출할 수 있습니다.

특성

예외

d 매개 변수는 제네릭 형식 정의입니다.

d 매개 변수가 null인 경우

설명

대리 d 자는 기본 플랫폼 호출 규칙을 사용하여 관리되지 않는 코드에 전달할 수 있는 함수 포인터로 변환됩니다. 를 대리자에게 적용하여 UnmanagedFunctionPointerAttribute 호출 규칙을 설정할 수 있습니다.

관리 코드에서 가비지 수집기에서 대리자를 수집하지 않도록 수동으로 유지해야 합니다. 가비지 수집기는 관리되지 않는 코드에 대한 참조를 추적하지 않습니다.

적용 대상

GetFunctionPointerForDelegate<TDelegate>(TDelegate)

Source:
Marshal.cs
Source:
Marshal.cs
Source:
Marshal.cs

지정된 형식의 대리자를 관리되지 않는 코드에서 호출할 수 있는 함수 포인터로 변환합니다.

public:
generic <typename TDelegate>
 static IntPtr GetFunctionPointerForDelegate(TDelegate d);
[System.Security.SecurityCritical]
public static IntPtr GetFunctionPointerForDelegate<TDelegate> (TDelegate d);
public static IntPtr GetFunctionPointerForDelegate<TDelegate> (TDelegate d);
[<System.Security.SecurityCritical>]
static member GetFunctionPointerForDelegate : 'Delegate -> nativeint
static member GetFunctionPointerForDelegate : 'Delegate -> nativeint
Public Shared Function GetFunctionPointerForDelegate(Of TDelegate) (d As TDelegate) As IntPtr

형식 매개 변수

TDelegate

변환할 대리자의 형식입니다.

매개 변수

d
TDelegate

비관리 코드에 전달할 대리자입니다.

반환

IntPtr

nativeint

비관리 코드에 전달할 수 있는 값입니다. 비관리 코드에서는 이 값을 사용하여 관리되는 내부 대리자를 호출할 수 있습니다.

특성

예외

d 매개 변수는 제네릭 형식 정의입니다.

d 매개 변수가 null인 경우

설명

대리 d 자는 기본 플랫폼 호출 규칙을 사용하여 비관리 코드로 전달할 수 있는 함수 포인터로 변환됩니다. 를 대리자에게 적용하여 UnmanagedFunctionPointerAttribute 호출 규칙을 설정할 수 있습니다.

관리 코드에서 가비지 수집기에서 대리자를 수집하지 않도록 수동으로 유지해야 합니다. 가비지 수집기는 관리되지 않는 코드에 대한 참조를 추적하지 않습니다.

적용 대상