TypeBuilder.DefinePInvokeMethodCore Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Cuando se reemplaza en una clase derivada, define un método PInvoke con el nombre proporcionado, el nombre dll, el nombre del punto de entrada, los atributos, la convención de llamada, el tipo de valor devuelto, los tipos de parámetros, las marcas PInvoke y los modificadores personalizados para los parámetros y el tipo de valor devuelto.
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
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.
- returnTypeRequiredCustomModifiers
- Type[]
Matriz de tipos que representan los modificadores personalizados necesarios
- returnTypeOptionalCustomModifiers
- Type[]
Matriz de tipos que representa los modificadores personalizados opcionales.
- parameterTypes
- Type[]
Tipos de los parámetros del método.
- parameterTypeRequiredCustomModifiers
- Type[][]
Matriz de matrices de tipos. Cada matriz de tipos representa los modificadores personalizados necesarios para el parámetro correspondiente.
- parameterTypeOptionalCustomModifiers
- Type[][]
Matriz de matrices de tipos. Cada matriz de tipos representa los modificadores personalizados opcionales para el parámetro correspondiente.
- nativeCallConv
- CallingConvention
Convención de llamada nativa.
- nativeCharSet
- CharSet
Juego de caracteres nativo del método.
Devoluciones
MethodBuilder que representa el método PInvoke
definido.
Se aplica a
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente GitHub Issues como mecanismo de comentarios sobre el contenido y lo sustituiremos por un nuevo sistema de comentarios. Para más información, vea:Enviar y ver comentarios de