ModuleBuilder.DefinePInvokeMethodCore メソッド
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
派生クラスでオーバーライドされた場合は、 メソッドを 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);
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);
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
PInvoke
メソッドが定義されている DLL の名前。
- entryName
- String
DLL 内のエントリ ポイントの名前。
- attributes
- MethodAttributes
メソッドの属性を指定する列挙値のビットごとの組み合わせ。
- callingConvention
- CallingConventions
メソッドの呼び出し規則。
- returnType
- Type
メソッドの戻り値の型。
- parameterTypes
- Type[]
メソッドのパラメーター型。
- nativeCallConv
- CallingConvention
ネイティブ呼び出し規則。
- nativeCharSet
- CharSet
メソッドのネイティブ文字セット。
定義された PInvoke
メソッド。
製品 | バージョン |
---|---|
.NET | 8, 9 |
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。