The FaxObs_EnumRoutingMethods (Opnum 16) method is called by the client to enumerate all of the routing methods that are registered with the server for a specified port (device). The function returns detailed information about each enumerated routing method.
The client MUST set the FaxPortHandle parameter to a valid fax port handle value returned by the FaxObs_OpenPort (section 3.1.4.2.5) method.
In response, the server MUST validate that the client's fax user account has access to query configuration. The server MUST allocate memory for the routing information array to be returned to the client. On success, the server MUST fill the buffer with the routing information for the specified port, along with the buffer size and the number of enumerated methods.
The client SHOULD free the buffer.
error_status_t FaxObs_EnumRoutingMethods( [in] RPC_FAX_PORT_HANDLE FaxPortHandle, [in, out, unique, size_is(,*RoutingInfoBufferSize)] LPBYTE* RoutingInfoBuffer, [in, out] LPDWORD RoutingInfoBufferSize, [out] LPDWORD PortsReturned );
FaxPortHandle: An RPC context handle that references a fax port.
RoutingInfoBuffer: A pointer to the address of the returned buffer containing an array of FAX_ROUTING_METHOD (section 2.2.9) structures. Each structure contains information about one fax routing method.
RoutingInfoBufferSize: A variable to return the size, in bytes, of the routing method buffer.
PortsReturned: A pointer to a DWORD ([MS-DTYP] section 2.2.9) variable to receive the number of FAX_ROUTING_METHOD that are returned by the RoutingInfoBuffer parameter.
Return Values: This method MUST return 0x00000000 (ERROR_SUCCESS) for success; otherwise, it MUST return one of the following error codes, one of the fax-specific errors that are defined in section 2.2.52 or one of the other standard errors defined in [MS-ERREF] section 2.2.
|
Return value/code |
Description |
|---|---|
|
ERROR_INVALID_FUNCTION 0x00000001 |
There are no routing methods configured on the fax server for the fax port specified through the FaxPortHandle parameter. |
|
ERROR_ACCESS_DENIED 0x00000005 |
Access is denied. The client's fax user account does not have the FAX_PORT_QUERY access rights. |
|
ERROR_NOT_ENOUGH_MEMORY 0x00000008 |
The fax server cannot allocate sufficient memory to hold the array of FAX_ROUTING_METHOD structures to be returned to the client. |
|
ERROR_INVALID_DATA 0x0000000D |
This error SHOULD be returned if the FaxPortHandle argument is not a valid handle obtained using FaxObs_OpenPort.<202> |
|
ERROR_INVALID_PARAMETER 0x00000057 |
The parameter is incorrect. This error code is returned if any of the following parameters is set to a NULL pointer value: RoutingInfoBuffer, RoutingInfoBufferSize, PortsReturned.<203> |
Exceptions Thrown: No exceptions are thrown except those that are thrown by the underlying RPC protocol, [MS-RPCE].