<< Back


pfnLogText

Synopsis

void (CALLBACK* pfnLogText) (FVSDK_CALLBACK_DATA pvLogTextData, UINT nType, LPCTSTR pszText);

Description

Called when a command is sent, a reply is received, an error has occured, or status information has been received. This function is called when data is available for a log. For reference, see the log pane in FTP Voyager.

Parameters

pvLogTextData

The DWORD value set in the FVSDK_Session structure. The meaning of this value is application defined.

nType

Value identifying the type of text. The following are defined in FVSDK_Session.h.
FVSDK_COMMAND_LOG_TYPE command sent to the FTP server
FVSDK_RESPONSE_LOG_TYPE response received from the server in response to a command
FVSDK_UNSOLICITED_LOG_TYPE unsolicited response received from server, not a response to a command
FVSDK_STATUS_LOG_TYPE informational status generated by FTP Voyager SDK
FVSDK_ERROR_LOG_TYPE informational error message generated by FTP Voyager SDK

pszText

A NULL terminated string containing the log text.

Return Value

None

Example

void CALLBACK OnLogText(FVSDK_CALLBACK_DATA pvLogTextData, UINT nType, LPCTSTR pszText)
{
    // if we have a pointer to the control, do the actual callback
    if (pvLogTextData) {

        // log the text to the rich edit control
        ((CFVSDKLogList *) pvLogTextData)->LogText(nType, pszText);
    } // if
} // OnLogText