Only library objects (including the Door library Object or ObjectArray) can see the return values of B4PObject(x) so the docs for the library will indicate what the value of x should be where x is :-
1: CRunner, the interpreter instance in the IDE, or b4p, the Basic4ppc class instance when compiled.
2: htControls, the hashtable containing all the controls and library objects in the application.
4: B4PDir, the path to the folder containing the application sbp or exe.
5: a Form, the main Form instance of the application.
6: an Exception, the last Exception caught by ErrorLabel.