How to use Set Task-Application Priority

Blitz3D Forums/Blitz3D Beginners Area/How to use Set Task-Application Priority

fox95871(Posted 2010) [#1]
http://www.blitzbasic.com/codearcs/codearcs.php?code=2363

Hi, could someone please tell me how to use this? I have no idea. Is it a .dll? Am I supposed to compile it? Sorry if the answer's obvious, but I am still a beginner.

Last edited 2010


jfk EO-11110(Posted 2010) [#2]
It's a userlib declaration. You have to create a file named kernel32.decls inside the "userlibs" folder. There you have to insert the declarations:

.lib "kernel32.dll"

GetCurrentProcess%() :"GetCurrentProcess"
GetCurrentThread%() :"GetCurrentThread"
GetPriorityClass%() :"GetPriorityClass"
GetThreadPriority%() :"GetThreadPriority"
SetPriorityClass%(Process%, Value%) :"SetPriorityClass"
SetThreadPriority%(Process%, Value%):"SetThreadPriority"

Save it and restart Blitz3D.

These commands can now be used in Blitz (they are System Functions, stored in the kernel32.dll). You can do that with most DLL Functions, esp. those of the system, eg. Kernel32, User32 etc.

The rest of the Source must then be executed within Blitz.

Last edited 2010


fox95871(Posted 2010) [#3]
Got it, thank you. I did something like that before with BlitzODE. I should be able to figure the rest out on my own now.

Last edited 2010