ModuleBuilder.DefinePInvokeMethodCore Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Quando sottoposto a override in una classe derivata, definisce un PInvoke metodo .
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
Parametri
- name
- String
Nome del PInvoke metodo.
name non può contenere valori Null incorporati.
- dllName
- String
Nome della DLL in cui è definito il PInvoke metodo.
- entryName
- String
Nome del punto di ingresso nella DLL.
- attributes
- MethodAttributes
Combinazione bit per bit dei valori di enumerazione che specifica gli attributi del metodo .
- callingConvention
- CallingConventions
Convenzione di chiamata del metodo.
- returnType
- Type
Tipo restituito del metodo.
- parameterTypes
- Type[]
Tipi dei parametri del metodo.
- nativeCallConv
- CallingConvention
Convenzione di chiamata nativa.
- nativeCharSet
- CharSet
Set di caratteri nativi del metodo.
Valori restituiti
Metodo definito PInvoke .
- Attributi