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

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ComAliasNameAttribute クラスの意味・解説 

ComAliasNameAttribute クラス

パラメータまたはフィールド型の COM エイリアス示します

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

<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field
 Or AttributeTargets.Parameter Or AttributeTargets.ReturnValue,
 Inherited:=False)> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class
 ComAliasNameAttribute
    Inherits Attribute
Dim instance As ComAliasNameAttribute
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter|AttributeTargets.ReturnValue,
 Inherited=false)] 
[ComVisibleAttribute(true)] 
public sealed class ComAliasNameAttribute :
 Attribute
[AttributeUsageAttribute(AttributeTargets::Property|AttributeTargets::Field|AttributeTargets::Parameter|AttributeTargets::ReturnValue,
 Inherited=false)] 
[ComVisibleAttribute(true)] 
public ref class ComAliasNameAttribute sealed
 : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter|AttributeTargets.ReturnValue,
 Inherited=false) */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class ComAliasNameAttribute extends
 Attribute
AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter|AttributeTargets.ReturnValue,
 Inherited=false) 
ComVisibleAttribute(true) 
public final class ComAliasNameAttribute extends
 Attribute
解説解説
使用例使用例

OLE_COLOR は、次のタイプ ライブラリでは intエイリアスです。インポート中にComAliasNameAttributeマークされColor アクセサ引数は、タイプ ライブラリによって OLE_COLOR として参照されることを示します

typedef int OLE_COLOR;  

interface Baz {
 HRESULT SetColor([in] OLE_COLOR cl);
 HRESULT GetColor([out, retval] OLE_COLOR *cl);
}

次のようにインポートます。

Interface Baz
    Sub SetColor( <ComAliasName("stdole.OLE_COLOR")>
 cl As Integer)
    Function GetColor() As <ComAliasName("stdole.OLE_COLOR")>
 Integer
End Interface
interface Baz {
 void SetColor([ComAliasName("stdole.OLE_COLOR")] int
 cl);
 [return: ComAliasName("stdole.OLE_COLOR")] int
 GetColor();
}
interface class Baz
{
   void SetColor( [ComAliasName("stdole.OLE_COLOR")]int
 cl );

   [returnvalue:ComAliasName("stdole.OLE_COLOR")]
   int GetColor();
};

interface Baz
{
    void SetColor(
        /** @attribute ComAliasName("stdole.OLE_COLOR") 
         */
        int cl);
    /** @attribute.return ComAliasName("stdole.OLE_COLOR")
 
     */
    int GetColor();
} //Baz
継承階層継承階層
System.Object
   System.Attribute
    System.Runtime.InteropServices.ComAliasNameAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ComAliasNameAttribute メンバ
System.Runtime.InteropServices 名前空間



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

辞書ショートカット

すべての辞書の索引

「ComAliasNameAttribute クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS