Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, degenerate_762), 907 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
set the Systempriority? #436174
01/21/14 00:56
01/21/14 00:56
Joined: Jun 2008
Posts: 156
B
Bastiuscha Offline OP
Member
Bastiuscha  Offline OP
Member
B

Joined: Jun 2008
Posts: 156
Hi,

can i set the Systempriority in my Code? At examble: in the Task Manager, under "Processes" i can set the acknex.exe to realtime priority with (right Mouseclick on the acknex.exe). Is there a way to set the same in the Code? I write a small Console, that have to run with full power too, if the Programm is only in the Taskbar.

Another Question: run the Acknex Engine on 4 CPU Cores?

Much Thanks!

Re: set the Systempriority? [Re: Bastiuscha] #436236
01/22/14 01:58
01/22/14 01:58
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
This is in the wrong thread.
Sorry I'm not much more help than that.


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: set the Systempriority? [Re: Bastiuscha] #436493
01/27/14 23:41
01/27/14 23:41
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Originally Posted By: Bastiuscha
...Is there a way to set the same in the Code?...

Yes, check the API SetPriorityClass function.

By the way, my Acknex Engine runs on 4 cores, 8 logical processors.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: set the Systempriority? [Re: rojart] #436781
02/02/14 06:01
02/02/14 06:01
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Because this should be a contribution and i found in windows.h small bug, here is the working code:

Code:
#include <acknex.h>

#define REALTIME_PRIORITY_CLASS 0x100
#define HIGH_PRIORITY_CLASS 0x80
#define ABOVE_NORMAL_PRIORITY_CLASS	0x8000
#define NORMAL_PRIORITY_CLASS 0x20
#define BELOW_NORMAL_PRIORITY_CLASS	0x4000
#define IDLE_PRIORITY_CLASS 0x40

long __stdcall SetPriorityClass(long hProcess,long dwPriorityClass);
long __stdcall GetCurrentProcess(void); // Bug! windows.h has wrong syntax GetCurrentProcess(long);

API(SetPriorityClass,kernel32)
API(GetCurrentProcess,kernel32)

void Set_Priority_Class_startup()
{
	SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
}



Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: set the Systempriority? [Re: rojart] #436875
02/04/14 16:36
02/04/14 16:36
Joined: Jun 2008
Posts: 156
B
Bastiuscha Offline OP
Member
Bastiuscha  Offline OP
Member
B

Joined: Jun 2008
Posts: 156
MUCH MUCH THANKS MAN!!!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1