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

Option Explicit

Implements cOrbException

'exception ::CosNaming::NamingContext::CannotProceed
Const sTypeId As String = "IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"
Private sSource As String
Private sPostDescr As String

Public cxt As c_NmContext
Public rest_of_name As c_NmNameComponentSeq

'Helper to get different COM interface
Public Function thisOrbException() As cOrbException
    Set thisOrbException = Me
End Function

Private Property Get cOrbException_TypeId() As String
    cOrbException_TypeId = sTypeId
End Property

Private Property Get cOrbException_Source() As String
    cOrbException_Source = sSource
End Property

Private Property Get cOrbException_Description() As String
    cOrbException_Description = "CORBA User Exception: [" & sTypeId & "], " & _
        TypeName(Me) & sPostDescr
End Property

Private Sub cOrbException_addInfos(Optional ByRef SourcePrefix As String = "", _
    Optional ByRef PostDescr As String = "")
    If sSource = "" Then
        sSource = SourcePrefix
    ElseIf SourcePrefix <> "" Then
        sSource = SourcePrefix & ": " & sSource
    End If
    If PostDescr <> "" Then
        sPostDescr = sPostDescr & ", " & PostDescr
    End If
End Sub

'Helper
Private Sub cOrbException_initByRead(ByVal oIn As cOrbStream)
    On Error GoTo ErrHandler
    Set cxt = m_NmContext.narrow(oIn.readObject())
    Set rest_of_name = New c_NmNameComponentSeq
    Call rest_of_name.initByRead(oIn, 0)
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "CannotProceed.read")
End Sub

'Helper
Private Sub cOrbException_writeMe(ByVal oOut As cOrbStream)
    On Error GoTo ErrHandler
    Call oOut.writeString(sTypeId)
    Call oOut.writeObject(cxt)
    Call rest_of_name.writeMe(oOut, 0)
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "CannotProceed.write")
End Sub

'Helper
Public Sub initByAny(ByVal oAny As cOrbAny)
    On Error GoTo ErrHandler
    Set cxt = oAny.getReference()
    Call oAny.nextPos
    Set rest_of_name = New c_NmNameComponentSeq
    Call rest_of_name.initByAny(oAny.currentComponent())
    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.insertReference(cxt)
    Call oAny.nextPos
    Call rest_of_name.insertIntoAny(oAny.currentComponent())
    Call oAny.nextPos
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "insertIntoAny")
End Sub
