Ben and/or everyone:
Here is some debugging output in VB2005... Maybe this new message in the debug window will help explain my issue. Some of the lines are debug.print() statements that I have put in my code and others are written there by the IDE...
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\CLA_WMWrapper.dll', Symbols loaded.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\CLA_WeldMonitor.dll', Symbols loaded.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\LoginWin.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\CLA_Communications.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Accessibility\2.0.0.0__b03f5f7f11d50a3a\Accessibility.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\cla_TCPClient.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\CLA_Logging.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\CLA_SerialPort.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Debug\cla_TCPListener.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Data.OracleClient\2.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll', No symbols loaded.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VB6.EXE' (Managed): Loaded '3rzo3oa0', No symbols loaded.
'VB6.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
MasterReset: Set RodInProcess = False
StartWMProcess: Set RodInProcess = True
The thread '<No Name>' (0x6d0) has exited with code 0 (0x0).
ProcessWeldSummary[PASS]: Set RodInProcess = False
WeldOperationComplete: Set RodInProcess = False
MasterReset: Set RodInProcess = False
StartWMProcess: Set RodInProcess = True
DeviceDataReceived RodInProcess: True (Good here... I'm receiving data from a TCP/IP comm object) (Within Dot Net object handling comm event)
Calling ProcessWeldSummary(data) (within the preceding event handler I call this method) (Within Dot Net object)
DeviceDataReceived RodInProcess: False (<--- Lost my RodInProcess Flag setting ???) (Within Dot Net object)
The thread '<No Name>' (0x12d4) has exited with code 0 (0x0). (don't know what thread this is???)
WM RaiseEvent: MessageOccurred (Normal raising event from WM object to WMWrapper object - Informational message because flag change routes code to this event to inform calling application of a message (Data) sent in wrong mode! This is because some thing has changed my RodInProcess flag)
WMWrapper RaiseEvent: Message_Occurred (Normal - Re-Rasing event from WM to WMWrapper) (WMWrapper is a class with COM attributes to expose to the VB6 client application)
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
WMWrapper RaiseEvent: WrapperErrorOccurred
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
ProcessException: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed. (Exception from HRESULT: 0x80010007 (RPC_E_SERVER_DIED)) (This is the first time I see the COM exception in my code! Then werd things start to happen in my code like the original DeviceDataReceived event handler is refired! yes it looks like it's refired again one or more time before it is successful! )
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
DeviceDataReceived RodInProcess: False
WM RaiseEvent: MessageOccurred
WMWrapper RaiseEvent: Message_Occurred
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
WMWrapper RaiseEvent: WrapperErrorOccurred
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
ProcessException: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed. (Exception from HRESULT: 0x80010007 (RPC_E_SERVER_DIED))
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
ProcessWeldSummary[PASS]: Set RodInProcess = False
Note: It looks like this "A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll is what is occurring or the threading issue?. The IDE is putting this "A first chance.." message and the "The callee is not available and disappeared.." message in to the output window. WM messages and RodInProcess message are debug.print messages.
Help is requested from all threading and COM InterOp experts! I have read something about this "first chance" message before but can't remember. If you have any ideas before I do please send them my way!
TIA! JerryM