|
You will not know the sequence of processes that system set to send WM_QUERYENDSESSION, so if YOUR program return 0, there are still some program close, not your wish? And even if I make my program to be the first one in the list of receiving WM_QUERYENSSESION, the system still shut down if there is a program try to shutdown with SWE_FORCE parameter because there will be no WM_QUERYENDSESSION sent at all
Too bad, who could gimme the trustful solusion pls.
Thanks
|
|
|
|
|
If you have a program running and return 0 (FALSE) to WM_QUERYENDSESSION windows will end the shutdown sequence.
Blogless
|
|
|
|
|
You will not know the sequence of processes that system set to send WM_QUERYENDSESSION, so if YOUR program return 0, there are still some program close, not your wish? And even if I make my program to be the first one in the list of receiving WM_QUERYENSSESION, the system still shut down if there is a program try to shutdown with SWE_FORCE parameter because there will be no WM_QUERYENDSESSION sent at all
Too bad, who could gimme the trustful solusion pls.
Thanks
|
|
|
|
|
You will not know the sequence of processes that system set to send WM_QUERYENDSESSION, so if YOUR program return 0, there are still some program close, not your wish? And even if I make my program to be the first one in the list of receiving WM_QUERYENSSESION, the system still shut down if there is a program try to shutdown with SWE_FORCE parameter because there will be no WM_QUERYENDSESSION sent at all
Too bad, who could gimme the trustful solusion pls.
Thanks
|
|
|
|
|
OK, inject code into every process that hi jacks the ExitWindows, ExitWindowsEx call.
See the detours libaray on reseach.microsoft.com.
Thanks
Blogless
|
|
|
|
|
and also the reset and Power buttons...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
And let the computer run on a batterry that doesn't get empty... Why don't you let the computer run on Mars, while your at it?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
And let the computer run on a batterry that doesn't get empty...
damn, i forgot this point !
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
hey guyz..Candy here (again) i need help..where can i find a program that is already running ( C program using pointer)..id really appreciate it if any of u guys can help me..thanks
Candy
|
|
|
|
|
TaskMgr.exe for Windows
ps -ef for Unix
Blogless
|
|
|
|
|
Try this[^]
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
This is The code. The errors Follow......
// FunctionDemo - demonstrates the use of functions by breaking
// the inner loop of the NestedDemo program off
// into its own function
#include <stdio.h>
#include <iostream.h>
// sumSequence - add a sequence of numbers entered from the
// keyboard until the user enters a negative number.
// return - the summation of numbers entered
int sumSequence(void)
{
// loop forever
int accumulator = 0;
for(;;)
{
// fetch another number
int value = 0;
cout << "Enter the next number:";
cin >> value;
// if it's negative...
if (value < 0)
{
// ...then exit from loop
break;
}
// ...otherwise add the number to the accumulator
accumulator= accumulator+ value;
}
// return the accumulated value
return accumulator;
}
int main(int arg, char* pszArgs[])
{
cout << "This program sums multiple series\n"
<< "of numbers. Terminate each sequence\n"
<< "by entering a negative number.\n"
<< "Terminate the series by entering two\n"
<< "negative numbers in a rown\";
// accumulate sequences of numbers...
int accumulatedValue;
do
{
// sum a sequence of numbersentered from the keyboard
cout << "\nThe total is "
<< "accumulatedValue
<< "\n";
// ...until the sum returned is 0
} while (accumulatedValue !=0);
cout << "Program terminating\n";
return 0;
Errors...
FunctionDemo.cpp(41) : error C2001: newline in constant
FunctionDemo.cpp(43) : error C2144: syntax error : missing ';' before type 'int'
FunctionDemo.cpp(48) : error C2001: newline in constant
FunctionDemo.cpp(54) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Any Help Would be thoroughly appreciated...
"Do unto others as U would have them do to U"
|
|
|
|
|
Hey Guys Cmon...... Help the Newbie here.....
|
|
|
|
|
hey, why don't you just wait ?
if only you had waited for at least 1 whole hour, but a 1/4h...
you really want us not to answer ???
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Psych0hans wrote:
<< "accumulatedValue
Missing " at the end.
Also, missing closing bracers at end of main function.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Thanks a Bunch!!!!
Bit I'm still havin 2 errors
Cpp(41) : error C2001: newline in constant
FunctionDemo.cpp(43) : error C2144: syntax error : missing ';' before type 'int'
Error executing cl.exe.
Do Unto Others As U Would Have Them do to U
|
|
|
|
|
Read line 41 in your code. Notice how you screwed up the new line at the end?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thanks Pj I got that one fixed...... :-P
LOL Ders Jus 1 warning now.......
cpp(51) : warning C4700: local variable 'accumulatedValue' used without having been initialized
I'm Copyin the code from a book called C++ For Dummies.
(:-P Perfect for ppl like me )
Do Unot Others As U Would Have Done TO U
|
|
|
|
|
Psych0hans wrote:
warning C4700: local variable 'accumulatedValue' used without having been initialized
You didn't initialise it. Should do something like this:
int iValue = 0;
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Psych0hans wrote:
I'm Copyin the code from a book called C++ For Dummies.
(:-P Perfect for ppl like me :doh
Try using:
while( VS::Compiler::HasOutput() )
VS::Compiler >> Brain;
Sorry if I insult you, but it seems that you just do something without using your head. You just post your code and the compiler errors and wait for a solution. This is not a good habit of a starting programmer!
Please, for your own sake, try to fix the errors first by yourself, instead of posting compiler output and waiting for results.. You are not a manager!
One last thing, try and use normal english instead of sms / IM language, which is not very readable...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
One last thing, try and use normal english instead of sms / IM language, which is not very readable...
Agreed. I hate trying to read that crap. Some posts I do not even respond to for that reason alone. The amount of help a person gets from me is inversely proportional to how much effort, including reading the post, I have to exert.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
find this line in your code
int accumulatedValue; and change it
int accumulatedValue = 0;
the warning should be gone
|
|
|
|
|
Thanks a Lot Dude... That Solved My Problem 100%
U're
|
|
|
|
|
hi
I am having three arrays where 1. EntryId array 2.Subject array and 3. Time array. the elements of the array maps to the corresponding elemnts of the other two arrays.
I mean fr eg.
if entry ID is 2 it should be mapped with subject array of 2nd element and time array of 2nd element.
I want to sort it time was.
cheers
jhon
|
|
|
|
|
Maps would be better option here.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|