|
Hello all,
While trying to abort user logoff and shutdown programatically for windows 2008 , windows 7 and then running a process after it results in a screen with a message that following processes are still running and process abc.exe is preventing system to logoff. How can I disable this screen so that I can handle the process of Logoff and thus execute my processes accordingly.
Regards
Kushagra
modified on Wednesday, October 7, 2009 8:02 AM
|
|
|
|
|
In my knowledge it's not possible to disable this service. It's actually an information window provided by OS to make the user aware of which applications are blocking shutdown.
Application Shutdown behavior is Changed since Windows Vista. In Windows XP, applications are allowed to veto WM_QUERYENDSESSION without displaying any UI indicating why they need to cancel shutdown. These “silent shutdown failures” are highly frustrating to users, who often take a minute or two to realize that shutdown has failed because no UI was displayed. This is no longer permitted.
Applications that must block shutdown should use the new shutdown reason API. Also applications should no longer rely on always being able to block shutdown. Windows Vista/7 will also not allow console applications or applications that have no visible top-level windows to block shutdown
The details are given in The documentation is available in MSDN website.[^]
Also check this article - Describing Windows XP and Vista Shutdown in Application context[^]
-Sarath.
Rate the answers and close your posts if it's answered
|
|
|
|
|
Thanks Sarath , You really are a life savior
Cheers,
Kushagra
|
|
|
|
|
Hi all
As you know, we can export a dll's functions using "dumpbin.exe" tool.
Now, I want to know if Is there any posssibility to see the function definitions of dll file?
That is, a complete definition of the functions with their input and output arguments in the dll?
THX.
|
|
|
|
|
look in the header file (of the dll-code)
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
bahareh655 wrote: Now, I want to know if Is there any posssibility to see the function definitions of dll file?
That is, a complete definition of the functions with their input and output arguments in the dll?
I do not think this is possible unless the dll contains debug information with these details. Function definitions are placed in (source) header files for use by the compiler, but are not retained in the object modules.
|
|
|
|
|
bahareh655 wrote: That is, a complete definition of the functions with their input and output arguments in the dll?
See here for possibilities.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Simply disassemble and see the call stack
|
|
|
|
|
Hello,
I have used the following to make a cricheditctrl window
CRect Rect(0,20,20,40);
CRichEditCtrl::Create(WS_VISIBLE|WS_BORDER ,Rect, this,index);
The window is drawn but the border is not seen.
I want the border
Pritha
|
|
|
|
|
Hi,
I am not much familiar with COM and COM dlls. Below Invoke function of iDispatch is not returning the expected result. May be I didn't send the valid parameters. code is here, pls suggest the corrections:
_ATL_FUNC_INFO SheetCalculateInfo = { CC_CDECL, VT_EMPTY, 1, { VT_DISPATCH } };
BEGIN_SINK_MAP(ExcelBookEventHandler)
SINK_ENTRY_INFO(1, __uuidof(Excel::WorkbookEvents), 0x0000061b, &ExcelBookEventHandler::SheetCalculate, &SheetCalculateInfo)
END_SINK_MAP()
void _stdcall SheetCalculate(IDispatch *iDispatch)
{
static DISPID dispid = 0;
wchar_t *ucName = L"Calculate";
HRESULT result = iDispatch->GetIDsOfNames(IID_NULL, &ucName, 1,LOCALE_SYSTEM_DEFAULT, &dispid);
DISPID dispidMethod;
DISPPARAMS dispparms;
VARIANTARG varg[1];
VARIANT vResult;
EXCEPINFO excep;
VariantInit(&varg[0]);
VariantInit(&vResult);
// Setup parameters
dispparms.rgvarg = varg;
dispparms.rgdispidNamedArgs = NULL;
dispparms.cArgs = 1;
dispparms.cNamedArgs = 0;
varg[0].vt = VT_I4 ;
varg[0].lVal = dwParameter;
hr = pdispObj->Invoke(dispidMethod, IID_NULL,
LOCALE_USER_DEFAULT,
DISPATCH_METHOD, &dispparms, &vResult,
&excep, NULL);
dwResult = vResult.lVal;
}
Above SheetCalculate function gets fired whenever there is change in function(like =sum(A1,A2)) result. My aim is to get the function result value. I'm expecting function result in dwResult variable. But couldn't able to get that. Please guide me to read the function result. Thanks in advance.
|
|
|
|
|
Hey Guys
I'm developing basic apps for Windows Mobile 6 Professional devices and I need to access the vibration feature of the handhelds, but it is written that the vibrate library is not available for WM6 Pro! How would I be able to use the Vibrate in Native C++??
Some code would also be appreciated if possible.
|
|
|
|
|
Please ask it in the Mobile Development[^] forum. This forum is exclusively for C/C++/MFC questions.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
how to draw line by dragging mouse inside rectangle in dialog based application in vc++,mfc
|
|
|
|
|
Handling mouse events end using graphic primitives, I suppose. What is your problem about?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
the rectangle have top,left,width,height four parameters.
If the first point or the end, is more than width or height.
you can change the rectangle's width(height).Because is the max.
|
|
|
|
|
wangningyu wrote: the rectangle have top,left,width,height four parameters.
If the first point or the end, is more than width or height.
you can change the rectangle's width(height).Because is the max.
?!?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'want to use VC6 ,to load some URL Image picture,and show it into the Picture Control of VC.
the Url like this one : http://passport.csdn.net/ShowExPwd.aspx.
Now I have no idea, who can help me please ?
Best Regards !
|
|
|
|
|
1/ The url you point to is not an image - it's a web page.
2/ Assuming you make a URL that actually points to an image, you could use:
InternetOpenUrl, InternetReadFile, etc.
That should give you some search terms to get started.
3/ Bear in mind that getting stuff from the internet is by its very nature flaky. Do this fetching in a seperate thread, have something to display while you're waiting, and make sure you handle failure very thoroughly.
Good luck!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi, i am trying to convert const wchar* to const byte*. but its not converting fully...can anyone help me out to solve this issue...
-------------------------------------
code snippet:
const WCHAR* test = L"hello";
const BYTE* test1 = (const BYTE*) test;
AfxMessageBox((CString)test1);
----------------------------------------------
thanks,
rakesh
|
|
|
|
|
Rakesh5 wrote: const WCHAR* test = L"hello";
const BYTE* test1 = (const BYTE*) test;
AfxMessageBox((CString)test1);
What are you trying to do in fact ? It seems you are a bit lost with the different character encoding, so I'm going to suggest this excellent article[^], you'll get a much better understanding after having read it.
|
|
|
|
|
Why do you need such a conversion?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i want to check whether its possible to do like that.. am learning vc++ now...that is why asked ..
if it is possible, pls enlighten me how to do that one..
thanks,
rakesh
|
|
|
|
|
Carlo asked you what would you be doing with the const BYTE buffer after such a "conversion".
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Your code performs the conversion (i.e. the cast) of the pointer, not of the string. In other words the string buffer remains unchanged, it is just interpreted diffently.
Since that maybe fine or maybe a plain catastrophe, I need to know what is the purpose of your 'conversion'.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: I need to know what is the purpose of your 'conversion'.
Just noticed t hat we both have put that word in quotes. Fits the context perfectly. Subtly expressing something, ya know.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|