VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "c_TestAnyStruct"
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/grid/grid.idl
'Target File Name: c_TestAnyStruct.cls

Option Explicit

'struct ::TestAnyStruct
Const sTypeId As String = "IDL:TestAnyStruct:1.0"

'Member
Public string_value As String
Public long_value As Long

'Helper
Public Sub initByRead(ByVal oIn As cOrbStream)
    On Error GoTo ErrHandler
    string_value = oIn.readString(20)
    long_value = oIn.readLong()
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "TestAnyStruct.read")
End Sub

'Helper
Public Sub writeMe(ByVal oOut As cOrbStream)
    On Error GoTo ErrHandler
    Call oOut.writeString(string_value)
    Call oOut.writeLong(long_value)
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "TestAnyStruct.write")
End Sub

'Helper
Public Sub initByAny(ByVal oAny As cOrbAny)
    On Error GoTo ErrHandler
    string_value = oAny.getString()
    Call oAny.nextPos
    long_value = oAny.getLong()
    Call oAny.nextPos
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "initByAny")
End Sub

'Helper
Public Sub insertIntoAny(ByVal oAny As cOrbAny)
    On Error GoTo ErrHandler
    Call oAny.insertString(string_value)
    Call oAny.nextPos
    Call oAny.insertLong(long_value)
    Call oAny.nextPos
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "insertIntoAny")
End Sub
