Check PID/VID of a USB Pen/Thumb Drive

Hi, I would like to read the PID and VID of the USB Pen Drive without using the NI VISA development wizard. This is because, when the pen drive plug in, the windows will automatic detect the windows inf file and install the driver for the pen drive. Is there any way to read and detect the PID/VID of the pen drive such as query the windows registry or call API of the Windows Device Manager?
Please kindly help! Thanks a lot!

Unfortunately there is no easy-drive API functions, which can acuire USB device information so easily. Instead, you must use Configuration Manager API, which is declared and implemented in SETUPAPI.H/DLL.  Probably it will be very hard to call them from LabVIEW.  Then you must use
SetupDiGetClassDevs() - retrieve HDEVINFO handle from the GUID, which is associated with your device or hosted device driver.
SetupDiEnumDeviceInterface() - enumerate active USB devices from the above-acquired HDEVINFO resulting SP_INTERFACE_DEVICE_DATA
SetupDiGetInterfaceDeviceDetail() - acquire detail info from SP_INTERFACE_DEVICE_DATA resulting SP_DEVINFO_DATA
SetupDiGetDeviceInstanceId() - acquire the "device path name" from SP_DEVINFO_DATA, resulting a NULL-terminated string, which will include the USB VID/PID values in hex-format, such as including "USB\VID_xxxx&PID_xxxx\..." string. 
You can loop above API calls for each enumeration, until the destinate VID and PID are found.

