ModuleBuilder.DefinePInvokeMethodCore Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
En cas de substitution dans une classe dérivée, définit une PInvoke méthode.
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
Paramètres
- name
- String
Nom de la PInvoke méthode.
name ne peut pas contenir de valeurs Null incorporées.
- dllName
- String
Nom de la DLL dans laquelle la PInvoke méthode est définie.
- entryName
- String
Nom du point d’entrée dans la DLL.
- attributes
- MethodAttributes
Combinaison au niveau du bit des valeurs d’énumération qui spécifie les attributs de la méthode.
- callingConvention
- CallingConventions
Convention d’appel de la méthode.
- returnType
- Type
Type de retour de la méthode.
- parameterTypes
- Type[]
Types des paramètres de la méthode.
- nativeCallConv
- CallingConvention
Convention d’appel native.
- nativeCharSet
- CharSet
Jeu de caractères natif de la méthode.
Retours
Méthode définie PInvoke .
- Attributs