Results 1 to 3 of 3

Thread: How to get the volume size from a driveletter

  1. #1
    Join Date
    Jan 2009
    Posts
    45

    How to get the volume size from a driveletter

    Hello
    I'm experimenting to make a code which gives me the size of the volume if i feed it the drive letter of that volume. am make use of the interrupt 21 function 360 approach elsewhere in my code to get the free space on a volume,
    but the int 21 function 360 approach doesn't return values higher than 2Gb as free space it is not making an issuefor the code that i use
    but create for the new bit of code, i want the volume size returned precisely for fat16 and fat32 drives for any size

    thanks for reading me...

  2. #2
    Join Date
    Jan 2008
    Posts
    3,388

    re: How to get the volume size from a driveletter

    I appreciate for your work..i think i would rather shell to a 32-bit Windows program it allows to grab those oversize values, passing the drive letter on the command line and returning the size as a display integer
    try this format ("FORMAT$(value)" in PB/Win-speak).

    good luck

  3. #3
    Join Date
    Jan 2009
    Posts
    1,738

    Re: How to get the volume size from a driveletter

    I have got some old code for you does not know is it work out or not may be you just try..Type DiskInfo
    InfoLevel As Word
    SerialNum As Dword
    VolLabel As String*11
    SysType As String*8
    End Type

    Dim MyDisk As DiskInfo

    MyDisk.InfoLevel = 0000 'just has to be 0.
    MyDisk.SerialNum =
    VolLabel = "A vol label" 'sets volume label. fill with
    '"NO NAME " for no name.
    'First get SysType, then use it to set.

    !PUSH DS
    !MOV AH, &h69 ;function number
    !MOV AL, &h00 ;00=Get number, 01=set number
    !MOV BL, &h00 ;00=default drive. 1=A, 2=B, 3=C, etc.)
    !MOV BH, &h00 ;this has to be 0.
    !MOV DX, VARPTR(MyDisk)
    !MOV DS, VARSEG(MyDisk)
    !INT &h21 ;call DOS
    !POP DS

Similar Threads

  1. HDP volume is getting generated in different size on its own
    By Mr.Ghost in forum Hardware Peripherals
    Replies: 3
    Last Post: 10-02-2012, 01:53 PM
  2. Replies: 5
    Last Post: 13-12-2010, 10:09 PM
  3. Windows Server 2008 R2 maximum NTFS volume size
    By FFCookie in forum Operating Systems
    Replies: 5
    Last Post: 22-08-2010, 12:30 AM
  4. Changing Partition size on Main Volume
    By Kalav in forum Windows XP Support
    Replies: 2
    Last Post: 12-04-2008, 08:46 PM
  5. Replies: 3
    Last Post: 18-04-2007, 04:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,430,707.47078 seconds with 16 queries