Enumerate devices using WMI RRS feed

  • Question



    I don't know it this is the right place for my question, but it's the best I've found.
    I’d like to enumerate and find all tape devices on the system and their info (like device id, device type and tape symbolic name).

    I know that it’s possible to use SetupDI API to perform this task, but this requires me to get the source code from the WDK and wrap it up to a DLL, while periodically checking for updates and updating my dll accordingly.

    Recently I’ve found out that it’s also possible to query WMI and get the needed info from  Win32_TapeDrive and MSTapeSymbolicName.

    I’m using C# and the second method is much cleaner and simpler to code and understand (using System.Management).


    My question Is whether the latter method is considered robust to possible changes by the devices manufacturers? Is it recommended at least as SetupDI, and will it be supported in future Windows versions?
    Thanks for any help,

    • Moved by jack 321 Thursday, September 18, 2008 8:22 AM not C# specific issue (Moved from Visual C# General to Off-Topic Posts (Do Not Post Here))
    Sunday, September 14, 2008 4:03 PM