Just to clarify ;) you all know that these functions are already shipped with Blitzmax?
If not, then take a look to the pub.win32 module. this module already gives you everything you need (structs and functions) for these things.
If not, then take a look to the pub.win32 module. this module already gives you everything you need (structs and functions) for these things.