Bagikan melalui


ModuleBuilder.DefinePInvokeMethodCore Metode

Definisi

Ketika ditimpa dalam kelas turunan PInvoke , mendefinisikan metode .

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

Parameter

name
String

Nama PInvoke metode . name tidak boleh berisi null yang disematkan.

dllName
String

Nama DLL tempat PInvoke metode ditentukan.

entryName
String

Nama titik masuk di DLL.

attributes
MethodAttributes

Kombinasi bitwise dari nilai enumerasi yang menentukan atribut metode .

callingConvention
CallingConventions

Konvensi pemanggilan metode.

returnType
Type

Jenis pengembalian metode.

parameterTypes
Type[]

Jenis parameter metode.

nativeCallConv
CallingConvention

Konvensi panggilan asli.

nativeCharSet
CharSet

Set karakter asli metode.

Mengembalikan

Metode yang ditentukan PInvoke .

Berlaku untuk