From 0db235a52b57aea2fc020f09fd8b66cc8c731839 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 14 Jul 2002 15:11:39 +0000 Subject: [PATCH] Changed CD-ROM detection code to be compatible with Windows NT 3.x. --- platform/win32.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/win32.c b/platform/win32.c index 99639640..fcc26df1 100644 --- a/platform/win32.c +++ b/platform/win32.c @@ -249,22 +249,22 @@ static int determineUserDir(void) } /* determineUserDir */ -static BOOL mediaInDrive(const char *driveLetter) +static BOOL mediaInDrive(const char *drive) { UINT oldErrorMode; - DWORD dummyValue; - BOOL returnValue; + DWORD tmp; + BOOL retval; /* Prevent windows warning message to appear when checking media size */ oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); /* If this function succeeds, there's media in the drive */ - returnValue = GetDiskFreeSpace(driveLetter, &dummyValue, &dummyValue, &dummyValue, &dummyValue); + retval = GetVolumeInformation(drive, NULL, 0, NULL, NULL, &tmp, NULL, 0); /* Revert back to old windows error handler */ SetErrorMode(oldErrorMode); - return(returnValue); + return(retval); } /* mediaInDrive */