README.md

December 5, 2022 ยท View on GitHub

Process Priority Changer

Description

This code is designed to change the priority of processes that are running on a windows machine. I had to write it for our company, which was having problems with Oracle processes taking over the server...this program was designed to change these processes to Low priority.

More Info

You should be familiar with using the Win32 API functions to understand how the code works. Also, knowing about the listview and timer controls will help.

Submitted On2001-08-16 16:01:38
ByBrandon Kampschuur
LevelIntermediate
User Rating5.0 (35 globes from 7 users)
CompatibilityVB 6.0
CategoryWindows System Services
WorldVisual Basic
Archive FileProcess Pr247858162001.zip

API Declarations

These are the API functions used:
Public Declare Function SetPriorityClass Lib "kernel32" (ByVal hProcess As Long, ByVal dwPriorityClass As Long) As Long
Public Declare Function GetPriorityClass Lib "kernel32" (ByVal hProcess As Long) As Long
Public Declare Function GetCurrentProcess Lib "kernel32" () As Long
Public Declare Function CloseHandle Lib "Kernel32.dll" (ByVal Handle As Long) As Long
Public Declare Function OpenProcess Lib "Kernel32.dll" (ByVal dwDesiredAccessas As Long, ByVal bInheritHandle As Long, ByVal dwProcId As Long) As Long
Public Declare Function EnumProcesses Lib "psapi.dll" (ByRef lpidProcess As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
Public Declare Function GetModuleFileNameExA Lib "psapi.dll" (ByVal hProcess As Long, ByVal hModule As Long, ByVal ModuleName As String, ByVal nSize As Long) As Long
Public Declare Function EnumProcessModules Lib "psapi.dll" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
Public Declare Function GetLastError Lib "kernel32" () As Long