
The Channel Definition Format (CDF) files allow content providers to determine which hits get logged for the items included in the CDF file. These logs are posted to the server during a scheduled update and cleared. This API allows developers to verify if hit logging is enabled and write customized entries in the log.
To use these functions, make sure the Urlmon.h header file is in the include directory, and the Urlmon.lib library file is in the library directory of the C/C++ compiler you use.
The logs that are created contain the URL of the resource, the browsing context, whether the information was viewed from the cache, date viewed, time that the viewing started, duration it was viewed, and the custom information. Only the browsing context (normal browser window, theater view, Active Desktop Item, or Microsoft Internet Exporer screen saver) cannot be set by the WriteHitLogging function.
For more information about logging, see the Page-Hit Logging and Client-Side Logging sections in the Creating Active Channels documentation.
The following section contains the functions used for hit logging.
BOOL IsLoggingEnabled
IN LPCTSTR pszUrl
);
Determines if hit logging is enabled for the specified Internet site.
BOOL WriteHitLogging(
IN LPHIT_LOGGING_INFO lpLogginginfo
);
Writes an entry into the log for the given resource.
| ERROR_FILE_NOT_FOUND | The URL was not located in the cache log index. |
| ERROR_NOT_ENOUGH_MEMORY | Insufficient memory is available in the cache to write this log. |
The following section contains the structure used for hit logging.
typedef struct _HIT_LOGGING_INFO (
DWORD dwStructSize;
LPSTR lpszLoggedUrlName;
SYSTEMTIME StartTime;
SYSTEMTIME EndTime;
LPSTR lpszExtendedInfo
) HIT_LOGGING_INFO, *LPHIT_LOGGING_INFO;
Contains the information to write into a hit log.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.