Skip to main content
This topic provides an example of how to set up return data. If there’s custom return data, support it by using the provider and a custom method so that you can retrieve the created data.
As explained in the setup example, the provider must first add support for return data by specifying a buffer size in XAsyncComplete and filling it out in the GetResult case. After support is added, add a method to retrieve the result for the caller.
You can call XAsyncGetResult, but the previous method creates a readable pairing between the custom provider method. It automatically converts to the data type that’s needed for the async result. This method is also safe to use within any completion callback to gather results from the work.

Reference API documentation

See also

XAsyncProvider library overview Set up custom provider (example) Setup invocation methods (example) Set up cancelability (example) XAsyncProvider
Last modified on August 4, 2026