1. GetDrives in Win32 Help Needed

I'm trying to get the drives on a Win95 pre-SR2 release... It seems to choke
on the "GetDiskFreeSpaceEx" because it can't find it in "kernel32.dll." Can
somebody fix it so it just ignore this, or is it (the free space) required
to get the drive status?

Thanks!
ck

new topic     » topic index » view message » categorize

2. Re: GetDrives in Win32 Help Needed

ck,

If you just need to know which drives are available and which aren't, you
might try this:

(quote)
UINT GetDriveType(DriveNumber)
int DriveNumber; /* 0 = A, 1 = B, and so on */

The GetDriveType function determines whether a disk drive is removable,
fixed, or remote.
DriveNumber Specifies the drive for which the type is to be determined (0 =
drive A, 1 = drive B, 2 = drive C, and so on).

The return value is DRIVE_REMOVABLE (disk can be removed from the drive),
DRIVE_FIXED (disk cannot be removed from the drive), or DRIVE_REMOTE (drive
is a remote, or network, drive), if the function is successful. Otherwise,
the return value is zero.
(endquote)

This is a Windows 3.0 function, so it should work anywhere. It lets you
cycle numerically, drives 0 to <26.

Gerardo


----- Original Message -----
From: "CK Lester" <cklester at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Sent: Thursday, April 19, 2001 4:57 PM
Subject: GetDrives in Win32 Help Needed



> I'm trying to get the drives on a Win95 pre-SR2 release... It seems to
choke
> on the "GetDiskFreeSpaceEx" because it can't find it in "kernel32.dll."
Can
> somebody fix it so it just ignore this, or is it (the free space) required
> to get the drive status?
>
> Thanks!
> ck

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu