Share via


ModuleBuilder.DefinePInvokeMethodCore Yöntem

Tanım

Türetilmiş bir sınıfta geçersiz kılındığında bir PInvoke yöntem 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 ^> ^ parameterTypes, 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[]? parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet);
abstract member DefinePInvokeMethodCore : string * string * string * System.Reflection.MethodAttributes * System.Reflection.CallingConventions * 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, parameterTypes 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ü.

parameterTypes
Type[]

Yöntemin parametrelerinin türleri.

nativeCallConv
CallingConvention

Yerel çağrı kuralı.

nativeCharSet
CharSet

Yöntemin yerel karakter kümesi.

Döndürülenler

Tanımlanan PInvoke yöntem.

Şunlara uygulanır