// Get the Disk FreeSpace // PULARGE_INTEGER pDisknum; pDisknum= new ULARGE_INTEGER; GetDiskFreeSpaceEx((PSTR)(LPCSTR)Directory,pDisknum,NULL,NULL); cout<<(PSTR)(LPCSTR)Directory<<" Free space:" <<(ULONG)((pDisknum->QuadPart)/(1024*1024))<<'M'<<endl; // clear pDisknum delete(pDisknum); pDisknum=NULL;