gpSetTransferDirectory

GameSpy SDK

gpSetTransferDirectory

This function can be used to set the directory that files are received into.

GPResult gpSetTransferDirectory(
GPConnection * connection,
GPTransfer transfer,
const gsi_char * directory );
RoutineRequired HeaderDistribution
gpSetTransferDirectory<gp.h>SDKZIP

Return Value

This function returns GP_NO_ERROR upon success. Otherwise a valid GPResult is returned.

Parameters

connection
[in] A GP connection interface.
transfer
[in] A pointer to a GPTransfer object.
directory
[in] The directory to store received files in. This must be the path to a directory, and it must end in a slash or backslash.

Remarks

This allows the application to set which directory received files are stored in. They will all be stored in this directory, with names randomly generated by GP. It is then up to the application to place the files in the appropriate directories with the appropriate names.
If no directory is set, a directory will be picked. On win32, the GetTempPath function is used to pick a directory. If the application wants to set a directory explicitly, it must call this function before accepting the transfer. The function will fail if it is called after the transfer has started.
This function only sets the directory for the specified transfer, and for no others.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
gpSetTransferDirectorygpSetTransferDirectoryAgpSetTransferDirectoryW

gpSetTransferDirectoryW and gpSetTransferDirectoryA are UNICODE and ANSI mapped versions of gpSetTransferDirectory. The arguments of gpSetTransferDirectoryA are ANSI strings; those of gpSetTransferDirectoryW are wide-character strings.

Section Reference: Gamespy Presence SDK