sparsing files

I am trying to do sparse. I am working on win2k with all disks of ntfs, when
I check the file attribute with following I get different result.

#define _WIN32_WINNT 0x0500

dw = GetFileAttributes(“D:\”);
f = (dw == 0xfffffff) ? FALSE : dw&FILE_ATTRIBUTE_SPARSE_FILE;
if(!f) DisplayErrorMsg();
Thanks


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

could not able to set sparse for file

if(GetVolumeInformation(“D:\”, NULL, 0, NULL, NULL, &dw, NULL, 0))
{
f = (dw == 0xfffffff) ? FALSE : dw &
FILE_SUPPORTS_SPARSE_FILES;
if(!f) { DisplayErrorMsg(); return; }
}
HANDLE hstream = CreateFile(szPathName, GENERIC_READ |
GENERIC_WRITE,
0, NULL, CREATE_ALWAYS, 0, NULL);

dw = 0;
f = DeviceIoControl(hstream, FSCTL_SET_SPARSE, NULL, 0, NULL, 0,
&dw, NULL);
if(!f) DisplayErrorMsg();


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com