|
|
Thanks and yes I am aware of the shutdown issue. I have applied this patch before and run through what they recommend. It still does not work consistantly. Would perfer a programable approach.
TomH
|
|
|
|
|
Ouenstreet wrote:
I also tried variations with EWX_FORCE, EWX_SHUTDOWN.
Did you terminate the Explorer process first?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
No I did not. and I don't know how to.
Thanks
TomH
TomH
|
|
|
|
|
See if this search helps.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
David,
Thanks. Found out how to close processes. I tried shutting down Explorer and then issued the reboot but it did not work. The system still goes to the "Shutting Down... " screen.. forever.
FYI
My order of execution is
Kill the Explorer
EWX_REBOOT
PostMessage(WM_CLOSE)
I am surprized that in all the years and problems with win98 not shutting down that someone hasn't developed a 'Hard Reset'.
If you can come up with anything else it would be great.
TomH
TomH
|
|
|
|
|
Ouenstreet wrote:
PostMessage(WM_CLOSE)
What window are you posting this message to (after ExitWindowsEx() has been called)?
Ouenstreet wrote:
If you can come up with anything else it would be great.
Do these machines shut down normally at all, or is it just when you try to do it programmatically?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Some background. I have 30 PCs in the field just a few don't restart programmatically or by Hand (Start, shutdown Restart).
Have tried all the troubleshooting on shutdown to fix.
Not sure about your other question.
The actual code reads:
kill_proc() ; // kill explorer process- added at you recommendation.
ExitWindowsEx(EWX_REBOOT,NULL);
PostMessage(WM_CLOSE,0,0);
TomH
|
|
|
|
|
Can anyone tell me how to disable the desktop properties (right click on desktop).
|
|
|
|
|
I don't know the answer ( well if there is a really easy way ) but you can try mouse hooks.
Well... I am a beginner ...
|
|
|
|
|
In the registry, set the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoDispCPL value to 1.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i have created sysutil for that,it will going to published on cp today so wait till tommorow
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I have two apps which communicate with each other via pipes. When I logged in as admin, I was able to run it fine, but as a standard user, I could not run it. The CreateFile call to the named pipe would generate an ACCESS_DENIED error. I changed the security attributes on the CreateNamedPipe that I used on the server side. I did SetSecurityDescriptorDacl. This fixed my app's pipe connect problem. However, it created a new one. The messages on the pipe look like garbage. The messages looked fine before the security fix. Any ideas? Do I need to set the security attributes of CreateFile too???
|
|
|
|
|
Hi there!!!
On my system, there is a folder which can be accessed by a specific user(e.g. auser) of my computer. Administrator group has full access rights on that folder too. The problem is I need to validate the access rights of "auser" on that folder through programming. but dont know the specific API to do that. following API can do it, but still not sure:
GetNamedSecurityInfo(...)
GetTokenInformation(...)
Using GetNamedSecurityInfo(...) API, I can get the DACL of that folder. But how can I determine which user has waht access rights on that folder????
Would appreciate any advice as how to go abt it or any code snippet.
Thanks in advance.
RM.
|
|
|
|
|
try using _access(...)
if (_access("\\\\myserver\\myfolder\\", 6) == 0)
{
}
0 Existence only
2 Write permission
4 Read permission
6 Read and write permission
|
|
|
|
|
Thanks for replying. but unfortunately it only validates a specific rights on a file or a directory, contrary to what I am looking for
If I can translate my problem in an statement, it would something like this:
"Check 'auser' has read rights on directory(myfolder)????"
where 'auser' is a local user on a computer.
RM.
|
|
|
|
|
i use CString to much i think, i've seen many people uses LPCSTR
am i losing much by using CString?
|
|
|
|
|
I don't think there's a huge performance loss when using CString; internally, it must be similar to using LPCSTR ( char* )é
For day to day operation, just the simpler usage of CString ( or std::string ) makes it up for the programmer at least.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
it depends on how you use it!
CString is realy OK, the only thing
you should do is, if you pass a CString
as a parameter, pass it as const CString&
and dont an a lot of small datachungs
to a CString in a loop
int n=0;
CString dummy;
while(n<10000) {
dummy+=(char)((n%30)+30);
++n;
}
|
|
|
|
|
I have an SDI application. The title bar text is:
FileName - AppName
My question is: how can I change AppName on the fly? I have a menu item to swtich between two options. I want the application title bar to reflect which option is currently selected. So I want the title bar text to be something as:
FileName - AppName option1
or
FileName - AppName option2
I searched MSDN, and found there is a function AfxGetAppName( ), but it is to get CWinApp.m_pszAppName. Is there a function to set the m_pszAppName?
Thank you very much for any hint.
|
|
|
|
|
Try SetWindowText()
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
Get it. CMainFrame.SetWindowText().
Thanks a lot!
|
|
|
|
|
AfxGetModuleState()->m_lpszCurrentAppName = L"title"
|
|
|
|
|
hello,
is there anyone that can help me :
how to send at command to modem (dial-up modem) through serial communication?
i've tried with some serial communication program, but it can't work.
|
|
|
|
|
mark182 wrote:
how to send at command to modem (dial-up modem) through serial communication?
So there are two major activities in your project.
1) Workiing with Serial Ports
2) Working with Modems
Which one do you want or need help with?
You might get more response to smaller more specific questions.
mark182 wrote:
but it can't work.
You must provide more specific information than that in order for someone to determine how to help.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|