123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|642|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Search for available drives

Sat, 29 Mar 2008, 15:51
Forklift_Fred
(whoops, sorry about the typo in the title! )

This is related to my file browsing code but I wanted some fresh eyes rather than it just looking like an update.

I've added buttons to jump to different drives and it works perfectly within the Blitz IDE (well, I'm using IDEal but you get my point!) but as soon as I try it as an executable I get an error from Windows as it checks drives that exist but don't have a disk (ie DVD and removable media such as Memory Stick, Secure Digital, etc, although the floppy drive is completely skipped over!)

Here's how I'm doing it



Nice and simple but perhaps a little crude. So is there a way of finding existing drives like there is with GfxModeExists?

I'll stretch myself into registry/system checks if someone can guide me gently

-=-=-
Come rain or shine...
Sat, 29 Mar 2008, 16:00
Jayenkai
So far I've not found a nice easy way to do it..
Depending on it's use, is there any way you could ask the user?
Maybe a small little monochrome icon set, bottom right, in a faux "status bar" with little ticks over each available drive..?

If you need a few initial clues, CurrentDir() will include the drive the proggie's running from..

In fact, those would probably help a little, too..
but only if they're not all in the same place..
..
Which they are on mine, and probably on 99% of users

-=-=-
''Load, Next List!''
Sat, 29 Mar 2008, 17:55
Forklift_Fred
Thanks, not sure they're useful on this occasion but I'll bare them in mind.

I just hopped over to BB.com and can't believe how quickly I found the answer! (Once I realised that I haven't a clue what my password is anymore so I can't search, I headed into the Code Archives and used FireFox to search the page )

From Klaas, to just identify the drives...



And from Jim Brown, to get extra info...



I got confused by the decls aspect because I'm not used to it but apart from that it works nicely. (although, for some reason it flagged my C: drive's name as not available!)

Sorry to answer my own question but at least I can share it with everyone here

-=-=-
Come rain or shine...
Sat, 29 Mar 2008, 18:14
Orion Pax
api_EnumResourceNames% (hModule%, lpType$, lpEnumFunc%, lParam%) : "EnumResourceNamesA"
api_EnumResourceTypes% (hModule%, lpEnumFunc%, lParam%) : "EnumResourceTypesA"

what about these functions in the kernal decals? I seem to remember a decal that contained a function to search for available drives. I did text editor of my own in blitz plus with a userlib and remember a function somewhere for it.

|edit| Ah nuts... you beat me to it. I knew there was a function for it in kernal32.dll. I just couldnt remember which it was. Now I do.... |edit|