Changed the return value of 'SetHandle' to an integer.