Retrieves reference counted interfaces to an object.
ADLX_RESULT QueryInterface (const wchar_t* interfaceId, void** ppInterface)
[in]interfaceId const wchar_t* The identifier of the interface being requested.
[out]ppInterface void** The address of a pointer to the returned interface. If the interface is not successfully returned, the method sets the dereferenced address *ppInterface to nullptr.
If QueryInterface is successfully called, ADLX_OK is returned.
If the requested interface is not supported, ADLX_UNKNOWN_INTERFACE is returned.
If the *ppInterface parameter is nullptr, ADLX_INVALID_ARGS is returned.
If QueryInterface is not successfully called, an error code is returned.
Refer ADLX_RESULT for success codes and error codes.
To ensure ADLX SDK backwards and forward compatibility the ADLX interfaces are locked, they do not change in subsequent versions of the driver. When an ADLX interface needs another functionality, an extension interface is provided. The extension interface is obtained from the initial interface using QueryInterface. The documentation for the extension interface shows how to obtain it.
The returned interface must be discarded with Release when no longer needed.
In C++ when using a smart pointer for the returned interface there is no need to call QueryInterface and Release because the smart pointer calls them internally.