|
|
|
#1
|
||||
|
||||
|
Hmm, don't know what you talking 'bout bro.
here is the code that I use. result in in MegaBytes and my results type PDisplay_Device = record cb: DWord; DeviceName: array [0..31] of char; DeviceString: array [0..127] of char; StateFlags: DWord; DeviceID, DeviceKey: array [0..127] of char; end; function RoundUp(Num: Integer): Integer; var i, k: Integer; begin i:= trunc(Num/64); k:= 64*i; if (k<Num) then i:=i+1; k:= 64*i; Result:= k; end; function VideoSize: Integer; var lpDisplayDevice: PDisplay_Device; DeviceKey: String; DeviceValue: Cardinal; DeviceName: AnsiString; begin lpDisplayDevice.cb := SizeOf(lpDisplayDevice); DeviceKey:= ''; n:= 0; while not (EnumDisplayDevices(0, n, lpDisplayDevice, 0)and(lpDisplayDevice.StateFlags and 4 > 0))and(n < 127) do n:= n+1; for n := 0 to 127 do DeviceKey:= DeviceKey + lpDisplayDevice.DeviceKey[n]; Delete(DeviceKey, Pos(Chr(0), DeviceKey), 127); StringChange(DeviceKey, '\Registry\Machine\', ''); i := 1; DeviceValue := 0; if RegQueryBinaryValue(HKLM, DeviceKey, 'HardwareInformation.MemorySize', DeviceName) then for n := 1 to Length(DeviceName) do begin DeviceValue := DeviceValue + Ord(DeviceName[n])*i; i := i*$100; end else if not RegQueryDWordValue(HKLM, DeviceKey, 'HardwareInformation.MemorySize', DeviceValue) then RegQueryDWordValue(HKLM, DeviceKey + '\Info', 'VideoMemory', DeviceValue); DeviceName:= ''; for n := 0 to 127 do DeviceName := DeviceName + lpDisplayDevice.DeviceString[n]; Delete(DeviceName, Pos( Chr(0), DeviceName ), 127); Result:=RoundUp(DeviceValue/(1024*1024)); end; Last edited by Razor12911; 13-09-2014 at 17:29. |
| Sponsored Links |
|
#2
|
|||
|
|||
|
no my friend, I know what I'm saying.
example: if I have a card with 3GB of ram, does not mean that I can play with these statistics, even in games that require 256 .. look here: Click ![]() Thanks for code
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Test my Installer friend! | Carldric Clement | Conversion Tutorials | 14 | 29-11-2014 11:44 |
| Test Drive Unlimited 2 Beta | Dopefish | PC Games - Protection List | 5 | 06-02-2011 04:46 |
| Test burned cd-r | NickSOnnevelt | PS2 Games | 2 | 02-08-2003 12:24 |
| backup work on my PS2,but no my friend | fack_omega | PS2 Games | 3 | 17-12-2002 21:46 |