Installing NDIS intermediate mode driver using Bindview application code

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi:

I am trying to automatically install an IM driver given the .sys, .inf
and the _m.inf files. I used the code from the Bindview application:

hr = GetPnpID( lpszInfFile, &lpszPnpID );

if ( hr == S_OK ) {

hr = InstallSpecifiedComponent( lpszInfFile,
lpszPnpID,
&GUID_DEVCLASS_NETSERVICE );

CoTaskMemFree( lpszPnpID );
}

This completes without any errors but does not complain about the
"driver not being signed" as it does if I install the driver manually.
When I check the network interfaces, the driver appears in the list and
the .sys file is also present in the Drivers directory. However, this
doesn't quite work as when I try to use the driver later in another
application, it errors out saying "driver not loaded".

Interestingly, if I install the driver manually followed by a manual
uninstall and then run the installer using the above code segment, it
works just fine. This makes me think I might not be calling the right
call in the BindView app or missing some other call that is required
for a complete install.

The steps for a manual install that works are:

1. On the desktop, right-click the My Network Places icon and choose
Properties.
2. Right-click on the relevant Local Area Connection icon and choose
Properties.
3. Click Install, then Service, then Add, then Have Disk.
4. Browse to the drive/directory containing the inf file. Click OK


I am totally stumped by this and any help would be highly appreciated.

Thanks!

.



Relevant Pages

  • Re: assessing winusb potential
    ... I am able to install it on Vista successfully with the following INF. ... This INF is taken from Thesycon (USBIO driver - Third party) and modified. ... refer to the Windows DDK documentation. ...
    (microsoft.public.development.device.drivers)
  • Re: Asus V9250 magic graphics driver - cant see adaptor in Contro
    ... I did what you advised and driver is not installed so i've missed some ... However i relied on inf import to ... adapter is correctly installed (using device manager-install) and compare ... when you install the driver through Device Manager you are ...
    (microsoft.public.windowsxp.embedded)
  • Re: Loading winusb.sys in Window XP
    ... I attached my inf file, ... And when I tried to install the driver, I am getting the error code 37. ... for Driver Service osrusbfx2 using KMDF lib version Major 0x1, ...
    (microsoft.public.development.device.drivers)
  • Re: Windows XP vs Vista update unsigned PNP USB driver
    ... If you update the sys file, its version should be changed, and you need to ... do the same in the DriverVer of the INF file. ... So the INF file should change whenever you update the driver. ... Fresh install of sys file and inf file presents the user with a Security ...
    (microsoft.public.development.device.drivers)
  • Windows XP vs Vista update unsigned PNP USB driver
    ... trying to update the driver, the update logic seems to behave differently on ... Fresh install of sys file and inf file presents the user with a Security ...
    (microsoft.public.development.device.drivers)