CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Mar 2013
    Posts
    1

    How get same info as Win32_PortConnector from DeviceIoControl

    I can tons of information by calling DeviceIoControl (such as device ID, device description, whether it's connected or not) since I couldn't do it all with WMI. But I haven't figured out how to get from DeviceIoControl the info that a call to WMI's Win32_PortConnector gets. Are there any calls, directly to DeviceIoControl or something else that for a given device ID or device description would get the PortConnector information?

    I would have used a combination of Win32_PortConnector and DeviceIoControl calls but the trouble with PortConnector is that it doesn't provide any information that would allow one to figure out which device ID it belongs to. Why do I need to do this? Because I'd like to get a combination of all the information the two methods provide for a given device such as a USB port, and all I'm getting from Win32_PortConnector is these scant few fields with no other clue:


    string Caption;
    string ConnectorPinout;
    uint16 ConnectorType[];
    string CreationClassName;
    string Description;
    string ExternalReferenceDesignator;
    datetime InstallDate;
    string InternalReferenceDesignator;
    string Manufacturer;
    string Model;
    string Name;
    string OtherIdentifyingInfo;
    string PartNumber;
    uint16 PortType;
    boolean PoweredOn;
    string SerialNumber;
    string SKU;
    string Status;
    string Tag;
    string Version;

    Thank you!

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: How get same info as Win32_PortConnector from DeviceIoControl

    I am not sure what you are trying to achieve but from what I gather, you are comparing apples to oranges.

    MSDN:
    The Win32_PortConnector WMI class represents physical connection ports, such as DB-25 pin male, Centronics, or PS/2.

    Using DeviceIoControl, you are communicating with device drivers sending control code to the device, not to the physical connection port.
    Could you explain in more details how do you use DeviceIoControl (IO codes) in order to get information?
    How do you determine what devices you use?
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured