
04.07.2009, 00:59
|
|
Постоянный
Регистрация: 05.05.2006
Сообщений: 743
Провел на форуме: 2982851
Репутация:
107
|
|
Плз помогите преобразовать этот кусочек кода к виду который переварит вижуал студио.
Код:
SAFEARRAY* writeSpeedsArray = NULL;
HRESULT hResult = discFormat2Data->get_SupportedWriteSpeeds(&writeSpeedsArray)
if (SUCCEEDED(hResult))
{
ULONG totalWriteSpeeds = (&writeSpeedsArray)->rgsabound[0].cElements;
for (ULONG writeSpeedIndex = 0; writeSpeedIndex < totalWriteSpeeds; writeSpeedIndex++)
{
ULONG sectorsPerSecond = ((VARIANT*)(&writeSpeedsArray)->pvData))[writeSpeedIndex].ulVal;
}
}
Я пытался но у меня на последней строчке облом  Никак непойу что там за преобразование
Код:
SAFEARRAY *ss;
FD->get_SupportedWriteSpeeds(&ss);
ULONG totalWriteSpeeds =(ULONG)&ss->rgsabound[0].cElements;
for (ULONG writeSpeedIndex = 0; writeSpeedIndex < totalWriteSpeeds; writeSpeedIndex++)
{
ULONG sectorsPerSecond = ((VARIANT*)&ss->pvData))[writeSpeedIndex].ulVal;
cout<<sectorsPerSecond<<endl;
}
}
|
|
|