IKsControl interface

The IKsControl interface is a COM-style interface implemented on AVStream filters and pins. It enables clients in kernel mode to access AVStream automation objects (properties, methods, and events).

See the IKsControl (ksproxy.h) kernel-streaming proxy COM interface for information about the kernel-mode equivalent of this interface.

Methods

The IKsControl interface has these methods.

Method Description
IKsControl::KsEvent The IKsControl::KsEvent method enables or disables an event, together with any other defined support operations available on an event set.
IKsControl::KsMethod The IKsControl::KsMethod method sends a method to a KS object, together with any other defined support operations available on a method set.
IKsControl::KsProperty The IKsControl::KsProperty method sets a property or retrieves property information, together with any other defined support operations available on a property set.

Remarks

Minidrivers typically acquire the IKsControl interface through a call to KsPinGetConnectedFilterInterface or KsPinGetConnectedPinInterface. Because this is a COM-style interface, the function call to obtain this interface calls the QueryInterface method, which in turn calls the AddRef method. Therefore, the minidriver does not have to perform these steps.

However, as soon as the client is finished with the IKsControl interface, it must release IKsControl with a call to the Release method.

Minidrivers that are written in C manipulate the IKsControl interface as a structure that contains a pointer to a table of functions instead of a C++ abstract base class.

A client that is written in C++ does the following:

IKsControl *Control;

if (NT_SUCCESS (
  KsPinGetConnectedPinInterface (
    Pin,
    IID_IKsControl,
    (PVOID *)&Control) )
) {
  Control -> KsProperty (...);
  Control -> Release ();
}

However, a client that is written in C uses this code instead:

IKsControl *Control;

    If (NT_SUCCESS (
      KsPinGetConnectedPinInterface (
        Pin,
        IID_IKsControl,
        (PVOID *)&Control) )
    ) {
      Control -> lpVtbl -> KsProperty (...);
      Control -> lpVtbl -> Release ();
    }

For more information, see AVStream Overview.

Requirements

   
Target Platform Windows
Header ks.h (include Ks.h)

See Also

IKsControl(ksproxy.h)

KsPinGetConnectedFilterInterface

KsPinGetConnectedPinInterface