The function returns the object pointer.
Note: this function is ony for backward compatibility. Do not use it in new projects.