473,769 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1283
* fa********@hotm ail.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********@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.
Nov 20 '05 #3
hi************* **@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<2g******* *****@uni-berlin.de>...
* fa********@hotm ail.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.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)
Nov 20 '05 #4

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

Similar topics

1
2330
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 closing of the ODBC does not fire the logoff trigger, even though closing sqlplus does. Is there something I'm missing here? Is there a better way to cleanup session specific data when connecting through ODBC? I'm concerned with the case where the...
0
1908
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 : Shutdown/reboot/logoff. I have tried this : AddHandler Microsoft.Win32.SystemEvents.SessionEnding, AddressOf
6
5060
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
11271
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 if i attempt to do so once again ? Does anybody have any does why this would be so ?
1
1977
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 statement. Help.ShowHelp(Parent:=Me, url:=Me.HELP_URL_PRE & Me.myWorker.HelpFile) How do I get it to go away when the program exits? Now when I quit the program that I called it form the help file is sill displayed. Is there a way to get a handle...
2
1755
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, how do i determine the event of the closing application to process internal logoff procedure ??? appreciate all ideas :)
1
1632
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 solutions refer to wsock32.dll is missing. I have a wsock32.dll file. And that also would not explain why I can log in to the accounts on our exchange server using outlook 2003. Anyways, here is my code: (it is still rough, but I just want to get past...
1
5323
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 to show a message box, so the user can answer Yes or No, and then let the logoff/ shutdown process continues.
0
1732
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 currently running under the SYSTEM user account. I'm not even sure this is possible, I just remember hearing something about it. Any help is appreciated. Thanks.
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10038
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.