implicit_handle attribute

The [implicit_handle] ACF attribute specifies the handle used for functions that do not include an explicit handle as a procedure parameter.

implicit_handle(handle-type handle-name)



Specifies the handle data type, such as the base type handle_t or a user-defined handle type.


Specifies the name of the handle.


The handle specified by the [implicit_handle] attribute is used in different ways depending on the nature of the procedure. If the procedure is remote, the handle will be used as the binding handle for the remote call. The implicit handle may also be used to establish an initial binding for a function that uses a context handle. If the procedure is a serializing procedure, the handle is used as a serializing handle controlling the operation. In the case of type serialization, the handle is used as the serialization handle for all the serialized types.

The [implicit_handle] attribute specifies a global variable that contains a handle used by any function needing implicit handles.

The implicit binding handle type must be either handle_t (or a type based on handle_t) or a user-defined handle type specified with the handle attribute. The implicit serializing handle must be a type based on handle_t.

If the implicit handle type is not defined in the IDL file or in any files included and imported by the IDL file for the MIDL computer, you must supply the file containing the handle-type definition when you compile the stubs. Use the ACF include statement to include the file containing the handle-type definition.

The [implicit_handle] attribute can occur once, at most. The [implicit_handle] attribute can occur only if the [auto_handle] and [explicit_handle] attributes do not occur.


/* ACF file */ 
    implicit_handle(handle_t hMyHandle)
interface iface
    // Attribute configuration statements

See also

Application Configuration File (ACF)