Desktop Functions: Smart Device Functions:
|
SetPriorityClass (kernel32)
VB Signature:
<Runtime.InteropServices.DllImport("kernel32.dll", CharSet:=Runtime.InteropServices.CharSet.Auto, CallingConvention:=Runtime.InteropServices.CallingConvention.StdCall)> _ <Runtime.InteropServices.DllImport("kernel32.dll", CharSet:=Runtime.InteropServices.CharSet.Auto, CallingConvention:=Runtime.InteropServices.CallingConvention.StdCall)> _
Public Shared Function SetPriorityClass( _ C# Signature:
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)] [DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool SetPriorityClass(IntPtr handle, uint priorityClass); User-Defined Types:
Public Enum PriorityClass Public Enum PriorityClass
ABOVE_NORMAL_PRIORITY_CLASS = &H8000 End Enum Notes:VB no warnings with option strict = on. Tips & Tricks:Please add some! Sample Code:
SetPriorityClass(mhHwnd, CType(20, System.IntPtr)) '20 = high !! SetPriorityClass(mhHwnd, CType(20, System.IntPtr)) '20 = high !!
SetPriorityClass(Process.GetCurrentProcess.Handle, PriorityClass.PROCESS_MODE_BACKGROUND_BEGIN) SetPriorityClass(Process.GetCurrentProcess.Handle, PriorityClass.PROCESS_MODE_BACKGROUND_BEGIN) Alternative Managed API:System.Diagnostics.Process.PriorityClass (Does not provide PROCESS_MODE_BACKGROUND options) Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|