C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 10th, 2003, 02:52 AM
GeneDefekt GeneDefekt is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 4 GeneDefekt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dos box woes

Hi does anyone know a way or even have some code lying around (C++/C) that would allow me to set up a dos box that cannot be terminated?
im working with windows 2000 and was asked to figure out how to make this happen and the long and short of it is i cant.

Please help all replies will be appreciated.

Thank you.

Reply With Quote
  #2  
Old June 10th, 2003, 08:51 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 36 m 16 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Any process that is running on a windows machine can be shutdown, be this through the task manager or through right clicking on the application title bar, or even sometimes just by clicking the close button (X) on the dos box.
The only other thing you could really do is have another application (service maybe) running that is watching for this application and if it doesn't see it, then it starts it back.

Reply With Quote
  #3  
Old June 10th, 2003, 09:59 AM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is online now
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,867 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 2 h 40 m 12 sec
Reputation Power: 480
I'm guessing that there should be something in the Console API, but I couldn't find it. Kind of like how you can set a window's properties to enable or disable the exit button.

There's a lot of Win32 Visual C++-specific brainpower over in CodeGuru's fora, so you might try there as well: http://www.codeguru.com/forum/

BTW, you might want to be a bit more specific about what you are trying to do. At first, I misinterpreted your question as the perennial one from those who launch their DOS program directly from the VC++ IDE but cannot read the output because the DOS window (AKA "console") close immediately after their program terminates.

Reply With Quote
  #4  
Old June 10th, 2003, 12:01 PM
GeneDefekt GeneDefekt is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 4 GeneDefekt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i understand that clarification should have been initialy made. i felt that my initial post was highly vague so ill tell you what i am supposed to be acheiving.

i need a dos box to stay open because its going to display a list of policies on internet usage, its for a voluntry organisation that has a small network of computers for young people to use to find information on various youth related issues. the need for a policies box had been brought up through misuse of the internet. we use filters but as you must all be aware these are less than perfect and do absolutely nothing tow\ards peer to peer filesharing etc.

so i just need a list of policies to be displayed at all times to act as a general warning and code of conduct. so as you can see this cant be killed, im not woried at this point on anythiing fancy just a working model would be fine but i dont understand the windows api all that well therefore dont know how to acheive it, i nievely figured there would be some kind of magic solution consisting of a few lines of code that would allow this to take place and even better allow it to be killed through a combination of key presses say ctrl+ whatever i could even set up a simple password system.

the only real problem im facing is keeping the box open constantly.

hope this clarifies my issue in a little more depth.

thanks for your time...........

Reply With Quote
  #5  
Old June 10th, 2003, 02:30 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is online now
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,867 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 2 h 40 m 12 sec
Reputation Power: 480
OK, I assume that this will be on a Windows system and that you normally write Windows applications. Also, I assume that this is not part of another program, but rather is to be a separate application.

Why not write a dialog-based app? You can define the border properties so that it does not have the corner buttons (or else will disable them) and you can make sure that you don't put any OK or Cancel buttons on it. If it needs to be visible at all times, including on top of the current application, then you should be able to set the Z-axis property to always keep it on top. The same thing can be done within an application by using a modeless dialog.

The policy statement can be placed on the dialog as label controls or else, if the list is too long, then a scrollable listbox could be placed on the dialog and the policy statement inserted into it.

Does that sound like what you need?

Reply With Quote
  #6  
Old June 11th, 2003, 07:48 AM
GeneDefekt GeneDefekt is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 4 GeneDefekt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
that sounds spot on, exactly what i need eccept for the always on top which means i dont even need to go there, its a win2k environment the organisation uses so would there be a way to utilise alpha blending into it to make it semi transparent?

Reply With Quote
  #7  
Old June 11th, 2003, 10:37 AM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is online now
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,867 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 2 h 40 m 12 sec
Reputation Power: 480
You just went beyond my experience with alpha-blending. I would imagine that it should work. And even if you can't get a dialog app to work, there might be a way to display an alpha-blended graphic that contains the policy.

You should probably post this in a new thread as a new question. It might also be a good idea to post it in CodeGuru as well, since this sounds a bit more specialized -- see my previous post for the link.

Reply With Quote
  #8  
Old June 12th, 2003, 01:44 PM
AGibel's Avatar
AGibel AGibel is offline
Bad Andy
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: OH
Posts: 275 AGibel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Something past dwise's knowledge? What is the world coming to?

Reply With Quote
  #9  
Old June 12th, 2003, 02:08 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is online now
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,867 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 2 h 40 m 12 sec
Reputation Power: 480
Quote:
Originally posted by AGibel
Something past dwise's knowledge? What is the world coming to?

Oh, there's lots that I'm ignorant of. For instance, My C++ training and most of my C++ experience predate the new language standard (1998, I think that was finalized) and there's lots about the changes that I haven't learned yet.

I've been learning a lot from the questions posted on this forum. I've even been able to answer an number of those questions simply by looking it up. My UNIX instructor tried to teach the class what I'd already learned, how to find the answers when questions arise. It's usually just that my general knowledge and experience suggest what kind of solution is needed and where to start looking for it. It's kind of like how I used to irritate my wife by coming up with the right question while watching Jeopardy, then commenting truthfully, "I didn't know that." I didn't, but the answer and the category would lead me to the question, more often than not.

Reply With Quote
  #10  
Old June 12th, 2003, 02:10 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 36 m 16 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
pretty much just general logic

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Dos box woes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT