QueryInterface

Retrieves reference counted interfaces to an object.

Syntax

Copied!

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

Parameters

  1. [in] interfaceId const wchar_t* The identifier of the interface being requested.

  2. [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.

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

Header

include “ADLXDefines.h”

Minimum version

1.0

Related pages

  • Visit the Adlx product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!