auto_handle

[ auto_handle [, interface-attribute-list] ] interface interface-name

interface-attribute-list

Specifies zero or more attributes that apply to the interface as a whole, such as code or nocode. Separate interface attributes with commas.

interface-name

Specifies the name of the interface.

 

Examples

[auto_handle] interface MyInterface {  }

[auto_handle, code] interface MyInterface {  } 

 

Remarks

The ACF attribute auto_handle directs the stub to automatically establish the binding for a function that does not have an explicit binding-handle parameter.

The auto_handle attribute appears in the interface header of the ACF. It also appears in the interface header of the IDL file when you specify the MIDL compiler switch /app_config.

When the client calls a function that uses automatic binding, and no binding to a server exists, the stub automatically establishes the binding. The binding is reused for subsequent calls to other functions in the interface that use automatic binding. The client application program does not have to declare or perform any processing relating to the binding handle.

When the ACF is not present or does not include the implicit_handle attribute, the MIDL compiler uses auto_handle and issues an informational message. The MIDL compiler also uses auto_handle, if needed, to establish the initial binding for a context_handle.

The auto_handle attribute can occur only if the implicit_handle or explicit_handle attribute does not occur. The auto_handle attribute can occur in the ACF or IDL interface header at most once.

 

Note  You cannot use automatic binding (either with the auto_handle attribute, or by default) if you are processing data through pipes.

 

See Also

ACF, /app_config, context_handle, IDL, implicit_handle