Export (0) Print
Expand All
COM
id
in
int
odl
out
ptr
ref
Expand Minimize
This topic has not yet been rated - Rate this topic

fault_status attribute

The [fault_status] ACF attribute specifies that an error code of type error_status_t indicates a failure of the remote procedure, rather than other types of problems such as communication errors.


[fault_status [ , ACF-function-attributes ] ] function-name(
    [ [ ACF-parameter-attributes ] ] parameter-name
    , ... );

[ [ ACF-function-attributes ] ] function-name(
    [fault_status [ , ACF-parameter-attributes ] ] parameter-name
    , ... );

Parameters

ACF-function-attributes

Specifies zero or more ACF function attributes such as [fault_status] and [nocode]. Function attributes are enclosed in square brackets. Note that zero or more attributes can be applied to a function. Separate multiple function attributes with commas. Also note that if [fault_status] appears as a function attribute, it cannot also appear as a parameter attribute.

function-name

Specifies the name of the function as defined in the IDL file.

ACF-parameter-attributes

Specifies attributes that apply to a parameter. Note that zero or more attributes can be applied to the parameter. Parameter attributes are enclosed in square brackets. Separate multiple parameter attributes with commas. IDL parameter attributes, such as directional attributes, are not allowed in the ACF. Note that if [fault_status] appears as a parameter attribute, it cannot also appear as a function attribute.

parameter-name

Specifies the parameter for the function as defined in the IDL file. Each parameter for the function must be specified in the same sequence, using the same name as defined in the IDL file.

Remarks

The [fault_status] attribute can be used as either a function attribute or as a parameter attribute, but it can appear only once per function. It can be applied either to the function itself or to one parameter in each function.

The [fault_status] attribute can be applied only to functions that return the type error_status_t. When the remote procedure fails in a way that causes a fault PDU to be returned, an error code is returned.

When [fault_status] is used as a parameter attribute, the parameter must be an [out] parameter of type error_status_t. If a server error occurs, the parameter is set to the error code. When the remote call is successfully completed, the procedure sets the value.

The parameter associated with the [fault_status] attribute does not have to be specified in the IDL file. When the parameter is not specified, a new out parameter of type error_status_t is generated following the last parameter defined in the DCE IDL file.

It is possible for both the [fault_status] and [comm_status] attributes to appear in a single function, either as function attributes or parameter attributes. If both attributes are function attributes, or if they apply to the same parameter and no error occurs, the function or parameter has the value error_status_ok. Otherwise, it contains the appropriate status code value. Because values returned for [fault_status] are different from the values returned for [comm_status], the returned values are readily interpreted.

See also

Application Configuration File (ACF)
comm_status
error_status_t
nocode
out

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.