Share via


TypeBuilder.DefinePInvokeMethodCore Metoda

Definice

Při přepsání v odvozené třídě, definuje PInvoke metoda s zadaným názvem, název knihovny DLL, název vstupního bodu, atributy, volání konvence, návratový typ, typy parametrů, PInvoke příznaky a vlastní modifikátory pro parametry a návratový typ.

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

Parametry

name
String

Název PInvoke metody. name nemůže obsahovat vložené hodnoty null.

dllName
String

Název knihovny DLL, ve které je definována PInvoke metoda.

entryName
String

Název vstupního bodu v knihovně DLL.

attributes
MethodAttributes

Bitové kombinace hodnot výčtu, která určuje atributy metody.

callingConvention
CallingConventions

Konvence volání metody

returnType
Type

Návratový typ metody.

returnTypeRequiredCustomModifiers
Type[]

Pole typů představující požadované vlastní modifikátory

returnTypeOptionalCustomModifiers
Type[]

Pole typů představujících volitelné vlastní modifikátory

parameterTypes
Type[]

Typy parametrů metody

parameterTypeRequiredCustomModifiers
Type[][]

Pole polí typů. Každé pole typů představuje požadované vlastní modifikátory pro odpovídající parametr.

parameterTypeOptionalCustomModifiers
Type[][]

Pole polí typů. Každé pole typů představuje volitelné vlastní modifikátory odpovídajícího parametru.

nativeCallConv
CallingConvention

Nativní konvence volání.

nativeCharSet
CharSet

Nativní znaková sada metody.

Návraty

Představující MethodBuilder definovanou PInvoke metodu.

Platí pro