英語で読む

次の方法で共有


ModuleBuilder.DefinePInvokeMethodCore メソッド

定義

派生クラスでオーバーライドされた場合は、 メソッドを PInvoke 定義します。

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

パラメーター

name
String

PInvoke メソッドの名前。 name に埋め込み null 値を含めることはできません。

dllName
String

PInvoke メソッドが定義されている DLL の名前。

entryName
String

DLL 内のエントリ ポイントの名前。

attributes
MethodAttributes

メソッドの属性を指定する列挙値のビットごとの組み合わせ。

callingConvention
CallingConventions

メソッドの呼び出し規則。

returnType
Type

メソッドの戻り値の型。

parameterTypes
Type[]

メソッドのパラメーター型。

nativeCallConv
CallingConvention

ネイティブ呼び出し規則。

nativeCharSet
CharSet

メソッドのネイティブ文字セット。

戻り値

定義された PInvoke メソッド。

適用対象

製品 バージョン
.NET 8, 9