Modify ↓
#2765 closed Feature Request (Rejected)
Example proposal - _WinAPI_GetPriorityClass.au3
| Reported by: | mLipok | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | Documentation | |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
#include <MsgBoxConstants.au3>
#include <WinAPIProc.au3>
#include <APIProcConstants.au3>
Example()
Func Example()
; run notepad
Run("notepad.exe")
Local $iPID = ProcessWait("notepad.exe")
; get Priority Description
Local $sPriorityDesc = Example_WinAPI_GetPriorityClass($iPID)
; show the message
If Not @error Then
MsgBox($MB_SYSTEMMODAL, Hex(@extended), $sPriorityDesc)
Else
MsgBox(0, "Failure", "_WinAPI_GetPriorityClass")
EndIf
; CleanUp
ProcessClose($iPID)
EndFunc ;==>Example
Func Example_WinAPI_GetPriorityClass($iPID)
; Check Priorrity
Local $Class = _WinAPI_GetPriorityClass($iPID)
If Not $Class Then
Return SetError(1)
EndIf
; setting return value
Switch $Class
Case $ABOVE_NORMAL_PRIORITY_CLASS
Return SetError(0, $ABOVE_NORMAL_PRIORITY_CLASS, "ABOVE_NORMAL_PRIORITY_CLASS")
Case $BELOW_NORMAL_PRIORITY_CLASS
Return SetError(0, $BELOW_NORMAL_PRIORITY_CLASS, "BELOW_NORMAL_PRIORITY_CLASS")
Case $HIGH_PRIORITY_CLASS
Return SetError(0, $HIGH_PRIORITY_CLASS, "HIGH_PRIORITY_CLASS")
Case $IDLE_PRIORITY_CLASS
Return SetError(0, $IDLE_PRIORITY_CLASS, "IDLE_PRIORITY_CLASS")
Case $NORMAL_PRIORITY_CLASS
Return SetError(0, $NORMAL_PRIORITY_CLASS, "NORMAL_PRIORITY_CLASS")
Case $REALTIME_PRIORITY_CLASS
Return SetError(0, $REALTIME_PRIORITY_CLASS, "REALTIME_PRIORITY_CLASS")
EndSwitch
EndFunc ;==>Example_WinAPI_GetPriorityClass
Attachments (1)
Change History (4)
by , 12 years ago
| Attachment: | _WinAPI_GetPriorityClass.au3 added |
|---|
comment:2 by , 12 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
comment:3 by , 12 years ago
comment:4 by , 12 years ago
Please review what has been said in the past for submitting examples to the help file. Thanks.
Note:
See TracTickets
for help on using tickets.

May I know why ?