Bewerken

Delen via


IKsControl::KsMethod method (ks.h)

The IKsControl::KsMethod method sends a method to a KS object, together with any other defined support operations available on a method set.

Syntax

NTSTATUS KsMethod(
  [in]      PKSMETHOD Method,
  [in]      ULONG     MethodLength,
  [in, out] PVOID     MethodData,
  [in]      ULONG     DataLength,
  [out]     ULONG     *BytesReturned
);

Parameters

[in] Method

Pointer to a KSMETHOD structure that describes a method and the request type of the method request.

[in] MethodLength

Specifies size, in bytes, of the buffer at Method.

[in, out] MethodData

Pointer to a buffer that contains data and buffer space for a KSMETHOD_TYPE_SEND operation, or buffer space that receives data for all other operations.

[in] DataLength

Specifies size, in bytes, of the buffer at MethodData.

[out] BytesReturned

Pointer to a variable that receives the size, in bytes, of the data that KsMethod stores in the buffer at MethodData.

Return value

The IKsControl::KsMethod method returns the same value that would be returned if the method had been sent by IOCTL.

Remarks

To determine the buffer size that is required for a specific method request, you can call this method with MethodData set to NULL and DataLength equal to zero. The method returns HRESULT_FROM_WIN32(ERROR_MORE_DATA and BytesReturned contains the size of the required buffer.

Requirements

Requirement Value
Target Platform DesktopMobile
Header ks.h (include Ks.h)

See also

KSMETHOD

KSMETHOD_ITEM

KSMETHOD_SET