CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 1999
    Posts
    5

    DeviceIoControl w/Win95

    How can I find the capacities of a disk drive in Window95/8?

    DeviceIoControl (IOCTL_DISK_GET_DRIVE_GEOMETRY) for Win95 is what I'm looking for but it's only for NT.

    I've used some of the DeviceIoControl's operations using an example which uses VWin32 to call Int21h function FF0Dh subfunctions but cant't find the subfunction for getting the drive geometry as performed by by DeviceIoControl.

    What I am trying to do is find out what drives contain high capacity removable media.

    Any help, especially a book title, greatly appreciated.

    Thanks in advance,
    Fred

    One size never fits all.

  2. #2
    Join Date
    Apr 1999
    Location
    Huntsville, Al
    Posts
    27

    Re: DeviceIoControl w/Win95

    if you are after the total disk space and available space then use GetDiskFreeSpaceEx

    Gary Kirkham




  3. #3
    Join Date
    Mar 1999
    Posts
    5

    Re: DeviceIoControl w/Win95

    Thanks, but I need the capabilities of the drive, not the disk. It's a bios type call I'm looking for.

    One size never fits all.

  4. #4
    Join Date
    Apr 1999
    Posts
    27

    Re: DeviceIoControl w/Win95

    use the dos service int 21h,
    that can call in win95 through vwin32.dll
    similar like that:hDevice = CreateFile("\\\\.\\vwin32", 0 , 0, NULL, OPEN_EXISTING,
    FILE_FLAG_DELETE_ON_CLOSE, NULL);
    if(INVALID_HANDLE_VALUE==hDevice) return;
    reg.reg_EAX = 0x440D;
    reg.reg_ECX = 0x0848;// the value you want
    reg.reg_EBX = Driver;
    reg.reg_EDX = (LONG)&Lock;
    DeviceIoControl(hDevice, VWIN32_DIOC_DOS_IOCTL, &reg, sizeof(reg),
    &reg, sizeof(reg), &cb, 0);
    CloseHandle(hDevice);



  5. #5
    Join Date
    Mar 1999
    Posts
    5

    Re: DeviceIoControl w/Win95

    Great! That's it.

    None of my (old) books on MS-DOS have this. Could you let me know where you got this?

    Thanks again,
    Fred

    One size never fits all.

  6. #6
    Join Date
    Nov 2002
    Posts
    217

    ?????

    //vr
    Hi,

    Can anyone can explain the code given above .........

    Is it to find out the geometry of the physical hard disk drive ( not partition ).

    thanks .........

  7. #7
    Join Date
    Jan 2002
    Posts
    40

    Question

    Great calling of interrupt, basically i have been programming in Dos since years and want to know that how can i call all interrupt service routines and bios call in windows based application (specially in vc6).
    You created a copy of DLL file so can u tell me where can i get the information like this that for what interrupt number which Dll should i use???

    Anjum

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured