Uredi

Deli z drugimi prek


ModuleBuilder.DefinePInvokeMethodCore Method

Definition

When overridden in a derived class, defines a PInvoke method.

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);
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);
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

The name of the PInvoke method. name cannot contain embedded nulls.

dllName
String

The name of the DLL in which the PInvoke method is defined.

entryName
String

The name of the entry point in the DLL.

attributes
MethodAttributes

A bitwise combination of the enumeration values that specifies the attributes of the method.

callingConvention
CallingConventions

The method's calling convention.

returnType
Type

The method's return type.

parameterTypes
Type[]

The types of the method's parameters.

nativeCallConv
CallingConvention

The native calling convention.

nativeCharSet
CharSet

The method's native character set.

Returns

The defined PInvoke method.

Applies to