FaxGetLoggingCategoriesA function (winfax.h)

The FaxGetLoggingCategories function returns to a fax client application 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 FaxGetLoggingCategoriesA(
  [in]  HANDLE             FaxHandle,
  [out] PFAX_LOG_CATEGORYA *Categories,
  [out] LPDWORD            NumberCategories
);

Parameters

[in] FaxHandle

Type: HANDLE

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

[out] Categories

Type: PFAX_LOG_CATEGORY*

Pointer to the address of a buffer to receive an array of FAX_LOG_CATEGORY structures. Each structure describes one current logging category. The data includes the descriptive name of the logging category, the category number, and the current logging level.

For a description of predefined logging categories and logging levels, see the FAX_LOG_CATEGORY topic. For information about memory allocation, see the following Remarks section.

[out] NumberCategories

Type: LPDWORD

Pointer to a DWORD variable to receive the number of FAX_LOG_CATEGORY structures the function returns 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_ACCESS_DENIED
Access is denied. FAX_CONFIG_QUERY access is required.
ERROR_INVALID_PARAMETER
One or all of the Categories, NumberCategories, or FaxHandle parameters are NULL.
ERROR_NOT_ENOUGH_MEMORY
An error occurred during memory allocation.

Remarks

A fax client application typically calls the FaxGetLoggingCategories function to query the current logging categories and logging levels for a fax server. To modify the current logging categories and levels, call the FaxSetLoggingCategories function.

The FaxGetLoggingCategories function allocates the memory required for the FAX_LOG_CATEGORY buffer array pointed to by the Categories parameter. An application must call the FaxFreeBuffer function to deallocate the resources associated with this parameter.

For more information, see Managing Logging Categories and Freeing Fax Resources.

Note

The winfax.h header defines FaxGetLoggingCategories as an alias that 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 is 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

FaxFreeBuffer

FaxSetLoggingCategories