FaxSetLoggingCategoriesA function (winfax.h)

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.

Syntax

WINFAXAPI BOOL FaxSetLoggingCategoriesA(
  [in] HANDLE                  FaxHandle,
  [in] const FAX_LOG_CATEGORYA *Categories,
  [in] DWORD                   NumberCategories
);

Parameters

[in] FaxHandle

Type: HANDLE

Specifies a fax server handle returned by a call to the FaxConnectFaxServer function.

[in] Categories

Type: const FAX_LOG_CATEGORY*

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.

[in] NumberCategories

Type: DWORD

Specifies a DWORD variable that contains the number of FAX_LOG_CATEGORY structures the function passes in the Categories parameter.

Return value

Type: BOOL

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.

Return code Description
ERROR_INVALID_PARAMETER
One or all of the FaxHandle, Categories, or NumberCategories parameters are invalid or NULL.
ERROR_INVALID_PARAMETER
The FaxHandle parameter is NULL; or the hWnd parameter is specified but the FaxHandle parameter does not specify a connection with a local fax server; or the MessageStart parameter specifies a message in the range below WM_USER.
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, a Microsoft Management Console (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.

Note

The winfax.h header defines FaxSetLoggingCategories as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winfax.h
Library WinFax.lib

See also

FAX_LOG_CATEGORY

Fax Service Client API Functions

Fax Service Client API for Windows 2000

FaxConnectFaxServer

FaxGetLoggingCategories