Platform SDK: Fax Services

FaxRegisterServiceProvider

The FaxRegisterServiceProvider function registers a fax service provider dynamic-link library (DLL) with the fax service. The function configures the fax service registry to query and use the new fax service provider DLL when the fax service restarts.

Because the FaxRegisterServiceProvider function modifies the registry, the user, generally a system administrator, must have write access to the HKEY_LOCAL_MACHINE registry key.

BOOL WINAPI FaxRegisterServiceProvider(
  LPCWSTR DeviceProvider,  // fax service provider DLL name
  LPCWSTR FriendlyName,    // fax service provider user-friendly name
  LPCWSTR ImageName,       // path to fax service provider DLL
  LPCWSTR TspName          // telephony service provider name
);

Parameters

DeviceProvider
[in] Pointer to a constant null-terminated Unicode character string that specifies the internal name of the fax service provider DLL to register.
FriendlyName
[in] Pointer to a constant null-terminated Unicode character string to associate with the fax service provider DLL. This is the fax service provider's user-friendly name, suitable for display.
ImageName
[in] Pointer to a constant null-terminated Unicode character string that specifies the full path and file name for the fax service provider DLL. The path can include valid environment variables, for example, %SYSTEMDRIVE% and %SYSTEMROOT%.
TspName
[in] Pointer to a constant null-terminated Unicode character string that specifies the name of the telephony service provider associated with the devices for the fax service provider.

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 the following error.

Error code Description
ERROR_INVALID_PARAMETER At least one parameter to the FaxRegisterServiceProvider function is NULL.

Remarks

All parameters to the FaxRegisterServiceProvider function are required.

Local installation of a fax service provider is recommended. The local installation routine for a fax service provider DLL can call FaxRegisterServiceProvider instead of directly accessing the registry. For more information about the steps required to register locally with the fax service, see Local Registration of a Fax Service Provider.

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