Re: Is there any system shutdown code in C From DOS ?
sweety_elegant@ yahoo.co.in (Sweety) wrote in
news:113be981.0 408201157.4cd99 f9a@posting.goo gle.com:
[color=blue]
> plz i need the code?[/color]
^^^^^
Please I
There is no such thing as shutdown or DOS in C. You seek an msdos
programming newsgroup or some comp.sources newsgroup maybe.
Re: Is there any system shutdown code in C From DOS ?
"Mark A. Odell" <odellmark@hotm ail.com> wrote in message news:<Xns954BA2 E543530Copyrigh tMarkOdell@130. 133.1.4>...[color=blue]
> sweety_elegant@ yahoo.co.in (Sweety) wrote in
> news:113be981.0 408201157.4cd99 f9a@posting.goo gle.com:
>[color=green]
> > plz i need the code?[/color]
> char *cmd = "Shutdown";[/color]
system(cmd);
Re: Is there any system shutdown code in C From DOS ?
plz i need the code?
bye.
which OS are you using?
have a look in this link http://www.tburke.net/info/rundll.htm
there are many system functions that will do that for you, you may also
you asm code.
Re: Is there any system shutdown code in C From DOS ?
bitshadow@yahoo .com (Michael Scarlett) wrote in
news:ce6aaec0.0 408201936.57632 281@posting.goo gle.com:
[color=blue][color=green][color=darkred]
>> > plz i need the code?[/color]
>> char *cmd = "Shutdown";[/color]
> system(cmd);[/color]
Not portable in the sense that it may do nothing on an ISO C compliant
implementation, like say an embedded system.
Re: Is there any system shutdown code in C From DOS ?
Dan.Pop@cern.ch (Dan Pop) wrote in news:cgcjrm$rre $1@sunnews.cern .ch:
[color=blue][color=green]
>>plz i need the code?[/color]
>
> For DOS *only*:[/color]
This may also work for other systems as newer machines have a soft power
button that actually shuts down gracefully.
[color=blue]
>
> #include <stdio.h>
>
> int main()
> {
> puts("Please switch the power off.");
> while (1) ;
> }[/color]
Re: Is there any system shutdown code in C From DOS ?
In <Xns954E5C5EAF0 63CopyrightMark Odell@130.133.1 .4> "Mark A. Odell" <odellmark@hotm ail.com> writes:
[color=blue]
>bitshadow@yaho o.com (Michael Scarlett) wrote in
>news:ce6aaec0. 0408201936.5763 2281@posting.go ogle.com:
>[color=green][color=darkred]
>>> > plz i need the code?
>>> char *cmd = "Shutdown";[/color]
>> system(cmd);[/color]
>
>Not portable in the sense that it may do nothing on an ISO C compliant
>implementation , like say an embedded system.[/color]
^^^^^^^^^^^^^^^ ^^^
Bogus argument: freestanding implementations need not support any of the
standard C library. Your objection to system() is equally valid to
strlen() or malloc() on a freestanding implementation.
The *right* objection to system() is that its argument is highly platform
specific. Then again, this is equally true for fopen's first argument ;-)
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
Re: Is there any system shutdown code in C From DOS ?
In <Xns954E5C93136 42CopyrightMark Odell@130.133.1 .4> "Mark A. Odell" <odellmark@hotm ail.com> writes:
[color=blue]
>Dan.Pop@cern.c h (Dan Pop) wrote in news:cgcjrm$rre $1@sunnews.cern .ch:
>[color=green][color=darkred]
>>>plz i need the code?[/color]
>>
>> For DOS *only*:[/color]
>
>This may also work for other systems as newer machines have a soft power
>button that actually shuts down gracefully.[/color]
There is more than one way of switching the power off ;-)
[color=blue][color=green]
>> #include <stdio.h>
>>
>> int main()
>> {
>> puts("Please switch the power off.");
>> while (1) ;
>> }[/color][/color]
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
Comment