adBeginTrackUsageTime
Begins time-based usage tracking for the specified unit.
- AdResult adBeginTrackUsageTime(
- AdInterfacePtr theInterface,
- const char * thePositionName,
- AdUsageCategory theCat );
Routine | Required Header | Distribution |
---|---|---|
adBeginTrackUsageTime | <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 with adRegisterPosition
- theCat
- [in] UC_VIEWS or UC_INTERACTIONS
Remarks
This function will mark the specified position as "in use" until adEndTrackUsageTime is called. Two separate metrics are provided, UC_VIEWS and UC_INTERACTIONS. These may be used to track arbitrarily different types of usage on the same object.
For example, a branded gun that is visible may be tracked using UC_VIEWS. A branded gun that is fired may be tracked using UC_INTERACTIONS.
Please note that a single Ad may appear in multiple positions. Multiple calls to adBeginTrackUsageTime will be ignored. In other words, the same image appearing in two different locations will result in one time measurement.
This function may return:
AdResult_NO_ERROR
AdResult_INVALID_PARAMETERS
AdResult_POSITION_NOT_FOUND
AdResult_UNIT_NOT_FOUND.
Section Reference: Gamespy Advertising SDK
See Also: adEndTrackUsageTime, adIncrementUsageCount