ModuleBuilder.DefinePInvokeMethodCore Método

Definición

Cuando se reemplaza en una clase derivada, define un 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

Nombre del PInvoke método. name no puede contener valores NULL incrustados.

dllName
String

Nombre del archivo DLL en el que se define el PInvoke método.

entryName
String

Nombre del punto de entrada en el archivo DLL.

attributes
MethodAttributes

Combinación bit a bit de los valores de enumeración que especifica los atributos del método.

callingConvention
CallingConventions

Convención de llamada del método.

returnType
Type

Tipo de valor devuelto del método.

parameterTypes
Type[]

Los tipos de los parámetros del método.

nativeCallConv
CallingConvention

Convención de llamada nativa.

nativeCharSet
CharSet

Juego de caracteres nativo del método.

Devoluciones

Método definido PInvoke .

Atributos

Se aplica a