1 Replies - 8249 Views - Last Post: 29 April 2008 - 10:46 AM Rate Topic: -----

#1 HelpWithVB6   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 29-April 08

Read data from a usb drive in VB

Post icon  Posted 29 April 2008 - 09:48 AM


I need to create a VB6 utility that will check whether a usb drive is plugged in and if yes, then will read files from the usb drive and copy to the system.
Could somebody provide me with sample code?
Is This A Good Question/Topic? 1

Replies To: Read data from a usb drive in VB

#2 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5227
  • View blog
  • Posts: 14,008
  • Joined: 18-April 07

Re: Read data from a usb drive in VB

Posted 29 April 2008 - 10:46 AM

It is site policy that we first see someone's "Best Effort" attempt at solving the problem themselves before we can help. This usually means posting some code that you have written already to try and solve the problem and then we can further assist you in modifying it for the correct solution.

To get you started I can tell you that most USB drives when plugged in are seen as "removable" hard disks which will be a slam dunk but some are also seen as "fixed" which may look like other hard drives. In this case you can check the bus type of the drive to see if it is usb and you will have your answer. The first step in your journey can be helped using this code found at...

How to Determine the Type of Drive using Win32

Don't worry the code there is VB 6. The second part is for the select case "fixed" determining the type of fixed drive you have there. That is where you will need to determine the bus type.

Hope this helps!

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1