TypeBuilder.DefinePInvokeMethodCore Metodo

Definizione

Quando sottoposto a override in una classe derivata, definisce un metodo PInvoke con il nome specificato, il nome della DLL, il nome del punto di ingresso, gli attributi, la convenzione chiamante, il tipo restituito, i tipi dei parametri, i flag PInvoke e i modificatori personalizzati per i parametri e il tipo restituito.

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

Parametri

name
String

Nome del metodo PInvoke. name non può contenere valori Null incorporati.

dllName
String

Nome della DLL in cui è definito il metodo PInvoke.

entryName
String

Nome del punto di ingresso nella DLL.

attributes
MethodAttributes

Combinazione bit per bit dei valori di enumerazione che specifica gli attributi del metodo.

callingConvention
CallingConventions

Convenzione di chiamata del metodo.

returnType
Type

Tipo restituito del metodo.

returnTypeRequiredCustomModifiers
Type[]

Matrice di tipi che rappresentano i modificatori personalizzati necessari

returnTypeOptionalCustomModifiers
Type[]

Matrice di tipi che rappresentano i modificatori personalizzati facoltativi

parameterTypes
Type[]

Tipi dei parametri del metodo.

parameterTypeRequiredCustomModifiers
Type[][]

Matrice di matrici di tipi. Ogni matrice di tipi rappresenta i modificatori personalizzati necessari per il parametro corrispondente.

parameterTypeOptionalCustomModifiers
Type[][]

Matrice di matrici di tipi. Ciascuna matrice di tipi rappresenta i modificatori personalizzati opzionali per il parametro corrispondente.

nativeCallConv
CallingConvention

Convenzione di chiamata nativa.

nativeCharSet
CharSet

Set di caratteri nativo del metodo.

Restituisce

Oggetto MethodBuilder che rappresenta il metodo PInvoke definito.

Si applica a