|
-
May 26th, 1999, 04:47 AM
#1
How to get blocksize from harddisk?
When I copy small files to harddisk, then there is more space needed than the total filesize.
How can i detect what real harddisk space is needed?
Mark
-
May 26th, 1999, 10:24 AM
#2
Re: How to get blocksize from harddisk?
GetDiskFreeSpace() gets information about the disk sizes. I think a file takes up a whole number of clusters, so you should find that bytes per sector * sectors per cluster gives you the minimum block size. Your files will take a multile of that size, I believe.
-
May 27th, 1999, 03:26 AM
#3
Re: How to get blocksize from harddisk?
I know that GetDiskFreeSpace() is not what i need, thats why this question.
Question: how to get sector-, cluster- and blocksize from disk
Mark
-
May 27th, 1999, 03:36 AM
#4
Re: How to get blocksize from harddisk?
Why do you say GetDiskFreeSpace() is not what you need? Have you looked up the function in the help? It gives sectors per cluster (= cluster size when multiplied by the next item), bytes per sector (= sector size), free clusters available and total number of clusters. Exactly what you are asking for. Blocksize is, as far as I know, one cluster.
-
May 27th, 1999, 06:37 AM
#5
Re: How to get blocksize from harddisk?
Sorry,
i looked at the wrong function (GetDiskFreeSpaceEx()), my apologies for the misunderstanding.
Mark
-
May 27th, 1999, 06:42 AM
#6
Re: How to get blocksize from harddisk?
Ah, yes. I forgot. We use VC++ V4.0 here, so that function isn't available. What does that return, out of interest?
-
May 27th, 1999, 09:04 AM
#7
Re: How to get blocksize from harddisk?
BOOL GetDiskFreeSpaceEx(
LPCTSTR lpDirectoryName, // pointer to the directory name
PULARGE_INTEGER lpFreeBytesAvailableToCaller, // receives the number of bytes on
// disk available to the caller
PULARGE_INTEGER lpTotalNumberOfBytes, // receives the number of bytes on disk
PULARGE_INTEGER lpTotalNumberOfFreeBytes // receives the free bytes on disk
);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|