Similar Messages

  • In my Apple Macbook Air, most of the USB Flash/Thumb Drives are not shown in the Finder Window. Only a few Brands of USB /Flash Thumb Drives are shown or compatible or shown in the Finder. How do I use any Flash/Thumb Drive with my Apple MacAir?

    In my Apple Macbook Air, most of the USB Flash/Thumb Drives are not shown in the Finder Window. Only a few Brands of USB /Flash Thumb Drives are shown or compatible or shown in the Finder. How do I use any Flash/Thumb Drive with my Apple MacAir?

    Yes, junker thumb drives pour like rain in the market.  
    Which makes are working on your Air, and which arent?
    Stick to Sandisk and a couple of other reliable mfg. of memory sticks

  • My USB Stick(Thumb Drive) not Supported and Anothe...

    I have 8Gig Patriot Thumb drive. I used OTG USB cable to connect it to my N8 but phone says USB Device is not supported. ALso When I try to connect my Iomega External Hard drive I get the same error.  Can this be possible? Cause patriot and iomega is very well known company in hard drive and thumb drive. I would be very surprise if N8 doesn't support their products.
    So can anyone confirmed for me that  those companies simply not supported in N8 or I am getting at error which I am not suppose to.
    Also there is one more thing, I usually have around 8.9gig left in internal memory. Whenever I try to move 6 gig Mkv files to internal drive I am keep getting error that there isn't enough memory left. Then I tried with my 16gig microsd card. It had 14.9 gig memory left and I tried to copy 6.9 gig Mkv file to microsd card. I got the same error. So can any help please?
    Thanks

    rajnikant90 wrote:
    Also there is one more thing, I usually have around 8.9gig left in internal memory. Whenever I try to move 6 gig Mkv files to internal drive I am keep getting error that there isn't enough memory left. Then I tried with my 16gig microsd card. It had 14.9 gig memory left and I tried to copy 6.9 gig Mkv file to microsd card. I got the same error. So can any help please?
    Not a computer engineer but isn't this like using a PC with less than 10% free space, it all becomes unworkable. For internal memory doesn't it have to allocate 6GB first leaving it less than 3GB to actually carry out the task?
    Happy to have helped forum with a Support Ratio = 42.5

  • USB Hard / Thumb Drives and lost / hidden / duplicate new folders

    It seems I can force this problem to happen consistently on multiple MacBooks with different USB storage devices. Her is what happens:
    Connect a USB external hard drive or data stick
    Open Finder on that device
    Create a new folder with keyboard short cut command (CMDShiftN)
    quickly type the name of the new folder
    THEN the following happens:
    two! new folders will appear with the new name
    Sometimes an adjacent folder gets renamed to the new name, yet the contents in both folders are the same (which is empty, due to the newly created folder)
    if I switch views (from Icon to panes or list), both of the new folders disappear
    If I switch back to icon view, both re appear
    If I delete one (does not matter which) then both are deleted (sent to trash, thank goodness) including the adjacent folder which had other data in it!
    IF I type the new name of the newly made folder real slow, then all seems to work well
    I purchased my mac in June 06. This just happened today. I run 10.4.10 with latest firmware. Plugged in a USB 1GB Centon Data Stick.
    Two days ago, my buddy, who just bought his MacBook last month, described the same problem. He had an external W.D. USB drive (powered from the Mac). He spent a day creating folders and organizing data. He said every once in a while, it would happen to him, especially on new folders with short names). I thought it was user error, since he was new to the architecture. Ironically, he was sitting next to me when it happened to me today.
    What are your thoughts?
    Chaplain Dan
    US Army (AIRBORNE)
    Mesopotamia, Iraq

    I have only seen this reported as happening with things on a server, or on an external drive that is formatted for Windows (FAT32). How is your USB drive formatted? If it is not Mac OS Extended, see this thread:
    http://discussions.apple.com/thread.jspa?messageID=4036998
    It appears to be a Finder bug. You can either live with it, or else copy the files somewhere else then reformat the drive and put them back.
    Francine
    Francine
    Schwieder

  • I just purchased a USB lion thumb drive will I be able to install it on 2 Macs with different apple IDs?

    My partner and I both have macs I want to update to lion, i just purchased the lion thunb drive, obviously we both have our own apple ID, will I be able to install it on both computers? If not how could I buy a second product key.
    Thanks

    There is no product key involved for Lion.

  • Mac thinks my USB flash thumb drive is a blank CD

    I just got a new flash drive (Sandisk Cruizer 1gig). When it's inserted, Finder launches an error message saying "You inserted a blank CD. Choose and action for the pop-up menu or click ignore".
    I've used a dozen different flash drives on this machine, never had this message.
    I reformatted the drive using disk utility as both OS and MS-DOS, and the message continues.
    I get the same message on my iBook.
    Any suggestions to get rid of this?

    Hi
    From what you have said, I would be suspecting the flash drive to be defective. See if you can exchange it at the shop.

  • Can Wireless Live! record to USB thumb drive?

    If I were to get a USB portable thumb drive (8MB) and plug it into the Live! server could I have it record video when motion is detected? That would be a great feature since I wouldn't have to turn my home computer on while on vacation and it would allow me to access the files remotely.
    Another question, if I were to change the camera to one that had a microphone as well as video, would the audio be recorded? Could I hear the audio while remotely monitoring the camera?

    Michael Levin wrote:
    ...I rebooted just in case, and it showed me a login screen again but also a message saying that the boot volume (the thumbdrive) is full. What did it fill it with? Since it's possible to boot off a DVD, I guess it doesn't really need to write to the boot volume, right? What am I doing wrong?
    When you boot from the internal, start Disk Utility and mount the USB drive, what does it say about available space?
    FWIW, I did the same thing in order to use DiskWarrior on a rMBP and what's on the USB drive is just a standard, bootable installation of Mountain Lion plus DiskWarrior. Disk Utility tells me that I have 7.43 GB free but that's because I used a 32 GB flash drive, not a 16 GB. Most of the time, if you're booting off a DVD, it's an installer, not a fully functioning install; DiskWarrior used to provide a bootable DVD but the last one was OS 10.4. I'm surprised you could fit a full ML install on 16 GB. I could fit Snow Leopard on a 16 GB flash drive, but not ML.
    And yes, since the OS thinks it's simply a standard installation (which it is), it does have to be able to write to the boot drive. Also, the installer customizes the installation for the Mac it's being installed on. If the other machine you used to install ML on the flash drive is a different kind of Mac, you may run into compatibility problems.

  • USB Mass Media driver trouble

    I have a HP Pavilion desktop model a6334f running Windows Vista 32-bit and whenever I reboot the computer it is recognizing a USB flash/thumb drive in one of my USB ports, but it's not plugged in.
    I checked the Device Manager for this USB port and it gives me the following error message:
    LOC: PORT_#0005, HUB_#0008
    Windows cannot use this hardware device because it has been prepared for "safe removal", but has not been removed from the computer. (CODE 47)
    To fix this problem, unplug this device from your computer and plug it in again.
    The flash/thumb drive is NOT in either of my USB ports but for some reason everytime I boot the PC it recognizes it in the USB port and intermittently the PC will reboot on it's own.
    It appears to me that this port is "hung-up". I've tried to uninstall this driver and it will uninstall OK but when the PC reboots, it just reinstalls the driver and I'm back where I started.
    Any help would be appreciated.
    Thanks!
    JF

    Hi Dibyo,
    Welcome to the HP Forums! I saw your post about the USB issues and I will be happy to help. How long is a long period of time? I am going to need your product number because there are several models in the Pavilion g6 series. What operating system are you running?
    Find your product number on a notebook:
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=c00033108
    Finding your OS:
    http://windows.microsoft.com/en-CA/windows/which-operating-system
    Thank you,
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • How to enable read and write to thumb drive,how to enable read n write on thumb drive

    How to enable read n write to my thumb drive

    Format it for apple or Fat32 or exFat.
    Check the write protect switch on the thumb drive.

  • Can I use Lion Thumb Drive as normal USB pen drive?

    I have Thumb Drive OS X Lion, the question is:
    Can I format this Thumb Drive and use if as a normal pen drive in Mac and windows PC?
    If yes, how do i format the Thumb Drive?
    thx! =)

    Yes; as a Microsoft FAT-format volume.  It's probably already in that format as most external storage devices such as traditional hard disk drives, flash disks or key drives or USB sticks arrive that way, and OS X can use FAT directly.  Plug it in, and you're good to go. 
    If you want to erase and start over with a particular storage device – to reformat the storage as FAT – then use Disk Utility, in the Applications > Utilities folder, and select the formatting option.
    But if you're not going to use the storage on Windows (without having to reformat it back to FAT) and if want to use it to best advantage, I'd reformat Windows FAT or NTFS volumes over into the HFS+ volume structure; to reformat the storage using the native file system of OS X.
    As for how to reformat as FAT...  From the Disk Utility help:
    "You can use Disk Utility to format a disk to use with a Windows computer.
    Notice: Formatting a disk erases all the files on it. Copy any files you want to save to another disk before formatting the disk.
    Open Disk Utility, in the Utilities folder in Launchpad.
    Select the disk you want to format for use with Windows computers.
    Click Erase, and choose one of the following from the Format pop-up menu:
    If the size of the disk is 32 GB or less, choose MS-DOS (FAT).
    If the size of the disk is over 32 GB, choose ExFAT.
    Type a name for the disk.
    The name’s maximum length is 11 characters.
    Click the Erase button, and then click Erase again."

  • I need a way to get usb thumb-drive securely recognized as a apple keyboard

    I posted this question over at Developer Discussions also, just to get more eyes on it, not to be disruptive.
    So, I would like to utilize a maximum-length Admin. password (255 characters?) without having to manually type it in each time I login, install/update software, or for any other reason. The perfect situation would be some type of script or software installation onto a USB pen drive (2 gig sony)which is inserted into the macbook (via usb) when the Leopard Login screen appears. It logs me in, then, afterwards, it creates a clickable icon on the desktop that achieves the same goal (entering a long admin password securely). And all of the above is achieved using the built-in security of Keychain access, without having to continuously mount and unmount the drive.
    Searching google produces many expensive products that do not fit: Securikey, omnikey, smart cards, tokends, and on and on. They seem to have figured this out at microsoft - not that it matters much, except that it appears to be possible.
    One problem is that a USB thumb drive is not mounted until after login, it seems, but, I plugged in a friend's usb apple keyboard from the year 2000 and was able to type in my password at login. And, an email reply elsewhere suggested writing a daemon (that constantly runs in the background of the operating system) that could recognize the drive and accept a script from it that inputs the password and executes the 'enter' command.
    I don't know how to write daemons yet, but I can stumble around a bit with bash and applescripts, and I can copy any Xcode project out of a book and make it run properly. I'm a beginner.
    This project might create security issues for my operating system, but I'm really not concerned about that because this is a computer I don't rely on and can safely perform experiments on. And I would like to use this as an opportunity to learn - so I'm going to give it a whirl anyway - unless someone has already accomplished something similar. In that case, why reinvent the wheel and plug it into the wall, eh?
    Basically I am asking for help. Any suggestions would be greatly appreciated.

    You don't need to get deep into programming to do much of this.
    launchd, the background process that's responsible for launching most of the background processes on your machine, has the ability to launch a script based on disk mount events.
    StartOnMount <boolean>
    This optional key causes the job to be started every time a filesystem is
    mounted.
    So you could create a LaunchDaemon script that watches for a disk mount. When a disk is inserted your script is fired off. You'd need to perform some verification to ensure the disk is, indeed, your USB stick and not some other device, then it can trigger the rest of the login process. Off hand I'd look to osascript to run an AppleScript-based keystroke, but there may be other ways, too.
    One big question relates to securing your password. Clearly you can't store it in the script, so you'd have to read it from somewhere. You also can't store it on the USB stick unless you somehow encrypt it (otherwise someone can just look at the files on the USB stick and get your password), but AppleScript can use the keychain, too, although I'm not sure what keys would be available prior to login, so it requires some experimentation.

  • Using USB thumb drive with Parallels and Microsoft Windows XP

    I installed Parallels 3.0 because I need to use a few windows applications for work. I am currently unable to find the USB thumb drive when I plug it into the USB port. It is connected and is selected, but I can't figure out how to access it. I check in "My Computer" just like I would on a PC, but the thumb drive is not listed. Any suggestions.
    Macbook with Leopard
    Thanks.
    Jon

    You're right, it should show up under My Computer. You may want to post your question over on the Parallels forums: http://forums.parallels.com as they're more geared toward the issue since Parallels is not an Apple product.

  • USB thumb drive not recognized on nc6120 laptop

    I had Windows XP Professional on my NC6120 Compaq laptop.  Due to Microsoft saying it was an illegal copy I had to get a different OS.  I purchased a Dell Windows 7 Professional and loaded it via the different prompts.  Once loaded I had no sound, no mouse, no USB operative.  I fiddle fooled around in spite of these assinine sites that say they have the driver you need as though they are legite and all I got was crap loaded that I did not want or ask for.  After many hours of trying I finally got some sound recognigition, and the mouse to work.  I still have some graphics problems and script problems along with the fact that the computer does not recognize a thumb drive in any of the USB ports.  I have tried everything that I could find on the internet and HP, Intell etc and I am at a loss as what to do.
    I am not a fan of Microsoft forcing me to upgrade or because of no support to XP anymore but like everyone else I am held hostage to this monopoly.
    Can any one help to at least get the USB's to recognize an "E" drive using a thumb drive.  Is it possible that this Compaq NC6120 laptop doesn't have the gears to run Windows Professional?
    Please help.

    Hi:
    W7 should work on your model by using some of the Vista drivers from your notebook's support and driver page.
    I have no idea why the usb ports aren't working.
    Suggest you reinstall W7 and do the following...
    1. Install the Intel chipset driver first and reboot.
    https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=20019&lang=eng&ProdId=816
    2. Manually install the Vista graphics driver as follows...DL and run this file.  You will get an unsupported operating system error.
    http://h20564.www2.hp.com/hpsc/swd/public/detail?sp4ts.oid=447347&swItemId=ob_47264_1&swEnvOid=2094
    Go to the device manager and click to expand the Display Adapters category.  Click on the standard vga adapter.
    Click on the driver tab. Click on update driver.  Select the Browse my computer for driver software option and browse to the driver folder that was created when you ran the file.  That folder will be located in C:\SWSetup\sp34749.
    Make sure the Include Subfolders box is checked and the driver should install.  Then reboot.
    Audio:  Be connected to the internet.  Go to the device manager and click on the multimedia audio controller needing drivers.  Click on the driver tab. Click on Update driver.  Select the automatic search and after a few minutes, Windows update should find, download and install the audio driver.
    Wireless:  If your notebook has the Intel Pro 2200 B/G, manually install the Vista Intel wireless driver like you did the graphics driver.
    Card reader:  Use the vista driver from the nc6400.
    Wireless assistant.  Use the W7 driver from the 6910p
    Quick Launch Buttons:  Use the W7 driver from the 6910p.
    Touchpad:  Use the W7 driver from the 6910p.
    If you need any other drivers, please let me know.
    Oh, and if you don't like all the Dell stuff showing up on your PC, just download this plain W7 Pro 32 bit SP1 ISO file directly from Microsoft, and use the Dell W7 Pro product key on it.
    http://msft.digitalrivercontent.net/win/X17-24280.iso Windows 7 Professional x86 English
    Then use this tool to transfer the ISO file to a 4 GB USB flash drive or DVD.
    The tool will also make the media bootable.
    http://www.microsoft.com/en-us/download/windows-us​b-dvd-download-tool?ClickID=arovv0vz55a0sszplnnzy...

  • USB thumb drive crashes MBP and PowerBook G4

    Hi!
    I have a USB thumb drive. It mounts on the Desktop (as two drives, which is not strange because it has both an internal 6 MB of memory and a 2GB SD card) and I can open them. But if I attempt to copy a file either to or from the drive, the Finder hangs forever.
    This problem exists both on a shiny new MacBook Pro with 10.4.7, and a PowerBook G4 with 10.3---in either case, I must hard-reboot the machine.
    DiskUtility says that the drive checks out OK.
    Any thoughts? I tried reformatting the thumb drive, which worked temporarily; but when I added a file to the drive on another machine and tried to transfer it to the Mac, the thing hangs Finder again.
    I don't have any problems with the drive on PCs, and I don't have the problem with other USB drives on the Mac.
    Xcott

    It sounds like the file system is corrupt. I am assuming it's FAT32. I would reformat the drive partitions on a Windows machine and see if that helps.
    Also, because it's a dual, you might want to make certain that you do not plug it into a hub or a keyboard but directly into your Mac's USB host port. It may need additional power...
    Good Luck!

  • USB Thumb Drive won't appear or mount on Desktop

    I'm preparing to upgrade to Mavericks, and before I do, I want to make a bootable drive on a PNY USP 2.0 FD Media thumb drive.  When I insert the thumb drive into a USB port, it doesn't mount.  It doesn't appear on the desktop.  The drive is listed in Disk Utility, but Verify, Mount, and other First Aid options are greyed out.  I can only unmount the drive from Disk Utilities.  I've checked the Finder preferences, and External Disks is checked under "Show these items on the desktop".  I'm not sure if I've used this thumb drive before or not.  I was trying to check this disk before I created a bootable disk. I might have already done this shortly after I purchased my iMac, but I'm not sure.  Other USB drives mount fine, and show all of their contents.  I'm using an iMac currently running OS X 10.8.5.  I'd appreciate any hints on what might be going on here.  Thanks!

    Pretty much sounds like the USB Drive is karput. Buy another one.
    Cheers
    Pete

