Legacy Serial Attached Device

Discussion in 'Windows Vista Drivers' started by Litler Koh, Jul 18, 2003.

  1. Litler Koh

    Litler Koh Guest

    Hi All,
    Really desperate now. I am writing a driver for a legacy serial
    attached
    device (i.e. NO PnP...yeah, a stupid widget alright). I did the
    following
    steps in my AddDevice routine:
    1) IoGetDeviceObjectPointer to get the Device Object (for Serial
    Port).
    2) After that, I use IoAttachDeviceToDeviceStack to attach the serial
    port's
    Device Object to the PDO provided by the enumerator.
    3) I call IoAttachDeviceToDeviceStack again to attach my Device Object
    to the
    serial port's DO.

    After installing, my device doesn't really work that well (primarily I
    didn't write the driver well, I guess). Any changes on the wait masks
    I set
    (CTS and DSR) or driver removal will reboot the PC.

    I had went through the Walter Oney's article about the same issue, but
    was unable to clarify the following points:
    1) Do I have to specify serial.sys as my lower filter in the .inf?
    2) Do I really have to do the device attachment to stack? I had tried
    creating a global pointer in my driver pointing to the Device Object
    returned by IoGetDeviceObjectPointer but my driver will crash the
    system during installation.

    I'm quite new to this, so bear with me.

    Cheers and G'day
    Litler Koh
     
    Litler Koh, Jul 18, 2003
    #1
    1. Advertisements

  2. Litler Koh

    Walter Oney Guest

    Are you talking about my WD-3 article on serial attached devices?
    No, but you will need to save the pointers you get back from
    IoGetDeviceObjectPointer someplace, such as in a device extension for
    your device. The part of my WD-3 article that would be relevant to you
    are the ones for "Doesn't have Plug and Play ID".
    Maybe it's time for your management to make an engineering decision to
    out-source?
     
    Walter Oney, Jul 18, 2003
    #2
    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.