473,386 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Program crashes on logoff but not regular closing

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
Nov 20 '05 #1
3 1260
* fa********@hotmail.com (Luke) scripsit:
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


Post the complexe exception message.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
fa********@hotmail.com (Luke) wrote in message news:<cc**************************@posting.google. 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.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.AxHost.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr 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.
Nov 20 '05 #3
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<2g************@uni-berlin.de>...
* fa********@hotmail.com (Luke) scripsit:
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


Post the complexe exception message.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.AxHost.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: puppet_sock | last post by:
Does the breaking of an ODBC connection produce a logoff event? I can't seem to get it to. What I was hoping was to use a trigger to do automatic cleanup of session specific data. But the...
0
by: Allan Bredahl | last post by:
Hi All I am trying to construct an application that is able to cancel a machine shutdown, reboot or logoff. And after performing some stuff to perform the original shutdown order :...
6
by: TR | last post by:
What is the best practice for implementing a Logoff feature so that the user's session is terminated and session state memory is released? Thanks TR
6
by: Jm | last post by:
Hi All I have a simple vb.net app that once run for some reason does not allow me to log off or shutdown the pc ? When i try to do so it will close my app and then will only shutdown or logoff...
1
by: Michael D. Reed | last post by:
I am using the help class to display a simple help file. I generated the help file using Word and saving it as a single page Web page (.mht extension). I show the help file with the following...
2
by: spncc | last post by:
i'm using VS 2005 to make the window form authen application. there is a logon status to make use of logoff procedure when the user click on it. however if the user didn't click at logoff control,...
1
by: twhitehouse | last post by:
I have an error when trying to log into outlook accounts in my vb6 program. I do not have a problem logging into these same accounts using outlook 2003. I have googled and found most of the...
1
by: Clemente | last post by:
Hi, We have a VB.Net application that is sleeping until it receives a logoff/shutdown event. We want the application running on Vista and XP. When the application receives those events it has...
0
mbmccormick
by: mbmccormick | last post by:
My application is running in the background as a service, but whenever I logoff it closes. I want to somehow override the Form.WndProc() (?) and WMI (?) to prevent my application from closing. It is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.