xfInitialize

#include <fte.h>

DWORD WINAPI xfInitialize(lphSession, dwVersion, lpAppID, NotifyProc, dwFlags)
LPHSESSION
lphSession; /* pointer to handle of session that was initialized */
DWORD
dwVersion; /* version of file transfer API used to build application */
LPCUUID
lpAppID; /* pointer to application ID of application to use */
XFNOTIFYPROC
lpfnNotifyProc; /* pointer to callback function for event handling */
DWORD
dwFlags; /* specifies initialization options */

The xfInitialize function indicates that an application is ready to transfer files.

Parameters

lphSession

Identifies the session returned by the initialization call for use in subsequent calls involving the application ID.

dwVersion

Identifies the version of the file transfer API used to build the application.

lpAppID

Identifies an application ID that the calling application supports. The application ID should be previously registered for the calling application. If not specified, an error occurs.

lpfnNotifyProc

Identifies the routine to call when an event occurs that needs application action.

dwFlags

Specifies properties of the calling application. It has the following value:

Value

Meaning

XF_DEFAULT

Make the calling application the default file transfer application.


Return Value

The return value specifies the result of the termination request. It can be any one of the values list in section 2.2.4. File Transfer Errors.

Comments

Call xfInitialize before all other file transfer API calls other than xfGetVersion and xfRegister. If the calling application supports multiple application IDs, call xfInitialize to create a session for each of the supported application IDs.

Once a session is created for a specific application ID by calling the xfInitialize function, the session must be terminated with a call to the xfUninitialize function before calling the xfInitialize function again for the same application ID.

When building the calling application, use the value of the XF_VERSION constant from the FTE.H include file to set the value of dwVersion. This allows the file transfer engine to check for compatibility with the function calls of the calling application. If the calling application supports multiple versions of the file transfer engine, use the xfGetVersion function return value to determine the version of the engine. This allows the calling application to check for compatibility.

See Also

xfGetVersion, xfUninitialize, xfRegister, xfNotifyProc