'KCMLGetConnectionName(sCommand$, nLen)

Get the name of the connection

Arguments

STR()sCommand$[out] String to copy the command into. Pass 0 instead of a string to determine the length of string required.
INT()nLen[in] Length of the string buffer.

Returns

The number of characters copied into sCommand, or the length of the command line string if sCommand is zero.

Syntax

The following definition is built into KCML. You do not have to include it in your own code.

$DECLARE 'KCMLGetConnectionName(RETURN STR(), INT())

Remarks

This function is used in bookmarking to allow the server to get the -C arguments from clients command line. The buffer passed must be large enough to hold the returned string otherwise the client may crash. It is permitted to pass 0 instead of a string buffer in order to get the length.

Example

DIM a$0
DIM len
REM By passing 0 for the string, we just get its length
len = 'KCMLCommandLine(0)
IF (len > 0)
   REM Knowing the length we can MAT REDIM 
   REM to exactly the size we need
   MAT REDIM a$len
   REM This time fetch the string into a$
   'KCMLCommandLine(STR(a$))
   PRINT "Command line is ",a$
END IF

Further Information

IntroducedKCML 5.00
CompatibilityKClient

See Also

KCMLCommandLine

Index of internal $DECLARE functions