ModuleBuilder.DefinePInvokeMethodCore Método

Definición

Cuando se invalida 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);
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);
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 método PInvoke. name no puede contener valores null insertados.

dllName
String

Nombre de la DLL en la que está definido el método PInvoke.

entryName
String

El nombre del punto de entrada del 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[]

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 PInvoke definido.

Se aplica a