PDEV_QUERY_RESULT_CALLBACK callback function (devquery.h)

The function prototype required of callback functions that will receive DevQuery query results.

Syntax

PDEV_QUERY_RESULT_CALLBACK PdevQueryResultCallback;

void PdevQueryResultCallback(
  HDEVQUERY hDevQuery,
  PVOID pContext,
  const DEV_QUERY_RESULT_ACTION_DATA *pActionData
)
{...}

Parameters

hDevQuery

Handle for the query associated with the callback.

pContext

The optional context value provided by the client during query creation.

pActionData

A DEV_QUERY_RESULT_ACTION_DATA structure that provides information about the change to the query state or the action applied to the result set. The data in this structure will be freed once the callback returns.

Return value

None

Remarks

Only one callback function is ever active for a given query. If the same callback function is passed to multiple queries, it is possible for the callback functions to execute concurrently, because they can be invoked for different queries.

You can only call DevCloseObjectQuery on the hDevQuery handle from the callback if the DevQueryFlagAsyncClose flag was specified when the query was created. If DevQueryFlagAsyncClose was not specified, calling DevCloseObjectQuery on a query from inside its own callback will result in a deadlock.

Requirements

Requirement Value
Header devquery.h