ModuleBuilder.DefinePInvokeMethodCore Methode

Definitie

Wanneer deze wordt overschreven in een afgeleide klasse, definieert u een PInvoke methode.

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

Parameters

name
String

De naam van de PInvoke methode. name kan geen ingesloten null-waarden bevatten.

dllName
String

De naam van het DLL-bestand waarin de PInvoke methode is gedefinieerd.

entryName
String

De naam van het toegangspunt in het DLL-bestand.

attributes
MethodAttributes

Een bitsgewijze combinatie van de opsommingswaarden waarmee de kenmerken van de methode worden opgegeven.

callingConvention
CallingConventions

De aanroepconventie van de methode.

returnType
Type

Het retourtype van de methode.

parameterTypes
Type[]

De typen parameters van de methode.

nativeCallConv
CallingConvention

De systeemeigen oproepconventie.

nativeCharSet
CharSet

De systeemeigen tekenset van de methode.

Retouren

De gedefinieerde PInvoke methode.

Kenmerken

Van toepassing op