You can try FindFirstFile:
http://msdn.microsoft.com/en-us/library/aa364418%28v=VS.85%29.aspx
Once you have the search data (passed as the second argument to this function):
if(result->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
}
else
{
}
In addition, to find out if there is something to the volume, you can try something like:
if(result->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
{
if(result->dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)
{
}
}
NTN
source
share