Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Hardware » Драйверы и прошивки BIOS » Обновления BIOS и драйверов от VIA

Модерирует : Akam1, Dr_StandBy, vertex4

 Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

Открыть новую тему     Написать ответ в эту тему

neotec

Junior Member
Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору


Код:
 
#NoTrayIcon
 
#include <Array.au3>
 
Local $pTest
Global $bStatus = True
 
$hDLL = DllOpen(@ScriptDir & "\drvInterface.dll")
If @error <> 0 Then
   $bStatus = False
EndIf
_checkStatus()
 
;~ VINT vr_init (void);
$sTest = DllCall($hDLL, "int:cdecl", "?vr_init@@YAHXZ")
If @error <> 0 Then
   $bStatus = False
EndIf
_checkStatus()
 
;~ VINT vr_get_controller_num (VINT *pnumber);
$sTest = DllCall($hDLL, "int:cdecl", "?vr_get_controller_num@@YAHPAH@Z", "int*", $pTest)
If @error <> 0 Then
   $bStatus = False
EndIf
_checkStatus()
If IsArray($sTest) and UBound($sTest) >= 2 Then
   $iControllerNumber = $sTest[1]
Else
   $bStatus = False
EndIf
_checkStatus()
 
;~ VINT vr_get_array_num (VINT only_raid, VINT *pnumber);
$sTest = DllCall($hDLL, "int:cdecl", "?vr_get_array_num@@YAHHPAH@Z", "int", 0, "int*", $pTest)
If @error <> 0 Then
   $bStatus = False
EndIf
_checkStatus()
If IsArray($sTest) and UBound($sTest) >= 3 Then
   $iArrayNumber = $sTest[2]
Else
   $bStatus = False
EndIf
_checkStatus()
If Not $iArrayNumber >=1 Then
   $bStatus = False
EndIf
_checkStatus()
 
;~ VINT vr_get_device_num (VINT *pnumber);
$sTest = DllCall($hDLL, "int:cdecl", "?vr_get_device_num@@YAHPAH@Z", "int*", $pTest)
If @error <> 0 Then
   $bStatus = False
EndIf
_checkStatus()
 
If IsArray($sTest) and UBound($sTest) >= 2 Then
   $iDeviceNumber = $sTest[1]
Else
   $bStatus = False
EndIf
_checkStatus()
If Not $iDeviceNumber >=1 Then
   $bStatus = False
EndIf
_checkStatus()
;~ ConsoleWrite("$iDeviceNumber = " & $iDeviceNumber & @CRLF)
 
For $i = 0 To $iArrayNumber-1
   $vr_array_info = DllStructCreate("ushort status;ubyte raidType;ubyte diskNum;ulong capacityLow;ulong capacityHigh;ulong realCapacityLow;ulong realCapacityHigh;ulong stripeSize;ulong blockSize;int bNeedMigration;int bNeedInit;int bOptimized;ubyte systemDisk;ushort raid_index;int index")
   If @error <> 0 Then
      $bStatus = False
   EndIf
   _checkStatus()
   $sTest = DllCall($hDLL, "int:cdecl", "?vr_get_array_info@@YAHHPAU_vr_array_info@@@Z", "int", $i, "struct*", DllStructGetPtr($vr_array_info))
   If @error <> 0 Then
      $bStatus = False
   EndIf
   _checkStatus()
   $iArrayStatus = DllStructGetData($vr_array_info, "status")
   If @error <> 0 Then
      $bStatus = False
   EndIf
   _checkStatus()
   If $iArrayStatus == 0 And $bStatus Then
      $bStatus = True
   Else
      $bStatus = False
   EndIf
   _checkStatus()
Next
 
For $i = 0 To $iDeviceNumber-1
   $vr_device_info = DllStructCreate("char serialNumber[32];char firmwareRevison[16];char modelName[64];char minorRevisonNumber[64];ulong cylinderNumber;ulong headNumber;ulong sectorNumberPerTrack;ulong capacityLow;ulong capacityHigh;ubyte supportPIOTransferMode;ubyte supportMultiDMAMode;ubyte supportUltraDMAMode;ubyte currentTransferMode;ubyte deviceType;ushort status;ubyte ctrler_index;ubyte chan_index;int master;int index;ubyte systemDisk;int bDevInRaid;ushort array_position;int array_index;ulong realCapacityLow;ulong realCapacityHigh")
   If @error <> 0 Then
      $bStatus = False
   EndIf
   _checkStatus()
   $sTest = DllCall($hDLL, "int:cdecl", "?vr_get_device_info@@YAHHPAU_vr_device_info@@@Z", "int", $i, "struct*", DllStructGetPtr($vr_device_info))
   If @error <> 0 Then
      $bStatus = False
   EndIf
   _checkStatus()
   $iDeviceStatus = DllStructGetData($vr_device_info, "status")
   If @error <> 0 Then
      $bStatus = False
   EndIf
   _checkStatus()
   If $iDeviceStatus == 0 And $bStatus Then
      $bStatus = True
   Else
      $bStatus = False
   EndIf
   _checkStatus()
Next
 
;~ void vr_exit (void);
$sTest = DllCall($hDLL, "none", "?vr_exit@@YAXXZ")
 
DllClose($hDLL)
 
If $bStatus Then
   ConsoleWrite("1")
Else
   ConsoleWrite("0")
EndIf
 
Exit
 
Func _checkStatus()
   If Not $bStatus Then
      ConsoleWrite("0")
      Exit
   EndIf
EndFunc
 


Всего записей: 123 | Зарегистр. 01-02-2006 | Отправлено: 01:01 18-01-2017
Открыть новую тему     Написать ответ в эту тему

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Hardware » Драйверы и прошивки BIOS » Обновления BIOS и драйверов от VIA


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru