?
Solved

pendrive usb fl hardware more info

Posted on 2013-06-26
3
Medium Priority
?
483 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Sinisa Vuk earned 2000 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 27

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project
Suggested Courses

801 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