Derived from: None
Declared in: GlobalFuncs.h
It's not all functions that can be collected into a class. These functions are then made as global functions, which can be called everywhere in your program.
ConvertOSError()
uint32 ConvertOSError(uint32 osError);
This function will convert an OS specific error code to a PolyKit error code. The argument is the OS specific error code, which is different on each platform. The returned value is a PolyKit error code.
GetErrorString()
PString GetErrorString(uint32 error);
If you want a readable string from a PolyKit error code, you can call this function. You give in as the argument a PolyKit error code and you will get a readable string returned.
GetOSVersion()
POperativeSystem GetOSVersion(void); throw(PSystemException);
This function returns the version of the operative system. If your program for example is running under Windows, this function can be used to identify if you are running Windows 9x or Windows NT/2000. The function can return one of these values: pWindows95, pWindows98, pWindowsNT, pWindows2000, pBeOS, or pLinux.
void PlayBeep(void);
Will play the system beep sound.
uint32 Random(uint32 max);
If you need a random number, this is the function for you. This function will return a random number between 0 and max, both inclusive. It's not a very simple random generator, so it's very good to create random numbers, so use it :)