get next constant in the enum
enum_id - id of enum
bmask - bitmask of the constant
ordinary enums accept only -1 as a bitmask
value - value of the current constant
returns: value of a constant with value higher than the specified
value. -1 no such constants exist.
All constants are sorted by their values as unsigned longs.
long get_next_enum_member(long enum_id, long value, long bmask);