VarEnum 列挙体
アセンブリ: mscorlib (mscorlib.dll 内)

<SerializableAttribute> _ <ComVisibleAttribute(True)> _ Public Enumeration VarEnum

メンバ名 | 説明 | |
---|---|---|
![]() | VT_ARRAY | SAFEARRAY ポインタを示します。 |
![]() | VT_BLOB | 長さのプリフィックスが付いたバイトを示します。 |
![]() | VT_BLOB_OBJECT | BLOB がオブジェクトを格納していることを示します。 |
![]() | VT_BOOL | ブール値を示します。 |
![]() | VT_BSTR | BSTR 文字列を示します。 |
![]() | VT_BYREF | 値が参照であることを示します。 |
![]() | VT_CARRAY | C スタイル配列を示します。 |
![]() | VT_CF | クリップボード形式を示します。 |
![]() | VT_CLSID | クラス ID を示します。 |
![]() | VT_CY | 通貨の値を示します。 |
![]() | VT_DATE | DATE 値を示します。 |
![]() | VT_DECIMAL | Decimal 値を示します。 |
![]() | VT_DISPATCH | IDispatch ポインタを示します。 |
![]() | VT_EMPTY | 値が指定されなかったことを示します。 |
![]() | VT_ERROR | SCODE を示します。 |
![]() | VT_FILETIME | FILETIME 値を示します。 |
![]() | VT_HRESULT | HRESULT を示します。 |
![]() | VT_I1 | char 値を示します。 |
![]() | VT_I2 | short 整数を示します。 |
![]() | VT_I4 | long 整数を示します。 |
![]() | VT_I8 | 64 ビット整数を示します。 |
![]() | VT_INT | 整数値を示します。 |
![]() | VT_LPSTR | null で終わる文字列を示します。 |
![]() | VT_LPWSTR | null 参照 (Visual Basic では Nothing) で終わるワイド文字列を示します。 |
![]() | VT_NULL | null 値を示します。これは、SQL における null 値に相当します。 |
![]() | VT_PTR | ポインタ型を示します。 |
![]() | VT_R4 | float 値を示します。 |
![]() | VT_R8 | double 値を示します。 |
![]() | VT_RECORD | ユーザー定義型を示します。 |
![]() | VT_SAFEARRAY | SAFEARRAY を示します。VARIANT では有効ではありません。 |
![]() | VT_STORAGE | ストレージの名前が続くことを示します。 |
![]() | VT_STORED_OBJECT | ストレージがオブジェクトを格納していることを示します。 |
![]() | VT_STREAM | ストリームの名前が続くことを示します。 |
![]() | VT_STREAMED_OBJECT | ストリームがオブジェクトを格納していることを示します。 |
![]() | VT_UI1 | byte を示します。 |
![]() | VT_UI2 | unsignedshort を示します。 |
![]() | VT_UI4 | unsignedlong を示します。 |
![]() | VT_UI8 | 64 ビット符号なし整数を示します。 |
![]() | VT_UINT | unsigned 整数値を示します。 |
![]() | VT_UNKNOWN | IUnknown ポインタを示します。 |
![]() | VT_USERDEFINED | ユーザー定義型を示します。 |
![]() | VT_VARIANT | VARIANT far ポインタを示します。 |
![]() | VT_VECTOR | カウントされた単純な配列を示します。 |
![]() | VT_VOID | C スタイル void を示します。 |


