TypeBuilder.DefinePInvokeMethodCore Método

Definição

Quando substituído em uma classe derivada, define um método PInvoke com o nome fornecido, o nome da DLL, o nome do ponto de entrada, os atributos, a convenção de chamada, o tipo de retorno, os tipos dos parâmetros, os sinalizadores PInvoke e os modificadores personalizados para os parâmetros e o tipo de retorno.

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

Parâmetros

name
String

O nome do método PInvoke. name não pode conter nulos inseridos.

dllName
String

O nome da DLL na qual o método PInvoke é definido.

entryName
String

O nome do ponto de entrada na DLL.

attributes
MethodAttributes

Uma combinação bit a bit dos valores de enumeração que especifica os atributos do método .

callingConvention
CallingConventions

A convenção de chamada do método.

returnType
Type

O tipo de retorno do método.

returnTypeRequiredCustomModifiers
Type[]

Uma matriz de tipos que representam os modificadores personalizados necessários

returnTypeOptionalCustomModifiers
Type[]

Uma matriz de tipos que representam os modificadores personalizados opcionais

parameterTypes
Type[]

Os tipos de parâmetros do método.

parameterTypeRequiredCustomModifiers
Type[][]

Uma matriz de matrizes de tipos. Cada matriz de tipos representa os modificadores personalizados necessários para o parâmetro correspondente.

parameterTypeOptionalCustomModifiers
Type[][]

Uma matriz de matrizes de tipos. Cada matriz de tipos representa os modificadores personalizados opcionais para o parâmetro correspondente.

nativeCallConv
CallingConvention

A convenção de chamada nativa.

nativeCharSet
CharSet

O conjunto de caracteres nativos do método.

Retornos

Um MethodBuilder representando o método PInvoke definido.

Aplica-se a