Changeset 211 for Include/com/variant.ab


Ignore:
Timestamp:
Apr 11, 2007, 9:49:17 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

Decimalを追加、OAIdl.abの一応の完成など

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/com/variant.ab

    r208 r211  
    519519
    520520    Const Function ValCy() As Currency
     521        Dim r = ChangeType(VT_CY)
     522        ValCy = New Currency
     523        ValCy.Cy = GetQWord(VarPtr(r.val))
    521524    End Function
    522525
    523526    Sub ValCy(x As Currency)
     527        Clear()
     528        SetQWord(VarPtr(v.val), x.Cy)
     529        v.vt = VT_CY
    524530    End Sub
    525531   
     
    570576    'ValArray
    571577
    572     'ValDecimal
     578    Const Function ValDecimal() As Decimal
     579        Dim p = VarPtr(v) As *Decimal
     580        Return New Deciaml(p[0])
     581    End Function
     582
     583    Sub ValDecimal(x As Decimal)
     584        Clear()
     585        Dim p = VarPtr(v) As *Decimal
     586        p[0] = x.Dec
     587        v.vt = VT_DECIMAL '念の為
     588    End Sub
     589   
    573590
    574591    Function PtrToVariant() As *VARIANT
     
    591608    End Sub
    592609
    593 
    594610    Static Sub Move(ByRef dst As VARIANT, ByRef src As VARIANT)
    595611        dst = src
Note: See TracChangeset for help on using the changeset viewer.