|
From: Pete Gontier on 4 May 2008 19:35 On 5/3/08 6:28 AM, in article dedf9e87-a439-4534-9972-a2f1070c83c0(a)l64g2000hse.googlegroups.com, "chris.aseltine(a)gmail.com" <chris.aseltine(a)gmail.com> wrote: > ... you might look at this link to learn how to force-install a driver on a > given device node, without touching anybody else: > > http://support.microsoft.com/kb/889763 Thanks. That seems to work well enough for me to send in another build to my tester in hopes of ending this problem. Four notes for posterity: -- The DDK contradicts the Knowledge Base article about the last parameter. I trusted the KB article. -- The sample code's declaration of the function pointer should use APIENTRY. -- InstallSelectedDriver has a file copying step unnecessary for my usage, where UpdateDriverforPlugAndPlayDevices does not. While the WHQL warning is posted, the progress window for this copying step is sitting behind the warning, not painting, and looking like a bug. Nice. -- If you pass false for the backup parameter (probably not wise, but I experimented with it to see if I could inhibit the copying step) and the user says STOP at the WHQL warning, what appears to be the last phase of the Found New Hardware Wizard appears and reports the same error which will eventually be returned by GetLastError after InstallSelectedDriver returns false. Pete Gontier http://www.m-audio.com/ pete (at) m-audio (dot) com
From: chris.aseltine on 4 May 2008 23:26 On May 4, 6:35 pm, Pete Gontier <kokoroza...(a)discussions.microsoft.com> wrote: > -- The DDK contradicts the Knowledge Base article about the last > parameter. I trusted the KB article. By the way, the article is also wrong about the "LPCWSTR Reserved" argument. It says it should be null, but you really need to pass it a pointer to a wchar_t buffer. Otherwise I think it crashes, but only on Win2k, or only on XP, or something like that.
From: Pete Gontier on 5 May 2008 12:23 On 5/4/08 8:26 PM, in article 44ca0226-1a8b-408b-a846-28b12f3db37b(a)b64g2000hsa.googlegroups.com, "chris.aseltine(a)gmail.com" <chris.aseltine(a)gmail.com> wrote: > By the way, the (KB) article is also wrong about the "LPCWSTR Reserved" > argument. It says it should be null, but you really need to pass it a > pointer to a wchar_t buffer. Otherwise I think it crashes, but only > on Win2k, or only on XP, or something like that. Yes, I saw that somewhere on the web. The DDK documentation also says this parameter is reserved and must be NULL, so it would seem both docs are at least somewhat incorrect. However, I didn't have any problems on XP SP2, and we don't support anything less than that, so I don't have to guess how big to make a dummy buffer for an undocumented value. Thanks again... Pete Gontier http://www.m-audio.com/ pete (at) m-audio (dot) com
First
|
Prev
|
Pages: 1 2 Prev: Mount and dismount physicaldriver Next: Can one force a USB disconnect then reconnect? |