Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 6th, 2006, 12:46 PM   #1
Frenchy
Newbie
 
Join Date: Aug 2004
Posts: 10
Rep Power: 0 Frenchy is on a distinguished road
Question API SetPriorityClass

Hi, sorry for my por english, hope you'll understand..

I am using this API (with XP) to modify the priority of a process (all is okay)
except when i am using the compatible mode (WIN98)..this API doesnt send an error all seems okay but in fact nothings is done no priority modification applyed..

TO do that i have to go in taskmanager and modify manually the priority..

is there a way to change the priority of a process even if this process is in mode compatible WIN98??
Frenchy is offline   Reply With Quote
Old Apr 6th, 2006, 1:06 PM   #2
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
This says that only 2 values are not supported, ABOVE_NORMAL_PRIORITY_CLASS and BELOW_NORMAL_PRIORITY_CLASS.
Just skip them and go to HIGH_PRIORITY_CLASS or IDLE_PRIORITY_CLASS.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Apr 6th, 2006, 1:27 PM   #3
Frenchy
Newbie
 
Join Date: Aug 2004
Posts: 10
Rep Power: 0 Frenchy is on a distinguished road
sorry nnxion, i have read the msdn you misunderstand me ..i am using the HIGH priority
what i say is: when we are using the mode compatible, we cant change the priority , the normal priority is always applied, even the API SetPriorityClass is used, no error , but no effect..only manual change in taskmanager..
What i ask: is it possible to change the priority of process by program , process which is launched in compatible mode?
Frenchy is offline   Reply With Quote
Old Apr 6th, 2006, 1:31 PM   #4
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Oh you mean Windows XP compatible mode, I don't know about that. Why do you need it to work at compatible mode?
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Apr 6th, 2006, 1:43 PM   #5
Frenchy
Newbie
 
Join Date: Aug 2004
Posts: 10
Rep Power: 0 Frenchy is on a distinguished road
i am working on old game Jane's F18, i have done some modification on this program and with a Dll written in C++ i had to change the priority from normal to high , i use this API all seems okay except in Windows XP compatible mode. This mode is used on some computers..dunno why some use the program without compatiblity mode and others have to use the compatibility mode..informatic mysterious
Frenchy is offline   Reply With Quote
Old Apr 6th, 2006, 4:20 PM   #6
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Another windows API problem that has nothing to do with C++.

The following is based on something I read somewhere, but I can't find the source right now.

If an application has to be run in compatibility mode, odds are it is uses some features that were supported by 98 (if that's being emulated) and are not by XP. Or the application does things that, if allowed unfettered, can affect system stability. Compatibility mode therefore filters out some API calls which have potential to amplify the effects of other actions with potential to affect system stability. Changes of process priority or priority class to high or realtime priority classes are in that category.

My suggestion is that you tell the users not to run your application under compatibility mode.
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:42 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC