TypeBuilder.DefinePInvokeMethodCore Metoda

Definicja

Po zastąpieniu w klasie pochodnej definiuje metodę PInvoke z podaną nazwą, nazwą biblioteki DLL, nazwą punktu wejścia, atrybutami, konwencją wywoływania, typem zwracanym, typami parametrów, flagami PInvoke i modyfikatorami niestandardowymi parametrów i zwracanym typem.

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

Parametry

name
String

Nazwa PInvoke metody. name Program nie może zawierać osadzonych wartości null.

dllName
String

Nazwa biblioteki DLL, w której zdefiniowano metodę PInvoke .

entryName
String

Nazwa punktu wejścia w dll.

attributes
MethodAttributes

Bitowa kombinacja wartości wyliczenia, która określa atrybuty metody.

callingConvention
CallingConventions

Konwencja wywoływania metody.

returnType
Type

Zwracany typ metody.

returnTypeRequiredCustomModifiers
Type[]

Tablica typów reprezentujących wymagane modyfikatory niestandardowe

returnTypeOptionalCustomModifiers
Type[]

Tablica typów reprezentujących opcjonalne modyfikatory niestandardowe

parameterTypes
Type[]

Typy parametrów metody.

parameterTypeRequiredCustomModifiers
Type[][]

Tablica tablic typów. Każda tablica typów reprezentuje wymagane modyfikatory niestandardowe dla odpowiedniego parametru.

parameterTypeOptionalCustomModifiers
Type[][]

Tablica tablic typów. Każda tablica typów reprezentuje opcjonalne modyfikatory niestandardowe dla odpowiedniego parametru.

nativeCallConv
CallingConvention

Natywna konwencja wywoływania.

nativeCharSet
CharSet

Natywny zestaw znaków metody.

Zwraca

Element MethodBuilder reprezentujący zdefiniowaną PInvoke metodę.

Dotyczy