Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Handling Task priority in turbo C

Status
Not open for further replies.

thangaduraibeece

Junior Member level 2
Joined
Jul 4, 2008
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,419
setting task priority c program

Hi,
I've a c program and i want to run it in Windows OS at higher priority.So when i come across various forums and net resource, there s a possiblity to do task priority handling for our own C program exe file.Could anyone help me on this?
 

Go to a task manager -> process and set higher priority.
 

Hi Thanks for the reply.I tried it and it is working.Is it possible to set the priority from the C program itself by accessing the Windows Os Task Manager from the c program for which i have to set the priority.

Regards,Thangadurai.A
 

You could create new project and start your application in thread and set thread priority ...

I dont remember about threads in C, but with MFC (Microsoft C++ framework) you can easily create thread and set thread priority ...

something like:
Code:
CWinThread *pThread = AfxBeginThread(MyThreadFunc, NULL,
THREAD_PRIORITY_HIGH,0,this);

UINT MyThreadFunc(LPVOID lParam)
{
ShellExecute (lParam->hwnd, "open", application.exe, NULL, NULL, SW_SHOW);
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top