Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2002
    Posts
    54

    GetDriveInformation

    Ok, I asked this before but now after numerous tests I see a pattern, I'm using a sort of hard disk size info, shows the total size of the drive and the remaining free space, works fine about 50% of the time, free space is always accurate but the total size many times comes back as 2047(always 2047), this is on new machines , could be old machines 95 - XP, why 2047? doesnt matter about partitioning or drive size, isn't properties about drivespace from the "GetDriveInformation" just a Windows API function, could you not use whatever dll or process windows is using....and what would that be? or thats what AMS is doing anyway?
    PArt 2 of this, once the size comes back as say :32456 megs to do some quick math and make the total show as 32.5 gig instead... where should I be looking?

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: GetDriveInformation

    As to the second question just divide your number by 1000 using a VARIABLE > SET VALUE action and then round it using a VARIABLE > FORMAT NUMBER action.

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: GetDriveInformation

    (Actually divide by 1024...unless you're a hard drive manufacturer, a GB is 1024 MB. [img]/ubbthreads/images/icons/smile.gif[/img])
    --[[ Indigo Rose Software Developer ]]

  4. #4
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: GetDriveInformation

    Option_Explicit,

    I'm using a sort of hard disk size info, shows the total size of the drive and the remaining free space,
    What do you mean by "using a sort of hard disk size info?"
    --[[ Indigo Rose Software Developer ]]

  5. #5
    Join Date
    Oct 2002
    Posts
    54

    Re: GetDriveInformation

    I need some indication on "On Show" event, for the total size of drive C: and the remaining free space. I used the GetDriveInformation , It works ok except the "get total size" property about 50% of the time comes back as "2047" any file system , partition, or OS. theres no pattern to it, my term "sort of hard disk size info" was just not to make myself sound like I created some work of excellence, I know it's just a simple function.

  6. #6
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: GetDriveInformation

    Ah, okay. I wasn't sure if you meant you were using some kind of third-party utility to get that information.

    As far as I know, that action is just using a standard API call. I know that there is more than one way to get that information, and that sometimes Windows returns the wrong information for large drives on certain versions of the OS, but I don't know enough about it to say that that's what's happening.

    It wouldn't be the first time that the standard API call isn't the method that Windows Explorer uses, though...Microsoft does some odd stuff sometimes.

    Incidentally, 2047 is the largest size a partition can be with the FAT16 file system.

    Wild conjecture: I know 95 and 98 had some odd quirks that were caused by having 16-bit versions of some system DLLs being used instead of the 32-bit versions, which for some odd reasons would not always be installed unless you did it manually, or installed just the right combination of updates. Maybe some old DLL on the system is causing that API call to wear FAT16-colored glasses?

    In any case, are you sure there's no pattern to it? Which operating systems does it happen on, what partition sizes, drive sizes, etc.
    --[[ Indigo Rose Software Developer ]]

  7. #7
    Join Date
    Oct 2002
    Posts
    54

    Re: GetDriveInformation

    Is there a second option to getting Drive size, A condition could be set IF %TDriveSize& = 2047..get info from..? instead
    And this does happen randomly on many different OS and Drive types, I'm almost thinking it may be a Drive manufactorer issue..a few more times I try to find out why.
    Oh yeah....and BTW, if I cant get this right, I'll lose my job, and my wife and kids wont be able to eat..lol

  8. #8
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244

    Re: GetDriveInformation


    Oh yeah....and BTW, if I cant get this right, I'll lose my job, and my wife and kids wont be able to eat..lol
    LOL .... that's odd, I was about to say the same about my situation too. Must be something going around!!! But then, I am Chairman of the board, so maybe I can talk them out of it [or did i just make that up?] [img]/ubbthreads/images/icons/wink.gif[/img]
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  9. #9
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: GetDriveInformation

    There isn't any other way built into AutoPlay, but you could write a DLL to use any method you want.

    (Or wait for Worm to do it. [img]/ubbthreads/images/icons/smile.gif[/img])

    I'm still surprised it doesn't show a consistent pattern, though. I'd ask again if you really were sure about that, but I wouldn't want to be annoying. [img]/ubbthreads/images/icons/wink.gif[/img]
    --[[ Indigo Rose Software Developer ]]

  10. #10
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: GetDriveInformation

    Take it from an artist, food is highly overrated. As long as the little tykes have coffee and Nabokov they'll be fine.

    Corey Milner
    Creative Director, Indigo Rose Software

Posting Permissions

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