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 kernel-streaming proxy COM interface for information about the kernel-mode equivalent of this interface.

Members

The IKsControl interface inherits from the IUnknown interface. IKsControl also has these types of members:

Methods

The IKsControl interface has these methods.

MethodDescription
KsEvent

Enables or disables an event.

KsMethod

Sends a method to a KS object.

KsProperty

Sets a property or retrieves property information.

 

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

Header

Ks.h (include Ks.h)

See also

IKsControl (Kernel Streaming Proxy)
KsPinGetConnectedPinInterface
KsPinGetConnectedFilterInterface

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft