Skip to content

QueryInterface

Navigation: ADLX SDK ReferencesADLX InterfacesMiscellaneousIADLXInterface

Syntax

ADLX_RESULT    QueryInterface (const wchar_t* interfaceId, void** ppInterface)

Parameters

#DirectionNameTypeDescription
1.[in]interfaceIdconst wchar_t*The identifier of the interface being requested.
#DirectionNameTypeDescription
---------------
2.[out]ppInterfacevoid**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.

Return Value

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.

Remarks

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.

Additional Info

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.

Requirements

Headerinclude “ADLXDefines.h”
Minimum version1.0

See Also: Release, ADLX Enums