Hairsplitting:
A dyn. disk is a disk is a disk,
a dynamic volume may span multiply dyn. disks,
and Anand tries to talk to the dynamic volume.
You can use IOCTL_STORAGE_GET_DEVICE_NUMBER
for the dyn. disk.
Else
“Jamey Kirby”
com> cc:
Sent by: Subject: *[ntdev] RE: Dynamic Disk Problems!
xxxxx@lis
ts.osr.com
06.12.2002 01:57
Please respond to “NT
Developers Interest
List”
Since a dynamic disk can span multiple physical devices, this IOCTL is
not relevant.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of AR
Sent: Thursday, December 05, 2002 4:43 PM
To: NT Developers Interest List
Subject: [ntdev] Dynamic Disk Problems!
Following “DeviceIoControl” call always FAILS for dynamic disks with an
error code: 1( Incorrect Function ) for IOCTL_SCSI_GET_ADDRESS,
IOCTL_STORAGE_GET_DEVICE_NUMBER, but the same succeeds for basics disks!
BYTE buff[2048];
DWORD cbReturnedData;
HANDLE hDevice;
hDevice = CreateFile( “\\.\H:”,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL );
if (hDevice == (HANDLE)-1)
{
printf(“Attempt failed! Error number = %d\n”,GetLastError());
return;
}
PSCSI_ADDRESS pInfo = (PSCSI_ADDRESS )buff;
BOOL bResult =
DeviceIoControl( hDevice, IOCTL_SCSI_GET_ADDRESS,
//IOCTL_STORAGE_GET_DEVICE_NUMBER,
NULL,
0, // no input buffer, so pass zero
pInfo,
sizeof(buff), // output buffer
&cbReturnedData, // bytes returned
(LPOVERLAPPED) NULL ); // synchronous I/O
if(!bResult)
{
printf(“Attempt failed! Error number = %d\n”,GetLastError());
return;
}
Do I am doing something wrong? would appreciate any help.
Regards,
-Anand
—
You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%
—
You are currently subscribed to ntdev as: xxxxx@utimaco.de
To unsubscribe send a blank email to %%email.unsub%%