adRegisterPosition

GameSpy SDK

adRegisterPosition

Registers the string name and default ad of a new position.

AdResult adRegisterPosition(
AdInterfacePtr theInterface,
const char* thePositionName,
AdUnitID theDefaultAdId,
const char* theDefaultAdLocalResourceName,
const char* theDefaultAdExtraData );
RoutineRequired HeaderDistribution
adRegisterPosition<ad.h>SDKZIP

Return Value

This function returns AdResult_NO_ERROR upon success. Otherwise a valid AdResult error condition is returned. (see remarks)

Parameters

theInterface
[in] SDK interface previously initialized using adInitialize
thePositionName
[in] String name of the position registered through the web interface.
theDefaultAdId
[in] AdID for tracking usage statistics.
theDefaultAdLocalResourceName
[in] Filename for the advertisement
theDefaultAdExtraData
[in] Developer defined data to be used client side only.

Remarks

The string name of the position must match the name created using the Ad Portal web interface. The default ad information will be returned by the SDK if no other advertisement is available. Default advertisements should use a registered AdID for reporting. This will allow the SDK to report "missed" usage opportunities.