TypeLibFuncAttribute クラスとは? わかりやすく解説

TypeLibFuncAttribute クラス

COM タイプ ライブラリからこのメソッド用に元来インポートされた FUNCFLAGS を格納します

名前空間: System.Runtime.InteropServices
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
<AttributeUsageAttribute(AttributeTargets.Method, Inherited:=False)> _
Public NotInheritable Class
 TypeLibFuncAttribute
    Inherits Attribute
Dim instance As TypeLibFuncAttribute
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)]
 
public sealed class TypeLibFuncAttribute :
 Attribute
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets::Method, Inherited=false)]
 
public ref class TypeLibFuncAttribute sealed
 : public Attribute
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)
 */ 
public final class TypeLibFuncAttribute extends
 Attribute
ComVisibleAttribute(true) 
AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)
 
public final class TypeLibFuncAttribute extends
 Attribute
解説解説

タイプ ライブラリ インポータ (Tlbimp.exe) は、この属性メソッド適用します。

この属性タイプ ライブラリインポートされるときに適用され変更されることはありません。適用されるのは、メソッドFUNCFLAGS が 0 以外の場合だけです。この属性は、元の FUNCFLAGSどのように設定されたかを把握する必要のあるツール使用するために設計されています。共通言語ランタイムでは、この属性使用されません。

使用例使用例

メソッドTypeLibFuncAttribute 値を取得する方法次の例に示します

Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices

Module C
    Public Function IsHiddenMethod(ByVal
 mi As MethodInfo) As Boolean
        Dim MethodAttributes As Object()
 = mi.GetCustomAttributes(GetType(TypeLibFuncAttribute), True)

        If MethodAttributes.Length > 0 Then
            Dim tlf As TypeLibFuncAttribute
 = MethodAttributes(0)
            Dim flags As TypeLibFuncFlags =
 tlf.Value
            Return (flags & TypeLibFuncFlags.FHidden) >
 0
        End If
        Return False
    End Function
End Module
using System;
using System.Reflection;
using System.Runtime.InteropServices;

namespace C
{
    class ClassC    
    {
        public static bool
 IsHiddenMethod( MethodInfo mi )
        {
            object[] MethodAttributes = mi.GetCustomAttributes( typeof( TypeLibFuncAttribute
 ), true);
        
            if( MethodAttributes.Length > 0 )
            {
                TypeLibFuncAttribute tlf = ( TypeLibFuncAttribute )MethodAttributes[0];
                TypeLibFuncFlags  flags = tlf.Value;
                return ( flags & TypeLibFuncFlags.FHidden
 ) != 0; 
            }
            return false;
        }
    }
}
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::InteropServices;

ref class ClassC
{
private:
   static bool IsHiddenMethod( MethodInfo^
 mi )
   {
      array<Object^>^MethodAttributes = mi->GetCustomAttributes( TypeLibFuncAttribute::typeid,
 true );
      if ( MethodAttributes->Length > 0 )
      {
         TypeLibFuncAttribute^ tlf = dynamic_cast<TypeLibFuncAttribute^>(MethodAttributes[
 0 ]);
         TypeLibFuncFlags flags = tlf->Value;
         return (flags & TypeLibFuncFlags::FHidden) != (TypeLibFuncFlags)0;
      }

      return false;
   }
};
import System.*;
import System.Reflection.*;
import System.Runtime.InteropServices.*;

class ClassC
{
    public static boolean IsHiddenMethod(MethodInfo
 mi)
    {
        Object methodAttributes[] 
            = mi.GetCustomAttributes(TypeLibFuncAttribute.class.ToType(),
 true);

        if (methodAttributes.length > 0) {
            TypeLibFuncAttribute tlf 
                = (TypeLibFuncAttribute)(methodAttributes.get_Item(0));
            TypeLibFuncFlags flags = tlf.get_Value();

            return (int)(flags & TypeLibFuncFlags.FHidden)
 != 0;
        }
        return false;
    } //IsHiddenMethod
} //ClassC
継承階層継承階層
System.Object
   System.Attribute
    System.Runtime.InteropServices.TypeLibFuncAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TypeLibFuncAttribute メンバ
System.Runtime.InteropServices 名前空間
その他の技術情報
タイプ ライブラリ インポータ (Tlbimp.exe)


このページでは「.NET Framework クラス ライブラリ リファレンス」からTypeLibFuncAttribute クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTypeLibFuncAttribute クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTypeLibFuncAttribute クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TypeLibFuncAttribute クラス」の関連用語

TypeLibFuncAttribute クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TypeLibFuncAttribute クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS