Advertisement
Advertisement
| 07.01.2008 at 10:09PM PDT, ID: 23532512 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: |
// This call returns an error...
unsigned int getMediaStatus( char cDriveLetter )
{
HRESULT hResult;
IMAPI_FORMAT2_DATA_MEDIA_STATE mediaStatus = IMAPI_FORMAT2_DATA_MEDIA_STATE_UNKNOWN;
int iPos;
// Select the drive to get the status of
for( iPos = 0; iPos < driveLetters.size(); iPos++ )
{
if ( driveLetters[ iPos ] == cDriveLetter )
{
hResult = discFormat2Data[ iPos ]->get_CurrentMediaStatus( &mediaStatus );
break;
}
}
return( mediaStatus );
}
// This call does not return an error, but the correct value
unsigned int getMediaType( char cDriveLetter )
{
HRESULT hResult;
IMAPI_MEDIA_PHYSICAL_TYPE mediaType = IMAPI_MEDIA_TYPE_UNKNOWN;
int iPos;
// Select the drive to get the status of
for( iPos = 0; iPos < driveLetters.size(); iPos++ )
{
if ( driveLetters[ iPos ] == cDriveLetter )
{
hResult = discFormat2Data[ iPos ]->get_CurrentPhysicalMediaType( &mediaType );
break;
}
}
return( mediaType );
}
|