Return the user name from a LOGINREC structure.
int dbgetlusername(login, name_buffer, buffer_len) LOGINREC *login; BYTE *name_buffer; int buffer_len;
A pointer to a LOGINREC structure, which can be passed as an argument to dbopen. You can get a LOGINREC structure by calling dblogin.
A pointer to a buffer. The user name will be copied from the LOGINREC structure to this buffer.
The length, in bytes, of the destination buffer.
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.
dbgetlusername copies the user name from LOGINREC structure into the name_buffer buffer.
To set the user name in a LOGINREC structure, use DBSETLUSER.
dbgetlusername copies a maximum of buffer_len -1 bytes, and null-terminates the user name string. Since the longest user name in a LOGINREC structure is DBMAXNAME bytes, an application will never need a destination buffer longer than DBMAXNAME +1 bytes.
If the user name is in the LOGINREC is longer than buffer_len -1 bytes, dbgetlusername truncates the name and returns DBTRUNCATED.