|
 |
|
07-03-2005, 09:06 AM
|
#16
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
OK, I'll keep it simple. Here are the requirements/specifications that I came up with according to my very specific need (but also very influenced by what I believe everyone else would need for a CarPC setup)
-Application launches at startup (user can put it in Startup items)
-User configures app to execute an application upon intercepting any given 'event'. Configuration is performed once, and saved in ini file.
-Events that can be 'intercepted' are one or more of the following: Shutdown, Restart, Hibernate, Standby.
-User can select an action for every event. If user wants the same action for every event, then he simply ties the same action to each one.
-When an event is detected, the app will intercept it, cancel the event, and execute the corresponding action instead (typically,launch an application or execute a script, or whatever user configured). What's important is that after the script finishes executing, the app should NOT continue with the original event (i.e., it should not perform the shutdown or the hibernate etc. This was already cancelled). It is up to the user to handle this in the script. So if user really does want to continue with a hibernation after his script executed, he simply adds his own shutdown command at the end of the script. This gives the greatest amount of flexibility.
-Option to minimize upon launch.
That's really all we need. I can put together a mockup of what I envision this to look like tonight if you want me to.
Last edited by justintime; 07-12-2005 at 02:12 PM.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
07-12-2005, 02:11 PM
|
#17
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
Hey Xbrady. Any word on this? Did you ever find time to put something together?
Edit, here is a conceptual design. Even found a name for it!
Any takers?
Interceptor:
Last edited by justintime; 07-12-2005 at 02:30 PM.
|
|
|
07-17-2005, 11:00 PM
|
#18
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
OK, last try.... Xbrady, you there?
Anyone else willing to code this if Xbrady doesn't?
|
|
|
07-18-2005, 12:00 PM
|
#19
|
|
Newbie
Join Date: Apr 2005
Location: Bellevue, NE
Posts: 23
|
First, I would suggest adding a check box for the option of resuming the original event. This still gives you the option of doing it in code if you wanted to.
Second, depending on my free time, I might take a crack at doing it. It would be in VC++ 6 since I don't have a copy of .NET and prefer not to have a copy. (Yeah, yeah, yeah. I'm an old school programmer. I cut my programming teeth on QuickBasic.)
__________________
Just because I haven't posted alot doesn't mean I haven't searched and know what I am talking about!
Progress Meter [████████████] 2%
General layout design is done in my head. Just need the money to buy the stuff and start building.
|
|
|
07-18-2005, 03:57 PM
|
#20
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
Noldona:
OK, so you agree this would be tremendously useful when used in conjunction with an Opus?
Thanks for at least giving it a try. Doesn't sound too complicated. (I used to program a long time ago, but never for Windows / x386)
|
|
|
07-18-2005, 04:32 PM
|
#21
|
|
Newbie
Join Date: Apr 2005
Location: Bellevue, NE
Posts: 23
|
The method to do it seems simple enough. Hook the WM_ENDSESSION and return 0 to cancel the shutdown, do whatever process you need to do, then call the ExitWindowsEx function. Using the uFlags parameter, you can set it to what type of shutdown/logoff you want.
Only issues I see right now is how to pull the original shutdown/logoff type from the original WM_ENDSESSION message, and a possible infinate loop causing the puter to hang. I'm sure there is a way to grab the shutdown/logoff info, I just need to do some more reading. As for the possible infinate loop, that might be a bit more tricky to overcome.
[brainstorming]
If you set the shutdown part at the end of the script and immediately close the app after you start the script then it shouldn't do it. With keeping the shutdown option in the app itself, this would require the app to send the shutdown command and then close.
[/brainstorming]
Test will have to be made to see if that would be an issue.
Now to learn how to do standard controls in C++.  I grew up as a Basic programmer and have only recently gotten into Windows programming in C++. Most of my experience thus far is directed towards game programming though.
__________________
Just because I haven't posted alot doesn't mean I haven't searched and know what I am talking about!
Progress Meter [████████████] 2%
General layout design is done in my head. Just need the money to buy the stuff and start building.
Last edited by Noldona; 07-18-2005 at 04:35 PM.
|
|
|
07-18-2005, 05:14 PM
|
#22
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
If you dont want to waste time with the interface, how about a simple .ini or .xml file where we can configure all the settings? This doesn't have to be fancy, but it does have to be effective!
|
|
|
07-18-2005, 05:30 PM
|
#23
|
|
Newbie
Join Date: Apr 2005
Location: Bellevue, NE
Posts: 23
|
Well, now that I am getting off of work I will see what I can do. I might just go the MFC route.
__________________
Just because I haven't posted alot doesn't mean I haven't searched and know what I am talking about!
Progress Meter [████████████] 2%
General layout design is done in my head. Just need the money to buy the stuff and start building.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
07-28-2005, 10:36 PM
|
#24
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
Any update on this?
|
|
|
07-29-2005, 04:14 AM
|
#25
|
|
Maximum Bitrate
Join Date: Nov 2004
Location: Italy
Posts: 659
|
by the way I am pretty sure that the application named in the other thred can be allowed to last more than 20seconds, iirc 20s is the standard windows time to properly close an application, and this time can be changed or forced to infinite. I'm sure I've seen it somewhere, needs some searching.. will do :P
that programs with autoit rocks
__________________
Peugeot 206 1.4 HDi
Intel Mini-ITX Mainboard
Celeron 1.2ghz
256mb DDR-2 533
80gig 3.5" SATA HDD
Sb Live 5.1 w/ KXProject Drivers
M2-ATX
8" Lilliput TS LCD
100% installed and working :D
|
|
|
08-04-2005, 09:08 PM
|
#26
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
I guess I will have to learn how to code this myself. All in the sake of saving 3 MB of precious memory LOL!
|
|
|
08-16-2005, 11:09 PM
|
#27
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
I know I keep on resurrecting this... not a chance in the world I would be able to code this, but there are a ton of talented coders in this forum. Anyone seriously willing to program this?
Posts 16 & 17 have the relevant specs for the util...
|
|
|
08-17-2005, 12:34 AM
|
#28
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
Be done in a bit.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
|
|
|
08-17-2005, 12:59 AM
|
#29
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
Restart and Shutdown are the same thing, don't think I can differentiate.
However, I can add an event for logoff.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
|
|
|
08-17-2005, 01:13 AM
|
#30
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
Hibernate and Suspend are the same as well.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:23 AM.
| |