Raw Input Thread

Discussion in 'Windows Vista Drivers' started by Paul Young, Jul 26, 2003.

  1. Paul Young

    Paul Young Guest

    Where exactly does the Raw Input Thread recieve its HID
    mouse input from?
    (is it from mouclass or hidclass or mouclass + hidclass?)

    While digging around some archives, I ran into power
    point presentations of WinHEC2001 where the Raw Input
    Thread was introduced.

    Slide 24 of "How to Use Input Device Support in Windows
    XP" WinHEC 2001
    (http://www.microsoft.com/whdc/winhec/presents2001/InputDr
    ivers.ppt)
    The slide shows a diagram that I am somewhat confused
    about. In the diagram the Raw Input Thread is connected
    to the mouclass, hidclass, and hidparse drivers.
    Does mouse input go through each of these routes to the
    Raw Thread, or would the hidclass driver redirect the
    input to the mouhid/mouclass drivers?

    Also, what does the hidparse.sys driver do?
    I couldn't find any documentation on it in 2k3 DDK.

    ~Thanks
    Paul Young
    UC Berkeley BMI
     
    Paul Young, Jul 26, 2003
    #1
    1. Advertisements

  2. let's go from the top down. the raw input thread (RIT) understands 2 types
    of data, KEYBOARD_INPUT_DATA and MOUSE_INPUT_DATA. it retreives both types
    of data in the same fashion, it sends read IRPs to the class driver
    (mouclass, kbdclass) asking for up to N packets at a time. both of these
    packet types are bus transport agnostic, it is purely data at this point

    the class driver either queues these read irps if it has no pending data to
    report or completes them immediately if it does have pending data. so, now
    the question is how the class driver gets this generic data. Queueing irps
    is a pain and problematic, so the class driver takes care of it. The class
    driver sends an IOCTL down the stack, passing a function pointer which the
    transport/port driver beneath it will call when it has data to report. the
    class driver's impl of this function either completes a pended read (if one
    is present) or queues the data for a read which will come later.

    now, the transport/port driver must send data to the RIT. only it knows how
    to get at this data. it could be serial (sermouse), HID (kbdhid/mouhid),
    ps2 (i8042prt), or the network (rdp). In the HID case, kbdhid and mouhid
    read HID reports from their PDO. They then use hidparse (kernel equiv of
    hid.dll) to parse the report and extract which keys were pressed / mouse
    movement. They then take this translated HID info and put them into the
    generic XXX_INPUT_DATA structures mentioned above.

    How are these HID functions broken out? HID is a self describing protocol.
    Each collection is represented by a PDO (its own pnp device stack
    essentially) by hidclass based on the device's report descriptor. it is
    this pdo that kbdhid/mouhid loads on (via an INF).

    d
     
    Doron Holan [MS], Jul 26, 2003
    #2
    1. Advertisements

  3. Paul Young

    Paul Young Guest

    Thanks for the help- I have a much better picture of
    whats going on.

    Is there a book or a website aside from the DDK which has
    information on XP driver stacks and the like, I recently
    ordered Oney's book.

    ~Paul
     
    Paul Young, Jul 30, 2003
    #3
    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.