Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

DriveInfo library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-16-2009, 11:11 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default DriveInfo library

This small library enables the names of the storage cards of a device and the size and free space of a card or disk drive on desktop or device to be determined.

Desktop and device dlls, help source code and demo are in the archive as usual.
Attached Files
File Type: zip DriveInfo1.0.zip (11.8 KB, 168 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #2 (permalink)  
Old 09-16-2009, 02:57 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thank You Andrew. Although I didn't ask for this library; it's incredibly useful! It works with network shares too. I'm pleased you included the drive total size so we may do the obvious percentage calculation.
Reply With Quote
  #3 (permalink)  
Old 09-16-2009, 08:20 PM
Senior Member
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 111
Default

I plan to tie my results into Andrew's Charts library for a 3 colour pie chart display of what's left available out of the total target drive - and how much of that the files I want to add will use up.

Apart from a mystery USB drive that won't reveal itself as a Hard Disk to the iPAQ, all is working well. Thanks Mr Graham.
Reply With Quote
  #4 (permalink)  
Old 09-17-2009, 08:33 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Caravelle View Post
Apart from a mystery USB drive that won't reveal itself as a Hard Disk to the iPAQ,
I assume that the USB drive is plugged into a host port of the iPAQ. Is it a specific USB drive or any USB drive? DriveInfo.GetStorageCardNames picks up USB drives OK on my iPAQ214.

Actually GetStorageCardNames just looks at the files under "\" and picks anything with the Directory with the Temporary attributes set (256 + 16 = 272). You could have a look with FilesEx.FileGetAttributes and see if the errant USB drive is present with a different set of attributes.
Code:
Names() = Fex.GetDirectories("\""*.*")
If ArrayLen(Names()) > 0 Then
  
For i = 0 To ArrayLen(Names()) - 1
  atts = Fex.FileGetAttributes(
"\" & Names(i))
  msg = msg & Names(i) & 
" " & atts & CRLF
Next
Msgbox(msg)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #5 (permalink)  
Old 09-17-2009, 10:55 PM
Senior Member
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 111
Default

Sorry, I should have made myself clearer, I wasn't expecting anyone to try to solve what appears to be a hardware problem, indeed I've posted a question in two different pocket PC forums and not received any advice that helps.

I have lots of USB drives. They are all formatted FAT32. They all work fine with your library except one which - though it works perfectly when plugged into an ordinary PC - is totally invisible to the iPAQ. As File Explorer can't see it, I'm not surprised that your library can't see it either. The internal light comes on in the drive when plugged in, so it is connected.

I'll have a go with the code you've kindly supplied, but seriously, I think there must be something wrong with the drive, probably in whatever hidden software instructions talk to the machine it is plugged into. A simple check on the PC via My Computer reveals no obvious differences between a working drive and the invisible one, but who knows what is hidden away on those things.

Whilst I would still like to make this particular drive work with the iPAQ (16 GB storage is not to be sniffed at) the prospect of having to buy another one made me realise that if I was going to have to buy another 16 GB of storage, I might as well buy a 16 GB SDHC card instead. That can sit in the iPAQ for my entire trip, is much less likely to get lost, won't need the special cable, may even be faster and use less power. Every cloud has a silver lining

Caravelle
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 06:55 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0