UpdateDriverForPlugAndPlayDevices returns ERROR_REQUEST_OUT_OF_SEQUENCE (error code 0x308)

Let’s start with the solution: I tried to install a KMDF 1.9 driver on Vista
where WDF coinstaller version 1.5 was installed.
Maybe someone will find this piece of info useful.

Now, for the sake of the curious and the search engine, this is
what happened.

  1. I wrote a KMDF 1.9 driver and an installation application based on
    DEVCON.
  2. It worked well on Windows 7 and XP.
  3. It could not install on Vista (Original, +SP1, +SP1+SP2).
  4. Debugging my installation application I found out that
    function UpdateDriverForPlugAndPlayDevices returned error code 0x308 which
    made no sense.
  5. I then looked into file %windir%\setupact.log and found out that the
    co-installer did not load properly.
  6. Then I tried to install sample “Simple Toaster” which installed well.
  7. I’ve noticed that the co-installer file was updated to 1.9
  8. Now, I was able to use my installation application to install my
    driver.

Check out the nonpnp example in the WDK. It provides an EXE that will install a non-PnP driver and update the local version of WDF. It sounds like you fixed your problem, but this might provide you some valuable future insight. I used that example to install a WFP driver on both Vista and Win7.

Gary Little

----- Original Message -----
From: “Shaul Eizikovich”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, December 1, 2010 10:13:09 AM
Subject: [ntdev] UpdateDriverForPlugAndPlayDevices returns ERROR_REQUEST_OUT_OF_SEQUENCE (error code 0x308)

Let’s start with the solution: I tried to install a KMDF 1.9 driver on Vista where WDF coinstaller version 1.5 was installed.
Maybe someone will find this piece of info useful.

Now, for the sake of the curious and the search engine, this is what happened.

1. I wrote a KMDF 1.9 driver and an installation application based on DEVCON.
2. It worked well on Windows 7 and XP.
3. It could not install on Vista (Original, +SP1, +SP1+SP2).
4. Debugging my installation application I found out that function UpdateDriverForPlugAndPlayDevices returned error code 0x308 which made no sense.
5. I then looked into file %windir%\setupact.log and found out that the co-installer did not load properly.
6. Then I tried to install sample “Simple Toaster” which installed well.
7. I’ve noticed that the co-installer file was updated to 1.9
8. Now, I was able to use my installation application to install my driver.

— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thank you Garry for this tip.
I still have a problem with the fact that on Vista (and rarely on XP), the user has to reboot in order to complete the installation. The current situation is like this:
W7: Shipped with WDF 1.9 so no WDF installation required.
Vista: Shipped with WDF 1.5 (or 1.7 is SP1/SP2) so installation of WDF 1.9 is required, including reboot.
XP: Shipped clean, so installation of WDF 1.9 is required, but no reboot (Unless a WDF driver is already installed).

Wouldn’t it be wiser to compile my driver as KMDF 1.5 ? If so, is it possible to do this under the WDF 7.1.0 environment or will I have to install an older version?

Maybe a little logic will help.

XP: Having 1.9 available is the best of all possible combinations if no
version currently exists.
Vista: Who cares??? Probably the customer, but if are still using Vista
maybe that indicates they will be an expensive customer.
Win7: You have the best of all possible worlds. Much better OS, WDF 1.9,
possibly a smarter customer.

There have been problems with some of the earlier versions of KMDF
installation files. Using the latest may eliminate those issues for the
non-Win7 user base. I am not saying you are incorrect, but you have to
think about the issues, risks, and benefits including some new capabilities
found in WDF 1.9 as compared to the earlier versions. Create a Power Point
slide show and devote one slide for each WDF version with pros and cons for
each OS. Of course, if your project requires capabilities of WDF 1.7 or
1.9, then that may be an overriding factor.

wrote in message news:xxxxx@ntdev…

Thank you Garry for this tip.
I still have a problem with the fact that on Vista (and rarely on XP), the
user has to reboot in order to complete the installation. The current
situation is like this:
W7: Shipped with WDF 1.9 so no WDF installation required.
Vista: Shipped with WDF 1.5 (or 1.7 is SP1/SP2) so installation of WDF
1.9 is required, including reboot.
XP: Shipped clean, so installation of WDF 1.9 is required, but no reboot
(Unless a WDF driver is already installed).

Wouldn’t it be wiser to compile my driver as KMDF 1.5 ? If so, is it
possible to do this under the WDF 7.1.0 environment or will I have to
install an older version?

I’m not sure I agree with some of your points David:

> Vista: Who cares??? Probably the customer, but if are still using Vista
maybe that indicates they will be an expensive customer.

Well, there are a few millions give-or-take that use Vista. It is not for me to punish them. After all, I’ve taken the decision to develop under WDF rather than WDK because it is more convenient to develop under. I don’t think it is any better (or worse).

> XP: Having 1.9 available is the best of all possible combinations if no
version currently exists.
True. But what if an older version does exist?

Wouldn’t it be wiser to create all three drivers (1.6, 1.7, 1.9) and deploy the most advanced one possible - according to the version of the already installed WDF co-installer?

