Export (0) Print
Expand All
COM
id
in
int
odl
out
ptr
ref
Expand Minimize

async attribute

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


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

Parameters

opt-acf-attributes

Specifies optional application configuration attributes.

function-name

Specifies the name of the function in the IDL file.

param-list

Specifies an optional parameter list.

Remarks

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.

Examples

//file:Xasync.idl
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

ADD
Show:
© 2014 Microsoft