From: Nick Rivers on
Hi there!

I have created a CoInstaller .dll for a USB device. This CoInstaller dll
installs another USB device.

I am doing it this way for Vista:
-using SetupCopyOEMInf to pre-copy the driver package (will be copied into
the driver store, right?)
-then I am using UpdateDriverForPlugAndPlayDevices to install the driver for
the device. I did not
get DiInstallDevice to work yet, but UpdateDriverForPlugAndPlayDevices can
be used for Vista, right?

First problem:
UpdateDriverForPlugAndPlayDevices returns TRUE for installing the other USB
device, but after closing the
'Found New Hardware' Wizard, Vista reports:
"Device driver software was not successfully installed"
But it appears correctly in the device manager!
I had this problem also under Windows XP and it seems to be related to the
SetupCopyOEMInf function and
generated .pnf files! Do you know about that problem?

Second problem:
The display device name is will not be displayed correctly in the device
manager for the device which
was installed by the CoInstaller dll. But when I uninstall the device
through the device manager and then
scan for hardware changes it will be displayed with the correct name which
is specified in the corresponding .inf file.


Thanks
-Nick



From: Eliyas Yakub [MSFT] on
I don't fully understand the problem here. You have two devices. When the
driver for first device is installed, you try to update the driver for
another another USB device from the coinstaller of the first device. Is that
right? How do you know the second device is enumerated?

Or you are just root-enumerating another instance of the device from the
coinstaller of the actual USB device.


Installing another instance of the device from a coinstaller is not a
supported operation. There is lot of potential to run into issues while
trying to install something when you are in the middle of another
installation. The fact it works is just a chance. Nobody in Microsoft really
testing such a scenario, AFAIK.

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/tips/default.mspx


From: Nick Rivers on
Thanks so far....I should really improve my description on this issue.

I am trying to clear it up a little bit:

It?s only one physical device, I assume it?s called a multi-interface
(composite) USB device
(or Multi-Function (composite) USB Device).

The device got these Device Identification Strings:
USB\Vid_xxxx&Pid_yyyy (Generic Composite USB device)
USB\Vid_xxxx&Pid_yyyy&MI_00 (Video device)
USB\Vid_xxxx&Pid_yyyy&MI_01 (Audio device)

The driver package includes different .inf files:
Video.inf (for Vid_xxxx&Pid_yyyy, Vid_xxxx&Pid_yyyy&MI_00)
Audio.inf (for Vid_xxxx&Pid_yyyy&MI_01)

I need to run a pure .inf installation and all devices and drivers should be
installed
properly.

Windows XP for example, detects a generic USB Audio device for the audio
device and installs automatically
the driver which is part of Windows XP. Therefore I?ve created that
CoInstaller dll which installs
the Audio device again, using the Audio.inf. That worked so far.

Windows Vista does only install the Video device properly through a pure
..inf installation. That?s why I wanted
to install the Audio device through the CoInstaller dll.

If Installing another instance of the device from a coinstaller is not a
supported operation.....can you please point me to the right way? I would
really appreciate that.

Thanks,
Nick



"Eliyas Yakub [MSFT]" <eliyasy(a)online.microsoft.com> wrote in message
news:e%23Xv7ZJ%23GHA.924(a)TK2MSFTNGP03.phx.gbl...
>I don't fully understand the problem here. You have two devices. When the
>driver for first device is installed, you try to update the driver for
>another another USB device from the coinstaller of the first device. Is
>that right? How do you know the second device is enumerated?
>
> Or you are just root-enumerating another instance of the device from the
> coinstaller of the actual USB device.
>
>
> Installing another instance of the device from a coinstaller is not a
> supported operation. There is lot of potential to run into issues while
> trying to install something when you are in the middle of another
> installation. The fact it works is just a chance. Nobody in Microsoft
> really testing such a scenario, AFAIK.
>
> --
> -Eliyas
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> http://www.microsoft.com/whdc/driver/tips/default.mspx
>
>


From: chris.aseltine on
Nick Rivers wrote:

> The device got these Device Identification Strings:
> USB\Vid_xxxx&Pid_yyyy (Generic Composite USB device)
> USB\Vid_xxxx&Pid_yyyy&MI_00 (Video device)
> USB\Vid_xxxx&Pid_yyyy&MI_01 (Audio device)

I'm assuming you're leaving out the USB\Class_xx compatible IDs that
are also generated.

> Windows XP for example, detects a generic USB Audio device for the audio
> device and installs automatically
> the driver which is part of Windows XP. Therefore I´ve created that
> CoInstaller dll which installs
> the Audio device again, using the Audio.inf. That worked so far.

If you don't want to use the inbox drivers, my advice would be to use
custom values for the Class/Subclass/Protocol descriptors. Then you
don't have to fight whatever Windows is trying to load.

From: Eliyas Yakub [MSFT] on
Shouldn't you be using CopyINF directive to copy the INF files? There is a
section in the DDK docs "Copying INFs" that describes how to do this. There
is also a sample (\src\setup\cocpyinf\Install
) in the DDK that demonstrates how to use CopyINF directive. Remember, you
have to use coinstaller only on Win2K to parse the CopyINF directive in your
INF.


--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/tips/default.mspx