xxxxx@gmail.com wrote:

I still have a problem with the fact that on Vista (and rarely on XP), the user has to reboot in order to complete the installation.

This is only required IF this is the very first KMDF 1.9 driver the user
has installed. After that, never again. In my opinion, it’s not worth
worrying about. Just let them do the reboot. This is the recommended
Microsoft path.

I fully understand why it happens, but I find it amusingly ironic that
Microsoft spent 10 years drilling into our heads that “driver
installation should never require reboots”, and now the recommended
driver model requires a reboot in certain circumstances…

Wouldn’t it be wiser to compile my driver as KMDF 1.5 ? If so, is it possible to do this under the WDF 7.1.0 environment or will I have to install an older version?

Is it possible? Yes. Is it wiser? I would argue “no”. You would have
to install the original Vista WDK (6000).

Wouldn’t it be wiser to create all three drivers (1.6, 1.7, 1.9) and deploy the most advanced one possible - according to the version of the already installed WDF co-installer?

No, that’s silly. Remember that a downlevel KDMF driver will use
whatever KMDF is actually running on the machine. If you build for KMDF
1.5, and install on Windows 7, you will actually be using 1.9. A
built-for-1.5 driver installed in a 1.9 system will get exactly the same
framework as a built-for-1.9 driver. If you REALLY want the “no reboot
ever” situation, you will have to build in the 6000 WDK and link to the
1.5 KMDF. I believe the cost/benefit ratio in that scenario is not good.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim, that was a very good description and analysis of the situation. Thank you!

No, you cannot build a WDF 1.5 driver under a WDF 1.9 environment. To do that you will have to fall back to a Vista WDK and then build your driver. XP stands a could chance of not re-booting because WDF was not supported until late in its life cycle, so it may indeed not have any drivers dependent on an oder WDF version. Vista however, will have out of the box driver using WDF and will require the reboot. You will also see the same thing on Win7 when the next version of the WDK and WDF is released.

Is it wiser to build with 1.5 and not 1.9? That depends upon how you define wise. My personal preference would be to always upgrade to the latest, but that is my personal preference. Unless a WDK is released with a WDF version that can dynamically re-link to running drivers, you will face a reboot, and I don;t see Microsoft providing that kind of WDF anytime soon. Also, once you’ve updated the WDF, you needn’t do it again until it changes. If 1.9 breaks things for you then, staying with 1.5 or 1.7, may be your only option, but you have to decide that.

Gary G. Little

----- Original Message -----
From: “shaul eiz”
To: “Windows System Software Devs Interest List”
Sent: Friday, December 3, 2010 1:49:20 AM
Subject: RE:[ntdev] UpdateDriverForPlugAndPlayDevices returns ERROR_REQUEST_OUT_OF_SEQUENCE (error code 0x308)

Thank you Garry for this tip.
I still have a problem with the fact that on Vista (and rarely on XP), the user has to reboot in order to complete the installation. The current situation is like this:
W7: Shipped with WDF 1.9 so no WDF installation required.
Vista: Shipped with WDF 1.5 (or 1.7 is SP1/SP2) so installation of WDF 1.9 is required, including reboot.
XP: Shipped clean, so installation of WDF 1.9 is required, but no reboot (Unless a WDF driver is already installed).

Wouldn’t it be wiser to compile my driver as KMDF 1.5 ? If so, is it possible to do this under the WDF 7.1.0 environment or will I have to install an older version?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

First, I’ve never seen 1.6, so that must be a typo for 1.5, though I could be wrong.

Second, maintaining multiple build versions, to me, can be a royal pain in the ass and can easily lead to what I consider unreadable code: e.g. #if#endif where you have to decide which version you want to build. Personally I HATE that kind of code, but again that is personal preference and when given the choice I will always opt to use the latest version of the tools. If you don’t have a compelling reason to build for 1.5 I would build for 1.9, and produce an install package that updates driver and WDF as painlessly as possible. !.9 works well on Vista in the drivers I have written, so I really had no reason to even consider versioning for WDF.

Gary G. Little

----- Original Message -----
From: “shaul eiz”
To: “Windows System Software Devs Interest List”
Sent: Friday, December 3, 2010 10:14:15 AM
Subject: RE:[ntdev] UpdateDriverForPlugAndPlayDevices returns ERROR_REQUEST_OUT_OF_SEQUENCE (error code 0x308)

I’m not sure I agree with some of your points David:
>> Vista: Who cares??? Probably the customer, but if are still using Vista
maybe that indicates they will be an expensive customer.

Well, there are a few millions give-or-take that use Vista. It is not for me to punish them. After all, I’ve taken the decision to develop under WDF rather than WDK because it is more convenient to develop under. I don’t think it is any better (or worse).

>> XP: Having 1.9 available is the best of all possible combinations if no
version currently exists.
True. But what if an older version does exist?

Wouldn’t it be wiser to create all three drivers (1.6, 1.7, 1.9) and deploy the most advanced one possible - according to the version of the already installed WDF co-installer?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer