Solved

pendrive usb fl hardware more info

Posted on 2013-06-26
3
478 Views
Last Modified: 2013-12-03
Hi Experts,

Can you help?
I'm not sure about those:

1 - I guess simpler.
Need Delphi solution to know Device usb memory stick space left free total in bytes-hardware (Not Volume which is logical value dependable on formatting etc)

2 - Not sure
Wonder also if that is possible to check s/n number for usb dongle memory ( pendrive) with Delphi simply which will work on all Windows OS


Use new XE Delphi.
0
Comment
Question by:johnnyex
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 39280767
- for usb space: mount/list all volumes of same phisical drive (usb)
http://stackoverflow.com/questions/4645162/how-to-mount-partitions-from-usb-drives-in-windows-using-delphi
... and sum all free bytes...
http://www.delphibasics.co.uk/RTL.asp?Name=DiskFree

- for usb serial number go to my answer to similar question:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_28140731.html

... Magenta Systems WMI can help you too.
0
 

Author Comment

by:johnnyex
ID: 39289920
sorry again, confused so which solution is best?
here we can see:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_28140731.html#a39203803

There we can see two methods:
http://stackoverflow.com/questions/4292395/how-to-get-manufacturer-serial-number-of-an-usb-flash-drive


Where author says: "UPDATE
Some drivers of the USB disks does not expose the manufacturer serial number on the Win32_DiskDrive.SerialNumber property, so on this cases you can extract the serial number from the PnPDeviceID property."

So which one is the best method which will work on all drives or maybe use two hybrid if one fail?

Would be good to have one solid solution which will just work is this from first link I posted or second method from stackoverflow link?
0
 
LVL 26

Expert Comment

by:Sinisa Vuk
ID: 39292269
As you said - you can use hybrid method, bu I think that is second (on update) method better.
//note if you have multiple volumes on usb then your serial is: <serial>/<index of partition>
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question