#include <iostream>
#include <windows.h>
int main(int argc, char* argv[])
{
char VolumeInfo[100];
DWORD VolNameSize=100;
DWORD VolSerialNumber;
DWORD VolMaxComponentLength;
DWORD VolFileSystemFlags;
char FileSystemNameBuffer[100];
DWORD FileSystemNameSize=100;
GetVolumeInformation("c:\\",VolumeInfo,
VolNameSize,&VolSerialNumber,
&VolMaxComponentLength,&VolFileSystemFlags,
FileSystemNameBuffer,FileSystemNameSize);
std::cout<<"SerialNumber:"<< VolSerialNumber<<std::endl;
system("pause");
return 0;
}