Maybe you are looking for

  • PNG images revive deleted images in the form of a thumbnail, potential risk

    Saving a PNG image will revive deleted photos. To replicate this, save a PNG image, such as the ones on XKCD's "What If?", and deleted images get revived in the form of a thumbnail overlapping the image. This has been here since IOS 5, according to h

  • Ibook G4 won't start

    I have a G4 running OX 10.4.6. I was downloading an Apple upgrade when the machine seemed to get stuck. I tried shutting down ans restarting with no luck. I tried to use the disc to reboot, nothing. I tried to safe start and the chime won't even ring

  • Where does Internet Connect store its preferences?

    I've managed to mess up my Internet Connect settings (which used to work fine, with VPNs etc. etc.). Fortunately I have a complete mirror backup of my disk from before this problem. I don't want to do a full restore; does anyone know if there's a fil

  • McAfee Antivirus automatic remediation

    Hello All, I'm having an issue with McAfee Antivirus remediation. I'm using Cisco NAC 4.8.2 and it seems that automatic remediation is not working. Could someone help? Is there a webpage where we can check which AV can do automatic remediation?

  • Rosettanet Inbound message erroring with error

    Hi, We are getting ""PI with the name 'xml' can occur only in the beginning of the document" error for inbound messages in Rosettanet format. This is happening for only one TP, but there is no difference in the message format except few extra lines.