GPIO_CLX_RegisterClient function (gpioclx.h)

The GPIO_CLX_RegisterClient method registers a general-purpose I/O (GPIO) controller driver as a client of the GPIO framework extension (GpioClx).

Syntax

NTSTATUS GPIO_CLX_RegisterClient(
  [in]      WDFDRIVER                        Driver,
  [in, out] PGPIO_CLIENT_REGISTRATION_PACKET RegistrationPacket,
  [in]      PUNICODE_STRING                  RegistryPath
);

Parameters

[in] Driver

A WDFDRIVER handle to the framework driver object for the GPIO controller driver.

[in, out] RegistrationPacket

A pointer to a caller-allocated GPIO_CLIENT_REGISTRATION_PACKET structure that contains the caller's registration information. This structure contains pointers to the event callback functions that the GPIO controller driver implements. Additionally, this structure specifies the size of the device context that the GPIO controller driver requires for its internal configuration data and state information.

[in] RegistryPath

A pointer to a UNICODE_STRING structure that contains the path name of the registry key for the GPIO controller driver. This parameter should be the registry path name that was passed to the driver's DriverEntry routine. For more information about driver registry keys, see Registry Trees for Devices and Drivers.

Return value

GPIO_CLX_RegisterClient returns STATUS_SUCCESS if the call is successful. Possible return values include the following error codes.

Return code Description
STATUS_INVALID_PARAMETER
The Driver, RegistrationPacket, or RegistryPath parameter is NULL.
STATUS_GPIO_INVALID_REGISTRATION_PACKET
The specified registration packet is not valid.
STATUS_INSUFFICIENT_RESOURCES
Out of memory.

Remarks

The GPIO controller driver calls this method to register its event callback functions with GpioClx. Typically, the driver calls this method from its DriverEntry routine, which runs shortly after the driver is loaded into memory.

Later, just before the GPIO controller driver unloads, the driver calls the GPIO_CLX_UnregisterClient method to cancel its registration with GpioClx.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 8.
Target Platform Universal
Header gpioclx.h
Library Msgpioclxstub.lib
IRQL PASSIVE_LEVEL

See also

DriverEntry

GPIO_CLIENT_REGISTRATION_PACKET

GPIO_CLX_UnregisterClient

UNICODE_STRING