_variant_t 擷取器
Microsoft 特定的
從封裝的 VARIANT 物件中擷取資料。
operator short( ) const;
operator long( ) const;
operator float( ) const;
operator double( ) const;
operator CY( ) const;
operator _bstr_t( ) const;
operator IDispatch*( ) const;
operator bool( ) const;
operator IUnknown*( ) const;
operator DECIMAL( ) const;
operator BYTE( ) const;
operator VARIANT() const throw();
operator char() const;
operator unsigned short() const;
operator unsigned long() const;
operator int() const;
operator unsigned int() const;
operator __int64() const;
operator unsigned __int64() const;
備註
從封裝的 VARIANT 中擷取未經處理資料。 如果 VARIANT 還不是適當的類型,則會嘗試使用 VariantChangeType 進行轉換,並且在失敗時產生錯誤:
運算子 short( ):擷取 short 整數值。
運算子 long( ):擷取 long 整數值。
運算子 float( ):擷取 float 數值。
運算子 double( ):擷取 double 整數值。
運算子 CY( ):擷取 CY 物件。
運算子 bool( ):擷取 bool 值。
運算子 DECIMAL( ):擷取 DECIMAL 值。
運算子 BYTE( ):擷取 BYTE 值。
運算子 _bstr_t( ):擷取封裝在 _bstr_t 物件中的字串。
運算子 IDispatch*( ):從封裝的 VARIANT 擷取分配介面 (Dispinterface) 指標。 AddRef 會在產生的指標上呼叫,因此您可自行決定是否要呼叫 Release 將它釋放。
運算子 IUnknown*( ):從封裝的 VARIANT 擷取 COM 介面指標。 AddRef 會在產生的指標上呼叫,因此您可自行決定是否要呼叫 Release 將它釋放。
END Microsoft 特定的