g++ 4.6.1 if anyone wants to ask.  forgot to add.

From: Jim Michaels <jmichae3@yahoo.com>
To: mingw users <MinGW-users@lists.sourceforge.net>
Sent: Thursday, January 26, 2012 1:29 AM
Subject: [Mingw-users] problem in winbase.h?

no matter what I do, I can't use GetVolumePathName() in winbase.h, I get
df.cpp:904:60: error: 'GetVolumePathNameA' was not declared in this scope

I made sure in my code I did this:

#elif defined(_MSC_VER)||defined(__MINGW32__)||defined(__BORLANDC__)
    #define STRICT 1
    #define WIN32_LEAN_AND_MEAN
    #include <direct.h> //_getdrive()
    #include <windows.h>
    #undef UNICODE
    #include <WinIOCtl.h> //IOCTL_STORAGE_CHECK_VERIFY
    #include <WinBase.h>

bool UNCExists(string unc) {
    string uncroot = unc; uncroot += '\\';
    char szpath[64000];
    //check UNC for validity
    if (0 == GetVolumePathName(uncroot.c_str(), szpath, 64000)) { // the offending line 904
        cout<<"ERROR: UNCExists(): invalid drive \""<<unc<<"\""<<endl;
        return false;
Jim Michaels
http://JesusnJim.com (my personal site, has software)
Computer memory measurements, SSD measurements, microsoft disk size measurements (note: they will say GB or MB or KB or TB when it is not!):
[KiB] [MiB] [GiB] [TiB]
hard disk industry disk size measurements:
[KB] [MB] [GB] [TB]

Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
MinGW-users mailing list

This list observes the Etiquette found at
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe