Platform SDK: Fax Services

FaxSetLoggingCategories

A fax client application calls the FaxSetLoggingCategories function to modify the current logging categories for the fax server to which the client has connected. A logging category determines the errors or other events the fax server records in the application event log.

BOOL WINAPI FaxSetLoggingCategories(
  HANDLE FaxHandle,              // handle to the fax server
  CONST FAX_LOG_CATEGORY *Categories, 
                                 // new logging categories data
  DWORD NumberCategories         // number of category structures
);

Parameters

FaxHandle
[in] Specifies a fax server handle returned by a call to the FaxConnectFaxServer function.
Categories
[in] Pointer to an array of FAX_LOG_CATEGORY structures. Each structure contains the data to modify one logging category. The data includes the descriptive name of the logging category, the category number, and the current logging level for the category. For a description of predefined logging categories and logging levels, see the FAX_LOG_CATEGORY topic.
NumberCategories
[in] Specifies a DWORD variable that contains the number of FAX_LOG_CATEGORY structures the function passes in the Categories parameter.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError can return one of the following errors.

Error code Description
ERROR_INVALID_PARAMETER One or all of the FaxHandle, Categories, or NumberCategories parameters are invalid or NULL.
ERROR_ACCESS_DENIED Access is denied. FAX_CONFIG_SET access is required.
ERROR_NOT_ENOUGH_MEMORY An error occurred during memory allocation.

Remarks

The fax service administration application, an MMC snap-in component, typically calls the FaxSetLoggingCategories function to modify the current logging categories and logging levels for a fax server. To query the categories and levels, an application can call the FaxGetLoggingCategories function. For more information, see Managing Logging Categories.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable with BackOffice Small Business Server.
  Header: Declared in Winfax.h.
  Library: Included as a resource in Winfax.dll.
  Unicode: Implemented as Unicode and ANSI versions on all platforms.

See Also

Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxConnectFaxServer, FaxGetLoggingCategories, FAX_LOG_CATEGORY