FaxGetConfigurationA function (winfax.h)

The FaxGetConfiguration function returns to a fax client application the global configuration settings for the fax server to which the client has connected. The data includes, among other items, retransmission, branding, archive and cover page settings; discount rate periods; and the status of the fax server queue.

Syntax

WINFAXAPI BOOL FaxGetConfigurationA(
  [in]  HANDLE              FaxHandle,
  [out] PFAX_CONFIGURATIONA *FaxConfig
);

Parameters

[in] FaxHandle

Type: HANDLE

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

[out] FaxConfig

Type: PFAX_CONFIGURATION*

Pointer to the address of a buffer to receive a FAX_CONFIGURATION structure. The structure contains the current configuration settings for the fax server. For information about memory allocation, see the following Remarks section.

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 both of the FaxConfig or FaxHandle parameters are NULL.
ERROR_ACCESS_DENIED
Access is denied. FAX_CONFIG_QUERY access is required.
ERROR_NOT_ENOUGH_MEMORY
An error occurred during memory allocation.

Remarks

A fax administration application typically calls the FaxGetConfiguration function to display the global configuration settings for the fax server. To change the configuration settings, call the FaxSetConfiguration function.

The FaxGetConfiguration function allocates the memory required for the FAX_CONFIGURATION buffer pointed to by the FaxConfig parameter. An application must call the FaxFreeBuffer function to deallocate the resources associated with this parameter.

For more information, see Fax Server Configuration Management and Freeing Fax Resources.

Note

The winfax.h header defines FaxGetConfiguration 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_CONFIGURATION

Fax Service Client API Functions

Fax Service Client API for Windows 2000

FaxConnectFaxServer

FaxFreeBuffer

FaxSetConfiguration