ModuleBuilder.DefinePInvokeMethodCore Метод

Определение

При переопределении в производном классе определяет PInvoke метод.

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

Параметры

name
String

Имя PInvoke метода. name не может содержать внедренные значения NULL.

dllName
String

Имя библиотеки DLL, в которой PInvoke определен метод.

entryName
String

Имя точки входа в библиотеке DLL.

attributes
MethodAttributes

Побитовое сочетание значений перечисления, указывающее атрибуты метода.

callingConvention
CallingConventions

Соглашение о вызовах метода.

returnType
Type

Тип возвращаемого метода.

parameterTypes
Type[]

Типы параметров метода.

nativeCallConv
CallingConvention

Собственное соглашение о вызовах.

nativeCharSet
CharSet

Собственный набор символов метода.

Возвращаемое значение

Определенный PInvoke метод.

Атрибуты

Применяется к