Copies a portion of the command buffer in the DBPROCESS structure to a specified memory location.
RETCODE dbstrcpy (
PDBPROCESS dbproc,
INT start,
INT numbytes,
LPSTR dest );
where
numbytes setting | Result |
---|---|
< 0 | dbstrcpy copies the entire command buffer. It is legal to copy 0 bytes. |
= 0 | A null terminator is inserted at dest[0]. |
> 0 | dbstrcpy copies the number of bytes available and returns SUCCEED. |
SUCCEED or FAIL. FAIL is returned if start is a negative number.
The copy is null-terminated. The dbstrcpy function assumes that the destination string is large enough to receive the source string. If not, unexpected errors may occur.
Internally, the command buffer is a linked list of non-terminated text strings. Parts of the command buffer can be located and copied using the dbgetchar, dbstrcpy, and dbstrlen functions.
dbcmd, dbfcmd, dbfreebuf, dbgetchar, dbstrlen