SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jan 2003
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to use SYS_GetFreeDiskSpace() on NTFS partition drives?

    I am trying to use 'SYS_GetFreeDiskSpace("c")' function to return me the free disk space availabe.
    When I tried to use the above function in FAT 32 Partition then the function returned correct number of free bytes on disk.
    But When I tried to run on NTFS partition then I get some junk number like -1630957568 bytes.

    Is there any limitation on using GerFreeDiskSpace() function on NTFS partition drive. Please provide me any workaround if possible. I am running Silk 5.0 on Windows 2000 Server SP3.

    Thanks,
    ABalaji

    ------------------

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use SYS_GetFreeDiskSpace() on NTFS partition drives?

    I tried it on a NT 4.0 machine with a NTFS partion and it worked fine using the same SilkTest version.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Member
    Join Date
    Aug 2002
    Location
    Durham, NC USA
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use SYS_GetFreeDiskSpace() on NTFS partition drives?

    I have two NTFS partitions on an XP machine.

    Interestingly, the compressed partition returned the same thing as Windows Explorer, and the uncompressed returned a slightly lower number! Both are approximately (<1% difference) the same, though.

    I think the problem _may_ be that you have too much free space: the SYS_ function returns an integer, and the max integer (32 bits) is 2,147,483,647. If you have >2GB free, your integer will wrap, maybe into the negatives.

    As a workaround you could accept a negative, but if someone has a disk with >4GB free space they might get hit with an 'no space' error. Is there a way to leave this requirement out? (Or have such a small window of free space required that the odds become astronomical?)

    -TC

    [This message has been edited by tdcrone (edited 01-21-2003).]
    --
    Tim Crone
    Broadcom

  4. #4
    Member
    Join Date
    Jan 2003
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use SYS_GetFreeDiskSpace() on NTFS partition drives?

    I guess tdcrone is correct.
    Return of SYS_GetFreeDiskSpace() is a signed integer of 32 bits. The max bytes that it can return is only 2147483648 bytes which is 2 GB. So if the free diskspace is more than 2 GB, then this function cannot handle it.
    I strongly recommend that this function should return REAL instead of INTEGER, or alteast unsigned INTEGER instead of signed.

    Thanks guys.

    ------------------


    [This message has been edited by abalaji (edited 01-21-2003).]

  5. #5
    Junior Member
    Join Date
    Nov 2002
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use SYS_GetFreeDiskSpace() on NTFS partition drives?

    This thread was referenced in the same question on Segue's SilkTest forum.

    There's a workaround to get up to 4Gb available at the url below:

    http://support.segue.com/forums/show...est&Number=624

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:39 PM.

Copyright BetaSoft Inc.