GetDiskFreeSpaceEx() - Windows CE
This is a discussion on GetDiskFreeSpaceEx() - Windows CE ; I am a bit confused with the values I obtain from this function. Can anyone
explain what each of these values represent?
According to the MSDN documentation:
lpFreeBytesAvailableToCaller
[out] Pointer to a variable to receive the total number of free ...
-
GetDiskFreeSpaceEx()
I am a bit confused with the values I obtain from this function. Can anyone
explain what each of these values represent?
According to the MSDN documentation:
lpFreeBytesAvailableToCaller
[out] Pointer to a variable to receive the total number of free bytes on the
disk that are available to the user associated with the calling thread.
lpTotalNumberOfBytes
[out] Pointer to a variable to receive the total number of bytes on the disk
that are available to the user associated with the calling thread.
lpTotalNumberOfFreeBytes
[out] Pointer to a variable to receive the total number of free bytes on the
disk.
When I call this I get
764316 for lpFreeBytesAvailableToCaller
0 for lpTotalNumberOfBytes
15839232 for lpTotalNumberOfFreeBytes
The lpFreeBytesAvailableToCaller varies sensibly as I add and delete files,
lpTotalNumberOfBytes always stays at zero and lpTotalNumberOfFreeBytes
stays at 15839232 which is suspiciously like the size of the 16Mb flash card
I am using.
Thanks
Stephen
--
--
Stephen Robertson
Findlay Irvine Ltd
http://www.findlayirvine.com
Email: stephenrobertson@"same as web url"
-
Re: GetDiskFreeSpaceEx()
Are you aware that those values are pointers to 64 bit integers? Did you
post the pointer values or the actual ULARGE_INTEGER values they point to?
How are you viewing those numbers? Are you displaying them with an
application, or viewing them in the debugger? The debugger will show you
the appropriate value, but an application might try to display 32 bit values
if you used code like printf("%d", *lpFreeBytesAvailableToCaller).
Jeremy
"Stephen Robertson" wrote in message
news:bq7hd9$9oa$1$8302bc10@news.demon.co.uk...
> I am a bit confused with the values I obtain from this function. Can
anyone
> explain what each of these values represent?
> According to the MSDN documentation:
>
> lpFreeBytesAvailableToCaller
> [out] Pointer to a variable to receive the total number of free bytes on
the
> disk that are available to the user associated with the calling thread.
>
> lpTotalNumberOfBytes
> [out] Pointer to a variable to receive the total number of bytes on the
disk
> that are available to the user associated with the calling thread.
>
> lpTotalNumberOfFreeBytes
> [out] Pointer to a variable to receive the total number of free bytes on
the
> disk.
>
> When I call this I get
> 764316 for lpFreeBytesAvailableToCaller
> 0 for lpTotalNumberOfBytes
> 15839232 for lpTotalNumberOfFreeBytes
>
> The lpFreeBytesAvailableToCaller varies sensibly as I add and delete
files,
> lpTotalNumberOfBytes always stays at zero and lpTotalNumberOfFreeBytes
> stays at 15839232 which is suspiciously like the size of the 16Mb flash
card
> I am using.
>
> Thanks
> Stephen
>
>
> --
> --
> Stephen Robertson
> Findlay Irvine Ltd
> http://www.findlayirvine.com
> Email: stephenrobertson@"same as web url"
>
>
-
Re: GetDiskFreeSpaceEx()
Thanks for your reply I am viewing them with a printf as below
printf(
"Available Disk Space: %llu
Total Bytes : %llu
Total Free Bytes: %llu \r\n",
Available.QuadPart,
TotalBytes.QuadPart,
TotalFreeBytes.QuadPart
);
The actual numbers I am getting back seem believable and I can reason what I
think they mean.
lpFreeBytesAvailableToCaller: makes sense this is how much disk space I have
left.
lpTotalNumberOfFreeBytes: In my case this is always zero which does seem
strange, how should this relate to lpFreeBytesAvailableToCaller
lpTotalNumberOfFreeBytes: appears to show the total size of the FlashDisk
and that is fair enough if that is waht it actually is but that doesn't seem
to tie up with the description "total number of free bytes on the disk." or
am I mis understanding
Stephen.
"Jeremy Sherrill" wrote in message
news:u6%230XLduDHA.1576@TK2MSFTNGP11.phx.gbl...
> Are you aware that those values are pointers to 64 bit integers? Did you
> post the pointer values or the actual ULARGE_INTEGER values they point to?
> How are you viewing those numbers? Are you displaying them with an
> application, or viewing them in the debugger? The debugger will show you
> the appropriate value, but an application might try to display 32 bit
values
> if you used code like printf("%d", *lpFreeBytesAvailableToCaller).
>
> Jeremy
>
>
> "Stephen Robertson" wrote in message
> news:bq7hd9$9oa$1$8302bc10@news.demon.co.uk...
> > I am a bit confused with the values I obtain from this function. Can
> anyone
> > explain what each of these values represent?
> > According to the MSDN documentation:
> >
> > lpFreeBytesAvailableToCaller
> > [out] Pointer to a variable to receive the total number of free bytes on
> the
> > disk that are available to the user associated with the calling thread.
> >
> > lpTotalNumberOfBytes
> > [out] Pointer to a variable to receive the total number of bytes on the
> disk
> > that are available to the user associated with the calling thread.
> >
> > lpTotalNumberOfFreeBytes
> > [out] Pointer to a variable to receive the total number of free bytes on
> the
> > disk.
> >
> > When I call this I get
> > 764316 for lpFreeBytesAvailableToCaller
> > 0 for lpTotalNumberOfBytes
> > 15839232 for lpTotalNumberOfFreeBytes
> >
> > The lpFreeBytesAvailableToCaller varies sensibly as I add and delete
> files,
> > lpTotalNumberOfBytes always stays at zero and lpTotalNumberOfFreeBytes
> > stays at 15839232 which is suspiciously like the size of the 16Mb flash
> card
> > I am using.
> >
> > Thanks
> > Stephen
> >
> >
> > --
> > --
> > Stephen Robertson
> > Findlay Irvine Ltd
> > http://www.findlayirvine.com
> > Email: stephenrobertson@"same as web url"
> >
> >
>
>