gpGetFileName

GameSpy SDK

gpGetFileName

This function is used to get the name of a file.

GPResult gpGetFileName(
GPConnection * connection,
GPTransfer transfer,
int index,
gsi_char ** name );
RoutineRequired HeaderDistribution
gpGetFileName<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.
name
[out] The name of the file.

Remarks

This function is used to get the name of a file in the transfer. The receiver should use this name to determine where to put the file after it is received. It may be a simple name ("file.ext"), or it may contain a directory path ("files/file.ext"). Any slashes in the name will be UNIX-style slashes ("files/file.ext") as opposed to Windows style slashes ("files\file.ext").

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
gpGetFileNamegpGetFileNameAgpGetFileNameW

gpGetFileNameW and gpGetFileNameA are UNICODE and ANSI mapped versions of gpGetFileName. The arguments of gpGetFileNameA are ANSI strings; those of gpGetFileNameW are wide-character strings.

Section Reference: Gamespy Presence SDK