KsValidateConnectRequest function (ks.h)

The KsValidateConnectRequest function validates a connection request and returns a pointer to the connection structure associated with the request.

This function can only be called at PASSIVE_LEVEL.

Syntax

KSDDKAPI NTSTATUS KsValidateConnectRequest(
  [in]  PIRP                   Irp,
  [in]  ULONG                  DescriptorsCount,
  [in]  const KSPIN_DESCRIPTOR *Descriptor,
  [out] PKSPIN_CONNECT         *Connect
);

Parameters

[in] Irp

Pointer to an IRP specifying the connection request.

[in] DescriptorsCount

Specifies the number of pin descriptors passed.

[in] Descriptor

Specifies a pointer to the list of KSPIN_DESCRIPTOR structures.

[out] Connect

Specifies a location in which to place a pointer to the KSPIN_CONNECT pointer passed to the create request. If KsValidateConnectRequest returns success, then Connect+1 will contain a pointer to the KSDATAFORMAT with which the pin was opened.

Return value

The KsValidateConnectRequest function returns STATUS_SUCCESS if successful, or it returns an error.

Remarks

The KsValidateConnectRequest function handles basic connection structure access exceptions and validates the communication requirements, medium, protocol, and basic data format. The validation performed on the data format passed is based on the data range list for the specified pin against which a pin instance is to be created. Validation is successful in three instances: if a range major format is a wildcard, the range major format matches and the range subformat is a wildcard, or the range major format, range subformat, and the range specifier all match.

The buffer is passed a copy of the original input buffer, if the originator was not in kernel mode, and is therefore safe to access.

Requirements

Requirement Value
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib