ModuleBuilder.DefinePInvokeMethodCore Método

Definição

Quando sobrescrito numa 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 embutidos.

dllName
String

O nome da DLL em que o PInvoke método está 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

O método chama convenção.

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 chamadas nativas.

nativeCharSet
CharSet

O conjunto de caracteres nativo do método.

Devoluções

O método definido PInvoke .

Atributos

Aplica-se a