fa********@hotm ail.com (Luke) wrote in message news:<cc******* *************** ****@posting.go ogle.com>...
I have a program that exits just fine when you close it manually, but
throws an unhandled exception when I try to log off windows. It
suggests I enable the JIT debugger, but when I compile the program in
debug mode and enable JIT debugging it closes fine, though the logoff
process is aborted. I am using a couple of activex controls that .net
generated wrappers for, so I don't know if that has anything to do
with it, but my program closes fine manually and afaik windows calls
the same event when its trying to close a program.
Thanks in advance,
Luke
The text of the exception is:
System.NullRefe renceException: Object reference not set to an instance
of an object.
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.AxHost.Wn dProc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
I realize this is all very general but if someone could just point me
in the right direction I'd be grateful.