Imports System Imports System.Runtime.InteropServices Module MyModule ' If you do not have a type library for an interface ' you can redeclare it using ComImportAttribute. ' This is how the interface would look in an idl file. '[ 'object, 'uuid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26"), 'dual, helpstring("IMyStorage Interface"), 'pointer_default(unique) '] 'interface IMyStorage : IDispatch '{ ' [id(1)] ' HRESULT GetItem([in] BSTR bstrName, [out, retval] IDispatch ** ppItem); ' [id(2)] ' HRESULT GetItems([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT)* pItems); ' [id(3)] ' HRESULT GetItemDescriptions([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT) ** ppItems); ' [id(4), propget] ' HRESULT get_IsEmpty([out, retval] BOOL * pfEmpty); '}; ' This is the managed declaration. <ComImport(), Guid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26")> _ Public Interface IMyStorage <DispId(1)> _ Function GetItem(<InAttribute(), MarshalAs(UnmanagedType.BStr)> ByVal bstrName As String) _ As <MarshalAs(UnmanagedType.Interface)> Object <DispId(2)> _ Function GetItems(<InAttribute(), MarshalAs(UnmanagedType.BStr)> ByVal bstrLocation As String, _ <OutAttribute(), MarshalAs(UnmanagedType.SafeArray)> ByVal Items() As Object) <DispId(3)> _ Function GetItemDescriptions(<InAttribute()> ByVal bstrLocation As String, _ <InAttribute(), OutAttribute(), MarshalAs(UnmanagedType.SafeArray)> ByRef varDescriptions() As Object) <DispId(4)> _ ReadOnly Property IsEmpty(<MarshalAs(UnmanagedType.VariantBool)> ByVal bEmpty As Boolean) End Interface End Module
using System; using System.Runtime.InteropServices; namespace MyModule { // If you do not have a type library for an interface // you can redeclare it using ComImportAttribute. // This is how the interface would look in an idl file. //[ //object, //uuid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26"), //dual, helpstring("IMyStorage Interface"), //pointer_default(unique) //] //interface IMyStorage : IDispatch //{ // [id(1)] // HRESULT GetItem([in] BSTR bstrName, [out, retval] IDispatch ** ppItem); // [id(2)] // HRESULT GetItems([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT)* pItems); // [id(3)] // HRESULT GetItemDescriptions([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT) ** ppItems); // [id(4), propget] // HRESULT get_IsEmpty([out, retval] BOOL * pfEmpty); //}; // This is the managed declaration. [ComImport] [Guid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26")] public interface IMyStorage { [DispId(1)] [return : MarshalAs( UnmanagedType.Interface )] Object GetItem( [In, MarshalAs( UnmanagedType.BStr )] String bstrName ); [DispId(2)] void GetItems( [In, MarshalAs( UnmanagedType.BStr )] String bstrLocation, [Out, MarshalAs( UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT )] out Object[] Items ); [DispId(3)] void GetItemDescriptions( [In] String bstrLocation, [In, Out, MarshalAs( UnmanagedType.SafeArray )] ref Object[] varDescriptions ); bool IsEmpty { [DispId(4)] [return : MarshalAs( UnmanagedType.VariantBool )] get; } } }
using namespace System; using namespace System::Runtime::InteropServices; // If you do not have a type library for an interface // you can redeclare it using ComImportAttribute. // This is how the interface would look in an idl file. //[ //object, //uuid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26"), //dual, helpstring("IMyStorage Interface"), //pointer_default(unique) //] //interface IMyStorage : IDispatch //{ // [id(1)] // HRESULT GetItem([in] BSTR bstrName, [out, retval] IDispatch ** ppItem); // [id(2)] // HRESULT GetItems([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT)* pItems); // [id(3)] // HRESULT GetItemDescriptions([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT) ** ppItems); // [id(4), propget] // HRESULT get_IsEmpty([out, retval] BOOL * pfEmpty); //}; // This is the managed declaration. [ComImport] [Guid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26")] interface class IMyStorage { [DispId(1)] Object^ GetItem( [In,MarshalAs(UnmanagedType::BStr)]String^ bstrName ); //[return : MarshalAs(UnmanagedType::Interface)] [DispId(2)] void GetItems( [In,MarshalAs(UnmanagedType::BStr)]String^ bstrLocation, [Out,MarshalAs(UnmanagedType::SafeArray, SafeArraySubType=VarEnum::VT_VARIANT)]array<Object^>^Items ); [DispId(3)] void GetItemDescriptions( [In]String^ bstrLocation, [In,Out,MarshalAs(UnmanagedType::SafeArray)]array<Object^>^varDescriptions ); property bool IsEmpty { [DispId(4)] [returnvalue:MarshalAs(UnmanagedType::VariantBool)] bool get(); } };
import System.*; import System.Runtime.InteropServices.*; // If you do not have a type library for an interface // you can redeclare it using ComImportAttribute. // This is how the interface would look in an idl file. // [ // object, // uuid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26"), // dual, helpstring("IMyStorage Interface"), // pointer_default(unique) // ] // interface IMyStorage : IDispatch // { // [id(1)] // HRESULT GetItem([in] BSTR bstrName, [out, retval] IDispatch ** ppItem); // [id(2)] // HRESULT GetItems([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT)* pItems); // [id(3)] // HRESULT GetItemDescriptions([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT) ** ppItems); // [id(4), propget] // HRESULT get_IsEmpty([out, retval] BOOL * pfEmpty); // }; // This is the managed declaration. /** @attribute ComImport() */ /** @attribute Guid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26") */ public interface IMyStorage { /** @attribute DispId(1) */ Object GetItem( /** @attribute In() @attribute MarshalAs(UnmanagedType.BStr) */String bstrName); /** @attribute DispId(2) */ void GetItems( /** @attribute In() @attribute MarshalAs(UnmanagedType.BStr) */String bstrLocation, /** @attribute Out() @attribute MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT) */Object Items[]); /** @attribute DispId(3) */ void GetItemDescriptions( /** @attribute In() */String bstrLocation, /** @attribute In() @attribute Out() @attribute MarshalAs(UnmanagedType.SafeArray) */Object varDescriptions[]); /** @attribute DispId(4) */ /** @return MarshalAs(UnmanagedType.VariantBool) */ boolean get_IsEmpty(); } //IMyStorage

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- VarEnum 列挙体のページへのリンク