_CP_logon

_CP_logon


_CP_lock Index Level _CP_match
Syntax int _CP_logon(CPSTR* machine, CPSTR* user, CPSTR* u_passwd, CPSTR* md, CPSTR* md_passwd, int pib, int flags);
Category C Interface
Type C Function
Description logs into Pick from a C main program.
This function must be called prior to any other function. The parameters used are the following:

machine
 Pick virtual machine

user
 Pick user

u_passwd
  Pick user password

md
 Pick master dictionary

md_passwd
 Pick master dictionary password

pib
 Requested pib or -1 for first available

flags
 Reserved field - always pass a 0

This function returns -1 if an error occurs. The error code is contained in _CP_errno.
Options
See Also C Functions introduction
Example The following example logs into Pick as the "dm" user in the "dm" account.  It assumes that no passwords are present.

CPSTR * machine = _CP_mkstr("pick0");
CPSTR * user = _CP_mkstr("dm");
CPSTR * md = _CP_mkstr("dm");
int r;

r=_CP_logon(machine,user,_CP_str_null,md,_CP_str_null,-1,0);
Warnings
Compatibility AP 6.1
_CP_lock Index Level _CP_match