Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 13-09-2014, 17:24
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,761
Thanks: 2,192
Thanked 11,242 Times in 2,318 Posts
Razor12911 is on a distinguished road
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;
Attached Images
File Type: jpg 1.jpg (46.1 KB, 77 views)

Last edited by Razor12911; 13-09-2014 at 17:29.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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



All times are GMT -7. The time now is 15:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com