xfRegister

#include <fte.h>

DWORD WINAPI xfRegister(lpAppID, lpFilename, dwFlags)
LPCUUID
lpAppID; /* pointer to application ID of application to register */
LPCSTR
lpFilename; /* pointer to application filename to register */
DWORD
dwFlags; /* flag that specifies registration options */

The xfRegister function registers an application with the file transfer engine. It associates an application ID with the specific application. It also determines whether to autolaunch the application, and if it is capable of handling default file transfers.

Parameters

lpAppID

Identifies an application ID that the application supports.

lpFilename

Identifies the filename of the application that supports file transfers for the specified application ID. This field can be NULL if the application doesn't autolaunch.

dwFlags

Specifies the registration options for the application. It can be one or more of the following values:

Value

Meaning

XF_AUTOLAUNCH

Automatically launch, if necessary, the application filename when receiving a file for the application ID.

XF_DEFAULT

Establish the application filename as the default file transfer application.

XF_REGISTER

Register support for the application ID for the application filename (default).

XF_UNREGISTER

Remove support for the application ID by the application filename.


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

Registration usually occurs when an application is installed. If registration specifies the XF_DEFAULT option, the application serves as the default file transfer application. That is, the application receives files for application IDs not registered with the engine and receives files for registered applications that don't autolaunch. The last application registered as the default file transfer application remains that until replaced. Therefore, some applications may register as the default file transfer application each time they are run to ensure their status as default.

If an application supports transfers for several application IDs, the application can be registered once for each supported application ID. However, only one application can be registered to receive files for a specific application ID.

An application may not be running at the time the engine receives a supported file. If the autolaunch option XF_AUTOLAUNCH is specified at registration, the engine automatically launches the application. If the autolaunch option is not specified, then the default file transfer application receives the file.

To change the registration options for an application, first call xfRegister with the XF_UNREGISTER option. Then call xfRegister with the logical or of the XF_REGISTER option and any new, desired options.

See Also

xfInitialize