[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

pendrive usb fl hardware more info

Posted on 2013-06-26
3
Medium Priority
?
493 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 28

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 28

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Introduction to Processes
Suggested Courses

650 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