Device Console (DevCon) Tool

DevCon is a command-line tool that displays detailed information about devices, and lets you search for and manipulate devices from the command line. DevCon enables, disables, installs, configures, and removes devices on the local computer and displ...

C++ (72.5 KB)
 
 
 
 
 
(5)
8,855 times
Add To Favorites
10/26/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to Ask a Question


  • APPCRASH of Sample Code
    1 Posts | Last Post March 01, 2013
    • APPCRASH MSVCR110.dll after compiling sample code on Windows 7 and running on windows 7 and server 2012 I get the appcrash of the setup API.  Are there any updates to the problems others have seen as well?  I've installed WDK8 VS12Express.
  • Fix for the FormatToStream crash
    1 Posts | Last Post January 30, 2013
    • Simply replace the _fputts line inside the FormatToStream with _ftprintf, like this:
      
      //
      // now write to apropriate stream
      //
      //_fputts(locbuffer,stream);
      _ftprintf(stream, locbuffer);
      
  • Bug?:Only 1 file-driver for all particular devices on Win7 x86
    5 Posts | Last Post November 22, 2012
    • I've checked all devices for my Win7 x86 (+cmd RunAsAdministrator), but i've allways got 1 file used by driver, even for Radeon Video with a pack of drivers in Device manager->Driver details, how to get this info with this sample. (I used "\Program Files\Windows Kits 8.0\Include\Shared , platform toolset:Visual Studio 2012 (v110))
      
      Example 9: List the driver files of a particular device
      Driver installed from c:\windows\inf\msmouse.inf [HID_Mouse_Inst]. 2 file(s)
       used by driver:
              C:\WINDOWS\System32\DRIVERS\mouhid.sys
              C:\WINDOWS\System32\DRIVERS\mouclass.sys
      http://msdn.microsoft.com/en-us/library/windows/hardware/ff544746(v=vs.85).aspx#ddk_example_9_list_the_driver_files_of_a_particular_device_tools
      
    • Like this:
      devcon.exe driverfiles "PCI\VEN_1002&DEV_9714&SUBSYS_84541043&REV_00"
      PCI\VEN_1002&DEV_9714&SUBSYS_84541043&REV_00\4&456635&0&2808
          Name: ATI Radeon HD 4290
          Driver installed from C:\Windows\INF\oem38.inf [ati2mtag_RS880]. 1 file(s) u
      sed by driver:
      1 matching device(s) found.
    • And no path for this 1 driver ??.sys :)) May be there is another version of DevCon sources?
    • For empty path:
      DumpDeviceDriversCallback is not called again, thats why empty path.
      
      //
      // call again to dump the files
      //
      SetupScanFileQueue(queueHandle,SPQ_SCAN_USE_CALLBACK,NULL, (PSP_FILE_CALLBACK)DumpDeviceDriversCallback,NULL,&scanResult);
      
      But why count is 1 ??
      
      I think we have not LATEST sources now. 
      
      It can another solution (I'll check tomorrow): DumpDeviceDriverNodes -> get INFs -> DumpDriverPackageData or own function, but interesting and it's normal to have full working MS example function DumpDeviceDriverFiles, that should count all drivers files for certain device, like in Device manager->Properties->Driver->Driver Details or as in MSDN DevCon Ex.9. Who has do it?
    • MS! *facepalm*
       No __stdcall on DumpDeviceDriversCallback in this source ! And it run OK. At last.
  • Devconsample crashes built with VS2012
    1 Posts | Last Post October 17, 2012
    • Built sample with latest (as of 10/17) Win8Kit and WdfCoinstaller.  Same problem with FormatToStream.  What's the magic formula to get this to build correctly?
  • there is an update version
    1 Posts | Last Post September 27, 2012
    • but when I download it. an Error prompt "the extension could not be installed because the following error occurred: Device Console (DevCon) Tool is already installed.
      
      Current version:17.0
      New Version: 18.0
      
      can anyone help me out?
  • "Windows Setup API has stopped working" problem
    9 Posts | Last Post September 25, 2012
    • I built this source using VS2011beta, and copyed the devcon.exe and msvcr110d.dll to my target WIN8 OS9200 PC to install a driver, but met "Windows Setup API has stopped working" problem. I also tried the binary which located in my Windows Kits\8.0\Tools with WDK installed, it works fine. so don't know what the problem with the source code? do you have any ideas or suggestion? Thanks
    • please use VS PRO RTM with the RTM WDK. we have compiled and tested the sample without issue on our side
    • Thanks for your reply, Doron.
      yesterday I tried VS Ultimate 2012 with latest WDK installed, but still failed as above. so according to what you said, VS Professional 2012 is a must? I'll have a try
    • Hi,
      I tryed again in below environment, but still failed :(
      1) OS: Windows 8 enterprise x86 (9200) on VMWare virtual machine (VM and OS are newly installed)
      2) VS Professional 2012 newly installed
      3) latest Windows 8 WDK(downloaded from MS website) newly installed
      
      The issue phenomenon is the same, use VS2012 debug tool get below info,
      
      "Unhandled exception at 0x6608140B (msvcr110d.dll) in devcon.exe: 0xC0000005: Access violation reading location 0x00000064." 
      
      Could you help have a look, this is not only me have this problem, so maybe not a environment issue. Thanks~
    • found the issue in sample code, just comment the statement "FormatToStream", it can work now.
    • Hi allen or any expers,
      
      I have occur similar problem also today.
      But I cannot find out any statement "FormatToStream​" in source code,
      
      My environment is:
      
      1) OS: Windows 7 Ultimate x64 SP12)
      2) VS 2012 Ultimate tryout newly installed. 
      3) latest Windows 8 WDK(downloaded from MS website) newly installed.
      4) 
      The issue phenomenon is 
      
      Unhandled exception at 0x000007FEDBA2D904 (msvcr110.dll)  in devcon.exe: 0xC0000005: Access violation reading location "0x00000000000000E"
      
      C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\fputwc.c
      Line 92
      > msvcr110.dll!_fputwc_nolock(wchar_t ch, _iobuf * str=0x000007fedbabc600) 
      
      Please help or guide.
      Thanks deeply.
    • Hi Allen, 
      I got search the "FormatToStream"
      It's found in dump.cpp, devcon.cpp, devcon.h, cmds.cpp
      They are total 117 lines.
      did you mean to comment it all ??
      
    • Hi skyrover,
      That's depends on what feature you want in your "devcon", eg: if you just use devcon to install a driver, you could just comment this statement in function cmdInstall and cmdUpdate in cmds.cpp
      But this just a workaround, you will not see any print info on screen.
      hope this helpful~ 
    • Hi Allen,
      Thanks for your feedback!!
      I need devcon gather and output machine HW ID to txt file.
      So it's looks like this workaround not suit for me...
      I think MS is need ot check out these problems.....
      
  • Crashes on launch
    1 Posts | Last Post June 15, 2012
    • Followed instructions and compiled successfully, however devcon.exe crashes with:
        Problem Event Name:	APPCRASH
        Application Name:	devcon.exe
        Application Version:	6.2.8400.0
        Application Timestamp:	4fdaa4db
        Fault Module Name:	MSVCR110.dll
        Fault Module Version:	11.0.50522.1
        Fault Module Timestamp:	4fbac48d
      
      Attempted to compile from Win7 and Win8 RC. same issue on both.