Hi all,
I have a major problem with my application. For some reason on win9x my
application will not exit properly when the user shuts down there system.
This doesnt seem to be a problem on XP. My application in question is a
command prompt based app. For some reason the application does not seem to
recieve its termination signal. Is this a known problem with win9x systems
and if so is there a way to work arround it?
Thanks for any help in advance
Jamie 5 1495
Hi Jammie! I have a major problem with my application. For some reason on win9x my application will not exit properly when the user shuts down there system. This doesnt seem to be a problem on XP. My application in question is a command prompt based app. For some reason the application does not seem to recieve its termination signal. Is this a known problem with win9x systems and if so is there a way to work arround it?
You have correctly called "SetConsoleCtrl Handler", or?
See: SetConsoleCtrlH andler http://msdn.microsoft.com/library/en...trlhandler.asp
Then normaly it should work.
I suppose, that after you receive the End-Event, you do not terminate
correctly...
--
Greetings
Jochen
My blog about Win32 and .NET http://blog.kalmbachnet.de/
Set ConsoleCtrlHand ler is set.
The code in question is the following:
BOOL WINAPI ConsoleControlH andler ( DWORD dwCtrlType ){
BOOL bReturnStatus = FALSE;
switch( dwCtrlType ){
case CTRL_C_EVENT:
if(gstate.activ ities_suspended ) {
resume_client() ;
} else {
suspend_client( );
}
bReturnStatus = TRUE;
break;
case CTRL_BREAK_EVEN T:
case CTRL_CLOSE_EVEN T:
case CTRL_SHUTDOWN_E VENT:
quit_client();
bReturnStatus = TRUE;
break;
case CTRL_LOGOFF_EVE NT:
if (!gstate.execut ing_as_daemon) {
quit_client();
}
bReturnStatus = TRUE;
break;
}
return bReturnStatus;
}
When i run the application on windows 98 the above code does not seem to run
when a shutdown or logoff action is taken. Does anyone have any idea's?
Jamie
"Jochen Kalmbach [MVP]" <no************ ********@holzma .de> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi Jammie!
I have a major problem with my application. For some reason on win9x my application will not exit properly when the user shuts down there system. This doesnt seem to be a problem on XP. My application in question is a command prompt based app. For some reason the application does not seem to recieve its termination signal. Is this a known problem with win9x systems and if so is there a way to work arround it?
You have correctly called "SetConsoleCtrl Handler", or?
See: SetConsoleCtrlH andler http://msdn.microsoft.com/library/en...trlhandler.asp
Then normaly it should work.
I suppose, that after you receive the End-Event, you do not terminate correctly...
-- Greetings Jochen
My blog about Win32 and .NET http://blog.kalmbachnet.de/
I have investigated further, this is to do with a bug in windows 9x where if
multiple messages are sent to the console control at the same time they get
ignored. This means the messages are never recieved by the application. I
dont know waht to do now. Im working on pre ME so im not sure waht my
options are. I am running a separate application that is running as a
windows application, maybe i could authorise the shutdown of the client from
this other program, but if no messages are being recieved how is this going
to help? I guess i could launch the console part as a child process but im
not sure how that would work.
Have other people here had this problem? What path have you taken to solve
this?
Jamie
"Jammie" <ja****@dsl.pip ex.com> wrote in message
news:J7******** ************@pi pex.net... Set ConsoleCtrlHand ler is set.
The code in question is the following:
BOOL WINAPI ConsoleControlH andler ( DWORD dwCtrlType ){ BOOL bReturnStatus = FALSE; switch( dwCtrlType ){ case CTRL_C_EVENT: if(gstate.activ ities_suspended ) { resume_client() ; } else { suspend_client( ); } bReturnStatus = TRUE; break; case CTRL_BREAK_EVEN T: case CTRL_CLOSE_EVEN T: case CTRL_SHUTDOWN_E VENT: quit_client(); bReturnStatus = TRUE; break; case CTRL_LOGOFF_EVE NT: if (!gstate.execut ing_as_daemon) { quit_client(); } bReturnStatus = TRUE; break; } return bReturnStatus; }
When i run the application on windows 98 the above code does not seem to run when a shutdown or logoff action is taken. Does anyone have any idea's?
Jamie "Jochen Kalmbach [MVP]" <no************ ********@holzma .de> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi Jammie!
I have a major problem with my application. For some reason on win9x my application will not exit properly when the user shuts down there system. This doesnt seem to be a problem on XP. My application in question is a command prompt based app. For some reason the application does not seem to recieve its termination signal. Is this a known problem with win9x systems and if so is there a way to work arround it?
You have correctly called "SetConsoleCtrl Handler", or?
See: SetConsoleCtrlH andler http://msdn.microsoft.com/library/en...trlhandler.asp
Then normaly it should work.
I suppose, that after you receive the End-Event, you do not terminate correctly...
-- Greetings Jochen
My blog about Win32 and .NET http://blog.kalmbachnet.de/
>I have investigated further, this is to do with a bug in windows 9x where if multiple messages are sent to the console control at the same time they get ignored. This means the messages are never recieved by the application. I dont know waht to do now. Im working on pre ME so im not sure waht my options are. I am running a separate application that is running as a windows application, maybe i could authorise the shutdown of the client from this other program, but if no messages are being recieved how is this going to help? I guess i could launch the console part as a child process but im not sure how that would work.
Have other people here had this problem? What path have you taken to solve this?
You can acknowledge this as known bug in your program, and can state that
it's fixed in XP. :-)
I could, but ideally i need to cover the fact that people are still using
this platform.
Jamie
"Vladimir Nesterovsky" <vl******@neste rovsky-bros.com> wrote in message
news:u1******** ********@TK2MSF TNGP09.phx.gbl. .. I have investigated further, this is to do with a bug in windows 9x where if multiple messages are sent to the console control at the same time they get ignored. This means the messages are never recieved by the application. I dont know waht to do now. Im working on pre ME so im not sure waht my options are. I am running a separate application that is running as a windows application, maybe i could authorise the shutdown of the client from this other program, but if no messages are being recieved how is this going to help? I guess i could launch the console part as a child process but im not sure how that would work.
Have other people here had this problem? What path have you taken to solve this?
You can acknowledge this as known bug in your program, and can state that it's fixed in XP. :-)
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Timothy Smith |
last post by:
i want to run my sql statements on a seperate thread to prevent my app
from stop responding to input (atm is says "not responding" under
windows until the sql is finished)
but i'm hesitant because i have to still support win9x and i'm not sure
how well this will play.
|
by: Jim McGrail |
last post by:
Background:
I am investigating a problem involving a windows .NET application that is
being developed in C# with Visual Studio 2003.
It is a multi-threaded application that uses MSMQ to communicate between the
threads.
The problem is that the program infrequently terminates with no indication
of why it terminated.
|
by: Nou Dadoun |
last post by:
I'm currently developing an application in C++/MFC (Visual Studio 6,
if that makes a difference) and I'd like to avoid the Windows style UI
widgets and dialogs if at all possible.
In fact, what I'd really like to do is use HTML/web pages as the user
interface and invoke my application in the background to do the heavy
lifting. I'm fairly well experienced with web pages and I've written
a fair amount of JavaScript at one time or another...
|
by: José Joye |
last post by:
I have a library written in C (I do not have the source) and having some
callbacks exported. It is currently not that stable and write to stdout and
stderr
:-((
The idea I have is to wrap it with a C# class and instanciate an instance of
this class within a new AppDomain.
Here are my question:
Am I correct to assume that I will be able to handle cases where the library
|
by: Jeff Molby |
last post by:
Does anyone know offhand how the EventLog acts on Win9x? Does it know to
create text logs or does it just raise an exception?
If anyone has any experience with this, I'd appreciate a brief answer. I
don't expect anyone to do my research for me.
Thanks!
Jeff
| |
by: Gernot Frisch |
last post by:
Hi,
I have recompiled a VC+ 6 project to VC++ 7.1 (native code - am I OT
here?). Everything went smoothly, but now, after 6 month of work, when
I want to run the program for the first time on Win9x it crashes
before any window appears. I don't know what's wrong and I don't know
where or something.
Can anyone help me how to find the line number or something where the
program crashes? Can I perform a remote debugging? We have a domain...
|
by: Oenone |
last post by:
I'm developing a wrapper around a series of VB6 plugins that I now want to
be able to run in my VB.NET application.
Everything is working fine, except I can't find a way to get the
Class_Terminate from the VB6 classes to fire when I've finished with the
objects.
In VB6, these obviously fire when the last reference to the object is set to
Nothing. In .NET, this doesn't happen until I close my application (or,
presumably, when the...
|
by: Xah Lee |
last post by:
in March, i posted a essay “What is Expressiveness in a Computer
Language”, archived at:
http://xahlee.org/perl-python/what_is_expresiveness.html
I was informed then that there is a academic paper written on this
subject.
On the Expressive Power of Programming Languages, by Matthias
Felleisen, 1990.
http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
|
by: sp |
last post by:
The application is written in Visual Basic / .NET and working without
problems under Windows XP, Windows 2000, Windows 2003 but it isn't
working under Windows ME and Windows 98 - the computer hangs. After
computers hangs you can move mouse but can not press any key. Alt -
Ctrl- Del isn’t working so you have to reset the computer by pressing
button. I checked several Win 98 and Me - clean install to - always the
same!
At the beginning...
|
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,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |