You're right about the second argument. A view is expected there, not a vector. My bad. Sorry about this. The if clause will modify your temp vector. I don't know if this helps. Post the rest of your code and please describe what "not working" means to you...
EDIT: You can use the CLIPPED flag as widi suggested, but this is not very precise. An object might not be visible on the screen but be clippped anyways.