VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "c_obvvalueboxlongBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'Generated by IDL2VB v120. Copyright (c) 1999 Martin.Both
'Source File Name: ../demos/obv/valuebox/box.idl
'Target File Name: c_obvvalueboxlongBox.cls

Option Explicit

Implements cOrbValueBase

'valuetype ::obv::valuebox::longBox
Const sTypeId As String = "IDL:obv/valuebox/longBox:1.0"

Private lUniqueId As Long

Public Value As Long

'Helper to get different COM interface
Friend Function thisOrbValueBase() As cOrbValueBase
    Set thisOrbValueBase = Me
End Function

'Helper
Private Function cOrbValueBase_UniqueId() As Long
    If lUniqueId = 0 Then
        lUniqueId = VBOrb.getNextUniqueID()
    End If
    cOrbValueBase_UniqueId = lUniqueId
End Function

'Helper
Private Sub cOrbValueBase_initByRead(ByVal oIn As cOrbStream)
    On Error GoTo ErrHandler
    Value = oIn.readLong()
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "longBox.read")
End Sub

'Helper
Private Sub cOrbValueBase_writeMe(ByVal oOut As cOrbStream)
    On Error GoTo ErrHandler
    Call oOut.writeLong(Value)
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "longBox.write")
End Sub

Private Function cOrbValueBase_getIds(ByVal Item As Integer) As String
    cOrbValueBase_getIds = IIf(Item = 0, sTypeId, "")
End Function

Private Function cOrbValueBase_isCustom() As Boolean
    cOrbValueBase_isCustom = False
End Function
