The aftp_extract_password call extracts the password specified for the connection to the AFTP server. If the aftp_set_password call has not been invoked, the AFTP default password value is returned.
AFTP_ENTRY aftp_extract_password(
IN AFTP_HANDLE_TYPE connection_id,
OUT unsigned char AFTP_PTR password,
IN AFTP_LENGTH_TYPE password_size,
OUT AFTP_LENGTH_TYPE AFTP_PTR returned_length,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR return_code
);
Use the AFTP_PASSWORD_SIZE constant to define the length of this buffer. Add 1 to the size if you want to be able to add a null terminator to the text in the buffer.
{
    AFTP_HANDLE_TYPE               connection_id;
    AFTP_RETURN_CODE_TYPE          aftp_rc;
    unsigned char                  password[AFTP_PASSWORD_SIZE+1];
    AFTP_LENGTH_TYPE               returned_length;
    /*
     * Before issuing the example call, you must have:
     *    a connection_id, use:  aftp_create()
     */
    /*
     * Extract the password for AFTP.
     */
    aftp_extract_password(
        connection_id,
        password,
        (AFTP_LENGTH_TYPE)sizeof(password)-1,
        &returned_length,
        &aftp_rc);
    if (aftp_rc != AFTP_RC_OK) {
        fprintf(stderr, "Error extracting AFTP password.\n");
    }
}
 None.