具体怎么我也说不上来。
因为我是在我们公司自己的一个vxd驱动中添加了一个IoControl,没有跟DISKTSD.VXD发生关系。建议你写个Vxd,然后通过发DeviceIoControl给此Vxd。然后在Vxd中通过ISP功能做到你想要做的事情。(看看,安装SoftICE Driver Suite 2.6后VTools\include\dcb.h)
extern ILB my_Ilb;
#define pthisIlb (&my_Ilb)
DWORD OnW32DeviceIoControl(PIOCTLPARAMS pParam)
{
switch(pParam->dioc_IOCtlCode)
{
case DIOC_OPEN:
case DIOC_CLOSEHANDLE:
nResult = DEVIOCTL_NOERROR;
break;
BOOL GetDiskAndPartitionNumbers (char driveLetter, DWORD *diskNumberPtr,
DWORD *partitionNumberPtr)
{//I found this in a message from "Jacob Lorch", dated September 10, 1999:
// Get disk and partition number information using a device control
// request
if (!DeviceIoControl(fileHandle, IOCTL_STORAGE_GET_DEVICE_NUMBER, NULL,
0, &deviceInfo, sizeof(deviceInfo), &bytesReturned,
NULL))
return FALSE;
if (bytesReturned != sizeof(deviceInfo))
return FALSE;
// Put values into the passed pointers
*diskNumberPtr = deviceInfo.DeviceNumber;
*partitionNumberPtr = deviceInfo.PartitionNumber;
char msgbuf[128];
sprintf(msgbuf,"%d %d\n", deviceInfo.DeviceNumber, deviceInfo.PartitionNumber);
OutputDebugString(msgbuf);
// Close the handle to the raw disk and return success
char Buf[128];
char *p;
UINT Type;
GetLogicalDriveStrings(128,Buf);
for(p=Buf;*p;p+=lstrlen(p)+1)
{
Type=GetDriveType(p);
switch(Type)
{
case DRIVE_UNKNOWN: //The drive type cannot be determined.
case DRIVE_NO_ROOT_DIR: //The root directory does not exist.
case DRIVE_REMOVABLE: //The disk can be removed from the drive.
case DRIVE_FIXED: //The disk cannot be removed from the drive.
case DRIVE_REMOTE: //The drive is a remote (network) drive.
case DRIVE_CDROM: //The drive is a CD-ROM drive.
case DRIVE_RAMDISK: //The drive is a RAM disk.
Default:
}