cfunc.logon

C Function/C Functions, Releases: AP 6.1

Pick/BASIC 'match' functionality from C.

Syntax

int _CP_logon(CPSTR* machine, CPSTR* user, CPSTR* u_passwd, CPSTR* md, CPSTR* md_passwd, int pib, int flags);

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.

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);

See Also

Command Name Type Description
cfunc.introduction Introductory Overview

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.