HELP - My application exists.... all on its own... at the end of a function
call!!!
The code snipit below runs... the finally block runs. But when it reaches
End Sub, it exists! - And the proceedure that calls this one, has code left
to run, but it never gets to a breakpoint on the next line.
Any ideas what to look for? Is it because i am calling an external assembly?
The calling code is run on a seperate thread, that is marked as background,
but that shouldnt make a difference should it?
Private Sub CreateOutput(ByVal Packet As Packet, ByVal ChannelInstance As
ChannelInstance, Optional ByVal PacketField As PacketField = Nothing)
Dim asmOutputChannel As System.Reflection.Assembly
Dim typOutputChannel As Type
Dim objOutputChannel As iOutputChannel
Try
asmOutputChannel =
System.Reflection.Assembly.LoadFrom(CType(ChannelI nstance.ChannelTemplate,
ChannelTemplate).FileName)
typOutputChannel =
asmOutputChannel.GetType(CType(ChannelInstance.Cha nnelTemplate,
ChannelTemplate).ProgID, True, True)
objOutputChannel = Activator.CreateInstance(typOutputChannel)
objOutputChannel.SendOutput(Packet, ChannelInstance)
Catch ex As DataAccessLayer.RecordAlreadyChanged
'Pass this error up the stack, without a parent exception
Throw ex
Catch ex As Exception
Throw New AllocationsEngineException("Unable to create output", ex)
Finally
asmOutputChannel = Nothing
typOutputChannel = Nothing
objOutputChannel = Nothing
End Try
End Sub