Does anyone know if there is an API call that will determine if an NT or Win2K workstation is locked, in use (i.e. a user is logged in) or not in use (i.e. turned on, but nobody logged in)?

If such an api call exists, could you post the entire declare statement?!!? ...as well as any constants that I'd need

Thanks a million!!!
~Acoustic