NDIS MUX driver Virtual miniport Installation problem

Hi,

I have a MUX intermediate driver and I need to install Virtual miniports using UI.
I am using SetupDixxx api for this. Problem is I can create 2 Virtual miniports easily, but when I try to create 3rd one, it fails.
Here is how i am creating VM.

SetupDiCreateDeviceInfoList (for creating NET class infolist)
SetupDiCreateDeviceInfo (create element)
SetupDiSetDeviceRegistryProperty (set HardwareID)
SetupDiCallClassInstaller (Transform the registry element into an actual devnode)

After this I call “UpdateDriverForPlugAndPlayDevices” with hardwareID and inf to install the actual adapter.

While installing 3rd adapter it fails.
Are there any known issues in Vista default co-installer.
I get following info in inf\setupapi.dev

I am stuck on this and any help on this will be really appreciated.

Thanks,
Virendra

{DIF_INSTALLDEVICE} 18:08:21.921
dvi: CoInstaller 1: Enter 18:08:21.921
cci: [NdisCoinst: Enter NcipHandleInstallPreProcessing]
cci: NdisCoinst: NetCfgInstanceId does not exist
cci: NdisCoinst: Guid of the adapter is {1DDCFC76-0182-48CB-850A-5EB3E1D4FF6E}
inf: Opened PNF: ‘C:\Windows\INF\oem20.inf’ ([strings] )
cci: NdisCoinst: IfType from registry is 6
cci: NdisCoinst: IfType 6, Characteristics 0x21, IsIrdaDevice 0, PhysicalMediaType 0, MediaType 0, IsBridge 0, FoundGuidInDownlevel 0
cci: NdisCoinst: Connection name is Local Area Connection 94
cci: NdisCoinst: NetLuidIndex does not exist
cci: NdisCoinst: Allocated NetLuidIndex is 53
cci: NdisCoinst: NcipCreatePersistentInterface failed with error 0x1f
cci: NdisCoinst: Freeing the allocated NetLuid IfType 6 NetLuidIndex 53
cci: [NdisCoinst: Exit NcipHandleInstallPreProcessing]
!!! dvi: CoInstaller 1: failed(0x0000001f)!
!!! dvi: Error 31: A device attached to the system is not functioning.
dvi: {DIF_INSTALLDEVICE - exit(0x0000001f)} 18:08:21.968
!!! ndv: Error(0000001f) installing device!
ndv: Device install status=0x0000001f
ndv: Performing device install final cleanup…
! ndv: Queueing up error report since device installation failed…

A couple of quick questions: 1) What version of NDIS are you using 5.x or 6.x? 2) Have you looked at the MUX sample’s notify object code?

As Rob suggests use the MUX sample’s Notify Object and generate a Property Page for your MUX driver. Use the Proterty Page to create the virtual miniports via the unbind/bind functionality of the Notify Object.

Larry C

Thanks Rob/Larry,

NDIS version is 6.0. Yes I have gone through MUX notify object sample, but my question is when I am able to create 1st and 2nd team(Virtual miniport) why not 3rd team :).
The method I am using is working fine on Windows 7 and Windows 2008 R2 i.e. I can create 4 teams without any issue.
Because of some internal reasons or say some bad experience in past, my company wont approve use of notify objects or co installer for teaming.

One more observation above is if I do a fresh install of OS (WS08 SP2) it works fine.

What i was wondering is if this "NdisCoinst: NcipCreatePersistentInterface failed with error 0x1f "
some known issue in M$ code.

Thanks,
Virendra