Skip to content

Latest commit

 

History

History
136 lines (95 loc) · 6.37 KB

nc-gpioclx-gpio_client_query_set_controller_information.md

File metadata and controls

136 lines (95 loc) · 6.37 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:gpioclx.GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION
GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION (gpioclx.h)
The CLIENT_QuerySetControllerInformation event callback function queries the general-purpose I/O (GPIO) controller driver for the specified set of attributes of the GPIO controller.
gpio\client_querysetcontrollerinformation.htm
GPIO
02/15/2018
GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION callback function
CLIENT_QuerySetControllerInformation, CLIENT_QuerySetControllerInformation callback, CLIENT_QuerySetControllerInformation callback function [Parallel Ports], GPIO.client_querysetcontrollerinformation, GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION, gpioclx/CLIENT_QuerySetControllerInformation
gpioclx.h
Desktop
Supported starting with Windows 8.
Called at PASSIVE_LEVEL.
Windows
GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION
gpioclx/GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION
APIRef
kbSyntax
UserDefined
Gpioclx.h
GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION

GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION callback function

-description

The CLIENT_QuerySetControllerInformation event callback function queries the general-purpose I/O (GPIO) controller driver for the specified set of attributes of the GPIO controller.

-parameters

-param Context [in]

A pointer to the GPIO controller driver's device context.

-param InputBuffer [in]

A pointer to a CLIENT_CONTROLLER_QUERY_SET_INFORMATION_INPUT structure that describes the type of attributes that the caller is requesting.

-param OutputBuffer [out, optional]

An optional pointer to a CLIENT_CONTROLLER_QUERY_SET_INFORMATION_OUTPUT structure into which the function writes the values of the requested attributes.

-returns

The CLIENT_QuerySetControllerInformation function returns STATUS_SUCCESS if the call is successful. Possible return values include the following error code.

Return code Description
STATUS_NOT_SUPPORTED
The function does not support the type of attributes that are being requested.

-remarks

The RequestType member of the CLIENT_CONTROLLER_QUERY_SET_INFORMATION_INPUT structure pointed to by InputBuffer specifies the type of attributes that are being requested. For a list of the types of attributes that can be requested, see CLIENT_CONTROLLER_QUERY_SET_REQUEST_TYPE.

Implementing a CLIENT_QuerySetControllerInformation function is optional. If a GPIO controller driver implements a CLIENT_QuerySetControllerInformation function, this function might support some types of attribute requests, but not support others. If the caller requests an attribute type that the function does not support, the function returns STATUS_NOT_SUPPORTED.

Examples

To define a CLIENT_QuerySetControllerInformation callback function, you must first provide a function declaration that identifies the type of callback function you're defining. Windows provides a set of callback function types for drivers. Declaring a function using the callback function types helps Code Analysis for Drivers, Static Driver Verifier (SDV), and other verification tools find errors, and it's a requirement for writing drivers for the Windows operating system.

For example, to define a CLIENT_QuerySetControllerInformation callback function that is named MyEvtGpioQuerySetControllerInformation, use the GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION function type, as shown in this code example:

GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION MyEvtGpioQuerySetControllerInformation;

Then, implement your callback function as follows:

_Use_decl_annotations_
NTSTATUS
  MyEvtGpioQuerySetControllerInformation(
    PVOID Context,
    PCLIENT_CONTROLLER_QUERY_SET_INFORMATION_INPUT InputBuffer,
    PCLIENT_CONTROLLER_QUERY_SET_INFORMATION_OUTPUT OutputBuffer
    )
{ ... }

The GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION function type is defined in the Gpioclx.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the Use_decl_annotations annotation to your function definition. The Use_decl_annotations annotation ensures that the annotations that are applied to the GPIO_CLIENT_QUERY_SET_CONTROLLER_INFORMATION function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions by Using Function Role Types for KMDF Drivers. For more information about Use_decl_annotations, see Annotating Function Behavior.

-see-also

CLIENT_CONTROLLER_QUERY_SET_INFORMATION_INPUT

CLIENT_CONTROLLER_QUERY_SET_INFORMATION_OUTPUT

CLIENT_CONTROLLER_QUERY_SET_REQUEST_TYPE