Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General Discussion » View Thread |
Messages 1 to 3 of 3 total |
Is a card in the cardreader? |
Fri, Dec 23 2011 8:33 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | For a small app I'm writing I'm using GetLogicalDriveStrings to get the removable drives. On one PC with a Technica card reader attached I have a problem. GetLogicalDriveStrings lists F,G,H,I even when there are no cards in the slots.
Is there a way of working out which of them actually have a card in them? What I've tried so far (DirectoryExists, FindFirst) generate a Windows level message which D2006s exception handling doesn't cope with - its not seen as an exception. Roy Lambert |
Fri, Dec 23 2011 9:10 AM | Permanent Link |
Raul Team Elevate | I'd suggest using something like GetDiskFreeSpaceEx and then if FreeAvailable is 0 (or TotalSpace is 0) then there is no media. Since cardreader shows up as removable media i suggest you call SetErrorMode(SEM_FAILCRITICALERRORS) to avoid windows showing one those annoying media not present prompts Raul On 12/23/2011 8:33 AM, Roy Lambert wrote: > Is there a way of working out which of them actually have a card in them? What I've tried so far (DirectoryExists, FindFirst) generate a Windows level message which D2006s exception handling doesn't cope with - its not seen as an exception. |
Fri, Dec 23 2011 9:48 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Raul
SetErrorMode(SEM_FAILCRITICALERRORS); was the bit I really needed - never had to do it before so had no idea what to look for. With that bit a simple DirectoryExists gives me what I need. I posted here in desperation since the dear old cg ngs are down again. Maybe when Tim's got EWB complete we should all get together and produce a nice newsreader (on and off line) for them as a gift <evil grin> Roy Lambert |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |