what is being passed into KSDEVICE_DISPATCH dispatch functions

Discussion in 'Windows Vista Drivers' started by William Xie, Oct 18, 2007.

  1. William Xie

    William Xie Guest


    for KS miniDriver

    KSDEVICE_DISPATCH maintains a list of functions pointers,
    We put the address of our functions, (for example AddDevice, PnPStart) into
    these pointers, In our definitions for these functions (AddDevice, PnPStart),
    there are IN parameters, what are these parameter? Where do i get this
    informations for these parameter?

    for example, for AddDevice functions,
    it is

    CaptureDeviceDispatch = {

    MyCaptureDevice::MyDevice_PnPAdd(IN KSDEVICE device){

    I what exactly is "device" being passed in?

    where can i find a better reference than the API reference on these?
    William Xie, Oct 18, 2007
    1. Advertisements

  2. William Xie

    Tim Roberts Guest

    You could have answered this by checking in ks.h.

    The KSDEVICE is created by AVStream when AddDevice is called. It is a
    pointer to a "struct _KSDEVICE", which is defined in ks.h. For most
    AVStream drivers, it can be treated as opaque. The first time you see it
    is in the Create callback. At that time, you shove your own context
    structure pointer into Device->Context, and from that time forward you can
    get whatever you need from it.
    In many ways, the AVStream samples are as good a reference as the DDK
    Tim Roberts, Oct 21, 2007
    1. Advertisements

  3. William Xie

    William Xie Guest

    thank you, Tim. :)
    William Xie, Oct 21, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.