Thread: compiler setting c++ so .exe runs at low priority

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    8

    compiler setting c++ so .exe runs at low priority

    hello,

    i m trying to have the compiled .exe program always run automatically at a low priority level (without going every time to the windows task manager).

    i m using msvc++ .net, and i was wondering how/where to set this priority option in the compiler.

    thanks!
    -yves-

  2. #2
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    You have to do it via code.

    Code:
    #include <windows.h>
    SetPriorityClass( GetCurrentProcess(), IDLE_PRIORITY_CLASS );

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    8
    that worked immediately, great help!
    thanks a lot,

    -yves-

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. some help setting up borland compiler please
    By shinra12 in forum C++ Programming
    Replies: 5
    Last Post: 09-12-2005, 06:41 AM
  3. OpenScript2.0 Compiler
    By jverkoey in forum C++ Programming
    Replies: 3
    Last Post: 10-30-2003, 01:52 PM
  4. Setting up directx 8.0 sdk with Borland command-line compiler
    By ganonl in forum Windows Programming
    Replies: 0
    Last Post: 08-06-2003, 05:16 PM
  5. Replies: 5
    Last Post: 08-05-2002, 07:14 PM