How to get the sectors/clusters of a particular file?
-
Hi, How to get the sectors/clusters of a particular file? I am working on Windows 2000. Hoping to get a reply soon. TIA. regards, Jahfer V P.
Hi Jahfer, I think you just need to reach to cluster, then following function would let you know how many sectors are there in one cluster & bye info of sector. BOOL GetDiskFreeSpace( LPCTSTR lpRootPathName, // pointer to root path LPDWORD lpSectorsPerCluster, // pointer to sectors per cluster LPDWORD lpBytesPerSector, // pointer to bytes per sector LPDWORD lpNumberOfFreeClusters, // pointer to number of free clusters LPDWORD lpTotalNumberOfClusters // pointer to total number of clusters ); Then you need to iterate for sectors. Regards, Sumit Kapoor +91-98-990-59818(M) Delhi >> INDIA sumit_kapoor1980@rediffmail.com Never consider anything impossible before trying to solve that..---Sumit Kapoor---
-
Hi Jahfer, I think you just need to reach to cluster, then following function would let you know how many sectors are there in one cluster & bye info of sector. BOOL GetDiskFreeSpace( LPCTSTR lpRootPathName, // pointer to root path LPDWORD lpSectorsPerCluster, // pointer to sectors per cluster LPDWORD lpBytesPerSector, // pointer to bytes per sector LPDWORD lpNumberOfFreeClusters, // pointer to number of free clusters LPDWORD lpTotalNumberOfClusters // pointer to total number of clusters ); Then you need to iterate for sectors. Regards, Sumit Kapoor +91-98-990-59818(M) Delhi >> INDIA sumit_kapoor1980@rediffmail.com Never consider anything impossible before trying to solve that..---Sumit Kapoor---
-
I need to get the sectors/clustors of a file. A file may be in contiguous sectors or may be scattered, on the disk. I want to get this sector information. Jahfer V P.
I don't know it is fully possible or not with another API.. DeviceIOControl(). This API is used for similar type of work, even file related. Check MSDN for more detail. I think it would be only help that I can do. Let me know if you get any direct method(by e-mail). Regards, Sumit Kapoor +91-98-990-59818(M) Delhi >> INDIA sumit_kapoor1980@rediffmail.com Never consider anything impossible before trying to solve that..---Sumit Kapoor---
-
Hi, How to get the sectors/clusters of a particular file? I am working on Windows 2000. Hoping to get a reply soon. TIA. regards, Jahfer V P.
Because of the HAL, I think you'll need to create a device driver if you want that level of access.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown