Click to See Complete Forum and Search --> : DeviceIoControl w/Win95
Fred Hartshorn
June 7th, 1999, 06:37 AM
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.
G Kirkham
June 7th, 1999, 08:20 AM
if you are after the total disk space and available space then use GetDiskFreeSpaceEx
Gary Kirkham
Fred Hartshorn
June 7th, 1999, 11:32 PM
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.
leolin@
June 8th, 1999, 09:19 AM
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, ®, sizeof(reg),
®, sizeof(reg), &cb, 0);
CloseHandle(hDevice);
Fred Hartshorn
June 9th, 1999, 06:27 AM
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.
rupesh_codeguru
November 13th, 2002, 08:24 AM
//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 .........
Anjum Ali
November 13th, 2002, 02:59 PM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.