home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "clsLong"
- Attribute VB_Creatable = True
- Attribute VB_Exposed = True
- ' Long class -- LONG.CLS
- ' Parses Long integers into integers (words)
- '
- ' Properties
- ' Value
- '
- ' Methods
- ' LoWord
- ' HiWord
- '
- Option Explicit
-
- ' Value property (read/write)
- Public Value
-
- Public Function HiWord() As Object
- ' Create a new object to return.
- Dim intReturn As New clsInteger
- ' Get the high word and set the inReturn object's
- ' Value property.
- If Me.Value > &H7FFFFFFF Then
- intReturn.Value = (Me.Value And &HFFFF0000) \ &H10000
- Else
- intReturn.Value = ((Me.Value And &HFFFF0000) / &H10000) Xor &HFFFF0000
- End If
- ' Return the intReturn object as the result.
- ' Note that you must use Set, since this is object
- ' assignment.
- Set HiWord = intReturn
- End Function
-
- Public Function LoWord() As Object
- ' Create a new object to return.
- Dim intReturn As New clsInteger
- ' Get the low word and set the inReturn object's
- ' Value property.
- intReturn.Value = Me.Value And (Me.Value Xor &HFFFF0000)
- ' Return the intReturn object as the result.
- ' Note that you must use Set, since this is object
- ' assignment.
- Set LoWord = intReturn
- End Function
-
-