Share via


TypeBuilder.DefinePInvokeMethodCore Yöntem

Tanım

Türetilmiş bir sınıfta geçersiz kılındığında, sağlanan ad, DLL adı, giriş noktası adı, öznitelikler, çağırma kuralı, dönüş türü, parametre türleri, PInvoke bayrakları ve parametreler ve dönüş türü için özel değiştiriciler ile bir PInvoke yöntemi tanımlar.

protected:
 abstract System::Reflection::Emit::MethodBuilder ^ DefinePInvokeMethodCore(System::String ^ name, System::String ^ dllName, System::String ^ entryName, System::Reflection::MethodAttributes attributes, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ returnTypeRequiredCustomModifiers, cli::array <Type ^> ^ returnTypeOptionalCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ parameterTypeRequiredCustomModifiers, cli::array <cli::array <Type ^> ^> ^ parameterTypeOptionalCustomModifiers, System::Runtime::InteropServices::CallingConvention nativeCallConv, System::Runtime::InteropServices::CharSet nativeCharSet);
protected abstract System.Reflection.Emit.MethodBuilder DefinePInvokeMethodCore (string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet);
abstract member DefinePInvokeMethodCore : string * string * string * System.Reflection.MethodAttributes * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] * System.Runtime.InteropServices.CallingConvention * System.Runtime.InteropServices.CharSet -> System.Reflection.Emit.MethodBuilder
Protected MustOverride Function DefinePInvokeMethodCore (name As String, dllName As String, entryName As String, attributes As MethodAttributes, callingConvention As CallingConventions, returnType As Type, returnTypeRequiredCustomModifiers As Type(), returnTypeOptionalCustomModifiers As Type(), parameterTypes As Type(), parameterTypeRequiredCustomModifiers As Type()(), parameterTypeOptionalCustomModifiers As Type()(), nativeCallConv As CallingConvention, nativeCharSet As CharSet) As MethodBuilder

Parametreler

name
String

Yönteminin PInvoke adı. name katıştırılmış null içeremez.

dllName
String

Yönteminin tanımlandığı DLL'nin PInvoke adı.

entryName
String

DLL'deki giriş noktasının adı.

attributes
MethodAttributes

Yönteminin özniteliklerini belirten numaralandırma değerlerinin bit düzeyinde birleşimi.

callingConvention
CallingConventions

Yöntemin çağırma kuralı.

returnType
Type

Yöntemin dönüş türü.

returnTypeRequiredCustomModifiers
Type[]

Gerekli özel değiştiricileri temsil eden tür dizisi

returnTypeOptionalCustomModifiers
Type[]

İsteğe bağlı özel değiştiricileri temsil eden bir tür dizisi

parameterTypes
Type[]

Yöntemin parametrelerinin türleri.

parameterTypeRequiredCustomModifiers
Type[][]

Tür dizileri dizisi. Her tür dizisi, karşılık gelen parametre için gerekli özel değiştiricileri temsil eder.

parameterTypeOptionalCustomModifiers
Type[][]

Tür dizileri dizisi. Her tür dizisi, ilgili parametre için isteğe bağlı özel değiştiricileri temsil eder.

nativeCallConv
CallingConvention

Yerel çağrı kuralı.

nativeCharSet
CharSet

Yöntemin yerel karakter kümesi.

Döndürülenler

MethodBuilder Tanımlı PInvoke yöntemi temsil eden bir.

Şunlara uygulanır