ModuleBuilder.DefinePInvokeMethodCore Método

Definição

Quando substituído em uma classe derivada, define um PInvoke método.

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);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("P/Invoke marshalling may dynamically access members that could be trimmed.")]
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);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("P/Invoke marshalling may dynamically access members that could be trimmed.")>]
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

Parâmetros

name
String

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

dllName
String

O nome da DLL na qual o PInvoke método é 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.

parameterTypes
Type[]

Os tipos de parâmetros do método.

nativeCallConv
CallingConvention

A convenção de chamada nativa.

nativeCharSet
CharSet

O conjunto de caracteres nativo do método.

Retornos

O método definido PInvoke .

Atributos

Aplica-se a