none
How to build a Driver Install Application for windows8 with C++? RRS feed

  • Question

  • I have a driver install application for WindowsXP, and it works very well.

    But it came across some problems when it run on Windows8 or Windows7.

    The function GetLastError returns 0xe0000203 or 1078.

    Wednesday, March 20, 2013 10:49 AM

Answers

  • Pavel identified the errors.  What I would do is rewrite the install application to use the DifxAPI this is a very easy API for installing drivers.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, March 20, 2013 12:17 PM
  • If it is plug and play you certainly can use DifxAPI what you need to do is create the device information using the SetupApi calls after DifxAPI has pre-installed the driver.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    • Marked as answer by Maogang Chen Tuesday, April 2, 2013 3:48 AM
    Monday, April 1, 2013 11:25 AM

All replies

  • 0xe0000203 is "ERROR_NO_DRIVER_SELECTED". 1078 is "ERROR_DUPLICATE_SERVICE_NAME'.

    Get this program to easily look up error values.

    /* Unfortunately, so many things work so well in WinXP that newer Windows versions will have hard time to displace it */

    -- pa

    Wednesday, March 20, 2013 11:46 AM
  • Pavel identified the errors.  What I would do is rewrite the install application to use the DifxAPI this is a very easy API for installing drivers.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, March 20, 2013 12:17 PM
  • Is there a sample for using AifxAPI ? And would you please send me one? My email is yukun840101@hotmail.com.

    Besides, I came across an Strange issure. On some computers I can not install my driver with DiInstallDriver function and the driver has been signed by Microsoft. GetLastError returned 0xe0000203. But if I use the unsigned driver file, I can install it.

    Thursday, March 28, 2013 2:14 AM
  • If you look in the documentation such as http://msdn.microsoft.com/en-us/library/windows/hardware/ff549680(v=vs.85).aspx they give you the code snippet to install.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    • Marked as answer by Maogang Chen Monday, April 1, 2013 3:35 AM
    • Unmarked as answer by Maogang Chen Monday, April 1, 2013 3:35 AM
    Thursday, March 28, 2013 10:29 AM
  • I can not use AifxAPI to install a virtual driver, although the function DriverPackageInstall returned ERROR_SUCCESS.
    Monday, April 1, 2013 3:48 AM
  • If it is plug and play you certainly can use DifxAPI what you need to do is create the device information using the SetupApi calls after DifxAPI has pre-installed the driver.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    • Marked as answer by Maogang Chen Tuesday, April 2, 2013 3:48 AM
    Monday, April 1, 2013 11:25 AM
  • I installed a virtual netcard driver on my computer. After that my local connect icon appears with a red cross. Even if I uninstall my virtual driver and reinstall the physical net card driver, the red cross is still over there. I thought maybe some service or process was closed by my virtual driver, but I could not find it.

    Would you please give me some suggestion?

    Tuesday, April 9, 2013 9:55 AM
  • May I ask you another question here?

    I developed a usb driver for bluetooth dongle, and I want to write the compitable id to the inf file so I do not need to add any VID&PID to the inf file. But when I do that, I can not use inf2cat.exe to generate .cat file. The error is:

    "B2.6.4.9: All Universal Serial Bus(USB) devices must have VID and PID sections in the PnP Device ID string. Third-party USB function drivers must not install through a compatible ID match. The following formats are not acceptable: USB\Class_ii,USB\Class_ii&SubClass_jj,USB\Class_ii&SubClass_jj&Port_kk

    But I found some other usb driver use compatible and the driver was signed very well.

    How to generate .cat file with inf2cat.exe for usb driver with compitable id in it?

    Is it neccessary to generate .cat file with inf2cat.exe if I want to pass winqual?

    Thursday, May 23, 2013 12:32 PM