ICreateDeviceAccessAsync::Close method (deviceaccess.h)

The Close method performs cleanup after the asynchronous operation is completed and you retrieve the results.

Syntax

HRESULT Close();

Return value

This method supports standard return values, in addition to these:

Return code Description
S_OK
The property value was retrieved successfully.
E_ILLEGAL_METHOD_CALL
The operation did not finish.

Remarks

If the binding is successful, it doesn't invalidate the interface that the GetResult method returns.

It isn't strictly necessary to call this method, because resources are cleaned up when the underlying object is deleted. But doing so allows the system to free up resources that are associated with the asynchronous binding. As such, it's good practice to call Close after you retrieve the results.

Requirements

Requirement Value
Target Platform Windows
Header deviceaccess.h
Library Deviceaccess.lib

See also

ICreateDeviceAccessAsync