Aide et conseils concernant AutoIt et ses outils.
Anthony
Niveau 6
Messages : 292 Enregistré le : lun. 17 janv. 2011 14:08
Localisation : France
Status :
Hors ligne
#1
Message
par Anthony » lun. 13 juin 2022 18:28
Bonjour à tous,
Les cartes graphiques ont plus de RAM aujourd'hui comme ma RTX 3060 qui à 12GB
Le code actuel permet de récupérer jusqu'à 4 GB de RAM limitation du système d'API 32 bits un peu comme une limitation 32Bit en FAT32 (4096 Mo)
Y à t'il moyen de résoudre ce problème de limitation 4GB ?
Merci pour le code de base
Sans titre.jpg (5.3 Kio) Vu 10202 fois
MsgBox ( 64 , "" , _GetGraphicCardModel
( ) ) Func _GetGraphicCardModel
( ) ;Récupère le(s) modèle(s) de(s) carte(s) graphique(s). ; https://docs.microsoft.com/fr-fr/windows/win32/cimwin32prov/win32-videocontroller?redirectedfrom=MSDN Local $objWMIService = ObjGet ( "winmgmts:\\.\root\CIMV2" ) Local $colItems = $objWMIService . ExecQuery ( "SELECT * FROM Win32_VideoController" , "WQL" , 0x10 + 0x20 ) Local $Output If IsObj ( $colItems ) then For $objItem In $colItems $Output = $Output & @CRLF & $objItem . Caption & " (" & Int ( _UINT
( $objItem . AdapterRAM ) / 1024 ^ 2 ) & " Mo)" ;~ $Output = $Output & @CRLF & $objItem.Caption & " (" & Int( $objItem.AdapterRAM/1024^3) & " Go)" Next Endif Return $Output EndFunc ;_GetGraphicCardModel Func _UINT
( $INT ) ;Cast une valeur numérique en entier non signé. Local $tUINT = DllStructCreate ( "UINT" ) DllStructSetData ( $tUINT , 1 , $INT ) Return DllStructGetData ( $tUINT , 1 ) EndFunc ;==>_UINTFunc
https://docs.microsoft.com/fr-fr/window ... dfrom=MSDN
Code : Tout sélectionner
[Dynamic, Provider("CIMWin32"), UUID("{1008CCF1-7BFF-11D2-AAD2-006008C78BC7}"), AMENDMENT]
class Win32_VideoController : CIM_PCVideoController
{
uint16 AcceleratorCapabilities[];
string AdapterCompatibility;
string AdapterDACType;
uint32 AdapterRAM;
uint16 Availability;
string CapabilityDescriptions[];
string Caption;
uint32 ColorTableEntries;
uint32 ConfigManagerErrorCode;
boolean ConfigManagerUserConfig;
string CreationClassName;
uint32 CurrentBitsPerPixel;
uint32 CurrentHorizontalResolution;
uint64 CurrentNumberOfColors;
uint32 CurrentNumberOfColumns;
uint32 CurrentNumberOfRows;
uint32 CurrentRefreshRate;
uint16 CurrentScanMode;
uint32 CurrentVerticalResolution;
string Description;
string DeviceID;
uint32 DeviceSpecificPens;
uint32 DitherType;
datetime DriverDate;
string DriverVersion;
boolean ErrorCleared;
string ErrorDescription;
uint32 ICMIntent;
uint32 ICMMethod;
string InfFilename;
string InfSection;
datetime InstallDate;
string InstalledDisplayDrivers;
uint32 LastErrorCode;
uint32 MaxMemorySupported;
uint32 MaxNumberControlled;
uint32 MaxRefreshRate;
uint32 MinRefreshRate;
boolean Monochrome;
string Name;
uint16 NumberOfColorPlanes;
uint32 NumberOfVideoPages;
string PNPDeviceID;
uint16 PowerManagementCapabilities[];
boolean PowerManagementSupported;
uint16 ProtocolSupported;
uint32 ReservedSystemPaletteEntries;
uint32 SpecificationVersion;
string Status;
uint16 StatusInfo;
string SystemCreationClassName;
string SystemName;
uint32 SystemPaletteEntries;
datetime TimeOfLastReset;
uint16 VideoArchitecture;
uint16 VideoMemoryType;
uint16 VideoMode;
string VideoModeDescription;
string VideoProcessor;
};
Tlem
Site Admin
Messages : 11773 Enregistré le : ven. 20 juil. 2007 21:00
Localisation : Bordeaux
Status :
Hors ligne
#2
Message
par Tlem » mer. 15 juin 2022 00:29
Bonjour Anthony.
Est-ce que le code Powershell de
ce lien vous donne la bonne quantité de mémoire vidéo ?
jchd
AutoIt MVPs (MVP)
Messages : 2273 Enregistré le : lun. 30 mars 2009 22:57
Localisation : Sud-Ouest de la France (43.622788,-1.260864)
Status :
Hors ligne
#3
Message
par jchd » mer. 15 juin 2022 12:41
Un UINT ne peut stocker que de 0 à 4G (4294967295).
La cryptographie d'aujourd'hui c'est le taquin plus l'électricité.
Anthony
Niveau 6
Messages : 292 Enregistré le : lun. 17 janv. 2011 14:08
Localisation : France
Status :
Hors ligne
#4
Message
par Anthony » mer. 15 juin 2022 23:22
Tlem a écrit : ↑ mer. 15 juin 2022 00:29
Bonjour Anthony.
Est-ce que le code Powershell de
ce lien vous donne la bonne quantité de mémoire vidéo ?
Merci
Effectivement les 12 gigas sont bien présent
Voici ce que PowerShell me retourne, en code AutoIt es-ce possible...?
Code : Tout sélectionner
BIOS
Manufacturer Version
------------ -------
American Megatrends Inc. F20
Motherboard
Manufacturer Product
------------ -------
Gigabyte Technology Co., Ltd. X79-UD3
Serial number
To be filled by O.E.M.
CPU
Name Cores L3, MB Threads
---- ----- ------ -------
Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz 6 12 12
RAM
Manufacturer PartNumber Speed, MHz Capacity, GB
------------ ---------- ---------- ------------
Undefined CT2K102464BD1 1866 8
Undefined CT2K102464BD1 1866 8
Undefined CT2K102464BD1 1866 8
Undefined CT2K102464BD1 1866 8
Physical disks
Model Drive type Bus type Size, GB
----- ---------- -------- --------
Samsung SSD 870 EVO 2TB SSD SATA 1863,02
WDC WD30EZRX-00DC0B0 Unspecified SATA 2794,52
Model VRAM, GB
----- --------
NVIDIA GeForce RTX 3060 12
PS C:\Users\Windows X>
jchd
AutoIt MVPs (MVP)
Messages : 2273 Enregistré le : lun. 30 mars 2009 22:57
Localisation : Sud-Ouest de la France (43.622788,-1.260864)
Status :
Hors ligne
#5
Message
par jchd » jeu. 16 juin 2022 00:58
Que vaut $objItem.AdapterRAM ? C'est l'appel inutile à _UINT qui sème la zizanie en tronquant la valeur renvoyée, qui doit être un INT64.
La cryptographie d'aujourd'hui c'est le taquin plus l'électricité.
Anthony
Niveau 6
Messages : 292 Enregistré le : lun. 17 janv. 2011 14:08
Localisation : France
Status :
Hors ligne
#6
Message
par Anthony » jeu. 16 juin 2022 01:28
jchd a écrit : ↑ jeu. 16 juin 2022 00:58
Que vaut $objItem.AdapterRAM ? C'est l'appel inutile à _UINT qui sème la zizanie en tronquant la valeur renvoyée, qui doit être un INT64.
C'est ce que je comprend aussi
bundyal
Niveau 1
Messages : 3 Enregistré le : dim. 09 avr. 2023 14:25
Status :
Hors ligne
#7
Message
par bundyal » dim. 09 avr. 2023 15:01
Anthony then how do you get that list from powershell
Getting the right memory size for graphics cards > 4GB
bundyal
Niveau 1
Messages : 3 Enregistré le : dim. 09 avr. 2023 14:25
Status :
Hors ligne
#8
Message
par bundyal » dim. 09 avr. 2023 15:03
in AutoIt code is it possible ?