async attribute

The [async] ACF attribute defines a remote procedure call as an asynchronous operation.

[async, opt-acf-attributes] function-name (param-list)



Specifies optional application configuration attributes.


Specifies the name of the function in the IDL file.


Specifies an optional parameter list.


This attribute is not applicable in COM interfaces.

To declare an RPC function as asynchronous, first declare the function as part of an interface definition in an IDL file. Then modify that function declaration, within the application configuration file (ACF), by applying the [async] attribute. Note that the function declaration makes no mention of the asynchronous handle and that the binding handle is the first parameter. Applying the [async] attribute in the ACF file generates the appropriate code so that when this function is called, the asynchronous server expects to receive an asynchronous handle before the other parameters.

Note  The async attribute cannot be used with the /osf command line switch.


interface AsyncIface 
    HRESULT MyAsyncFunc (
        handle_t hBinding,
        [in] int a,
        [in] int b,
        [out] int *c) ;
//other interface definitions
//end XAsync.idl

// file: Xasync.acf
interface AsyncIface
    [async] MyAsyncFunc () ;
    //any other ACF definitions
//end Xasync.acf

See also

Application Configuration File (ACF)
Asynchronous RPC



Community Additions