The function returns the following error codes:
>0 ... everything is OK -1 ... the specified class number does not exist