SCGetUserInfo(3) Impressario SCGetUserInfo(3)NAMESCGetUserInfo - Get information about who is using a scanner
SYNOPSIS
#include <stdio.h>
#include <scanner.h>
int SCGetUserInfo(char *scanner, char **login, char **name,
char **hostName);
DESCRIPTIONSCGetUserInfo can be used after a call to SCOpen(3) has failed with
SCerrno set to EBUSY. SCGetUserInfo returns the login name and the real
name of the user who has the scanner open, and the host name of machine
on which the scanner is open.
if SCGetUserInfo is called at any time other than right after SCOpen has
failed with SCerrno set to EBUSY, information about the last person to
have used the scanner is returned.
RETURN VALUESCGetUserInfo returns 0 if it is successful, or -1 if there is an error.
In the event of an error, SCGetUserInfo sets SCerrno to indicate the
reason.
EXECUTION ERROR CODESSCGetUserInfo will fail under the following circumstances.
SCENOSCANNER No such scanner
SCENOSCANNERS No scanners are installed
SCENOMEM Out of memory
SCEDRVMSG Driver specific error. SCErrorString(3) will
return a custom message supplied by the scanner
driver
In addition, SCGetUserInfo may fail as the result of a failed system
call, in which case SCerrno will be set to a value from <sys/errno.h>.
SEE ALSOscanners(1M), libscan(3), SCClose(3), SCGetScanEnt(3).
Page 1