dbgetlusername

Description

Return the user name from a LOGINREC structure.

Syntax

int dbgetlusername(login, name_buffer, buffer_len)
 
LOGINREC    *login;
BYTE             *name_buffer;
int                    buffer_len;

Parameters

login

A pointer to a LOGINREC structure, which can be passed as an argument to dbopen. You can get a LOGINREC structure by calling dblogin.

name_buffer

A pointer to a buffer. The user name will be copied from the LOGINREC structure to this buffer.

buffer_len

The length, in bytes, of the destination buffer.

Returns

The number of bytes copied into the destination buffer, not including the null-terminator.

If the user name is more than buffer_len -1 bytes long, dbgetlusername copies buffer_len -1 bytes into the destination buffer and returns DBTRUNCATED.

dbgetlusername returns FAIL if login is NULL, name_buffer is NULL, or buffer_len is less than 0.

Usage

See also

dblogin, DBSETLUSER