gpGetFilePath

GameSpy SDK

gpGetFilePath

This function is used to get the local path to a file.

GPResult gpGetFilePath(
GPConnection * connection,
GPTransfer transfer,
int index,
gsi_char ** path );
RoutineRequired HeaderDistribution
gpGetFilePath<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.
index
[in] The index of the file within the GPTransfer object.
path
[in] The path of the file.

Remarks

This function is used to get the local path to a file. For the sender, this will be the same path specified in the gpSendFilesCallback. For the receiver, this will be NULL for directories and for files that haven’t started transferring yet. For files that have are either transferring or have finished transferring, this is the local path where the file is being stored. It is the application’s responsibility to move the file to an appropriate location (likely using the file’s name) after the file has finished transferring.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
gpGetFilePathgpGetFilePathAgpGetFilePathW

gpGetFilePathW and gpGetFilePathA are UNICODE and ANSI mapped versions of gpGetFilePath. The arguments of gpGetFilePathA are ANSI strings; those of gpGetFilePathW are wide-character strings.

Section Reference: Gamespy Presence SDK