FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   SysInfo DLL Plugin (https://fileforums.com/showthread.php?t=103432)

Razor12911 20-05-2020 09:52

Quote:

Originally Posted by felice2011 (Post 485929)
Come on don't overdo it ....:D:p

is hungry a few GB on my old PC

https://i.ibb.co/CzsqD4t/VGA.png

I only noticed this alternative when I was trying to allocate memory in GPU instead of ram to see what will happen with my programs :p

felice2011 20-05-2020 10:06

Quote:

Originally Posted by Razor12911 (Post 485934)
I only noticed this alternative when I was trying to allocate memory in GPU instead of ram to see what will happen with my programs :p

I personally think it's too much information, most of it unnecessary to include in an installation or other. perhaps for other information purposes on hardware or software yes.:confused:

Razor12911 20-05-2020 10:48

Quote:

Originally Posted by felice2011 (Post 485935)
I personally think it's too much information, most of it unnecessary to include in an installation or other. perhaps for other information purposes on hardware or software yes.:confused:

Quote:

Originally Posted by Razor12911 (Post 485928)
I do not recommend it unless if you really want to know more about the GPU, such as clock speeds or to use the GPU for other purposes.

Well I did say

Cesar82 20-05-2020 16:55

1 Attachment(s)
I think a reading version of the registry does not work properly if you don't have a video card.
I created a version with both options in inno setup, if the result of the WMI verification is less than 0 (Negative value) it checks the registry.

DiCaPrIo 29-05-2020 04:19

Quote:

Originally Posted by BLACKFIRE69 (Post 486076)
guys,
test this plz :D

VRam: 17592186044415 MB :eek:

Cesar82 29-05-2020 04:55

Quote:

Originally Posted by DiCaPrIo (Post 486077)
VRam: 17592186044415 MB :eek:

Also here.

Razor12911 29-05-2020 05:20

Quote:

Originally Posted by DiCaPrIo (Post 486077)
VRam: 17592186044415 MB :eek:

Me wondering if this would be enough for Crysis Remastered :rolleyes:

Quote:

Originally Posted by BLACKFIRE69 (Post 486079)
my god! :eek:

this may fix, plz test too.

Code:

GpuName:  Intel(R) HD Graphics 4600
VRam:  1024 MB

My GTX 1060 not detected and these Intel garbage graphics are also 128MB, not 1024MB

BLACKFIRE69 29-05-2020 05:25

Quote:

Originally Posted by Razor12911 (Post 486080)
Me wondering if this would be enough for Crysis Remastered :rolleyes:

yup 😎

BLACKFIRE69 29-05-2020 05:38

Quote:

Originally Posted by Razor12911 (Post 486080)

Code:

GpuName:  Intel(R) HD Graphics 4600
VRam:  1024 MB


i am making progress... :cool: :D

Quote:

My GTX 1060 not detected and these Intel garbage graphics are also 128MB, not 1024MB
Usually this is shown (128 or 512 --> 1 GB). :rolleyes:

DiCaPrIo 29-05-2020 05:54

GpuName: NVIDIA GeForce GTX 1060 6GB
VRam: -1 MB
use Int64

Razor12911 29-05-2020 06:27

2 Attachment(s)
I wonder what it is that you're doing wrong bro but here is another place in regedit where you can get GPU info for all GPUs installed.

Cesar82 30-05-2020 05:21

Quote:

Originally Posted by Razor12911 (Post 486085)
I wonder what it is that you're doing wrong bro but here is another place in regedit where you can get GPU info for all GPUs installed.

This subject is also of interest, so I ask questions.
This GUID is variable from system to system.
Here there are 6 GUIDs with DedicatedVideoMemory values, one of which is from the ON-BOARD video card.
But the GUID bears no resemblance to those of your images.
https://i.imgur.com/vXXrx3Z.png
How to identify the correct GUID to obtain the video value?
Would this method work with older operating systems like WindowsXP or Vista, 7, etc?

I could make a list and search all GUIDs until I found a value other than 0, but how do I know if it would be the correct GUID?
The value in DedicatedVideoMemory is not correct here.
It should be 4 GB but it results 4239917056 = 4043.5 MB = 3.94 GB.

Razor12911 30-05-2020 17:23

1 Attachment(s)
Quote:

Originally Posted by Cesar82 (Post 486099)
This subject is also of interest, so I ask questions.
This GUID is variable from system to system.
Here there are 6 GUIDs with DedicatedVideoMemory values, one of which is from the ON-BOARD video card.
But the GUID bears no resemblance to those of your images.
https://i.imgur.com/vXXrx3Z.png
How to identify the correct GUID to obtain the video value?

I decided to check where these values really came from
SOFTWARE\Microsoft\DirectX\ - DirectX is a clue so one has to go on msdn
which is here
https://docs.microsoft.com/en-us/win...i_adapter_desc
https://stackoverflow.com/questions/...r-amd/56599035

Also found this Visual Basic code so I translated it to pascal so here

Code:

uses
  Winapi.Windows, Winapi.DXGI;

type
  TGPUInfo = record
    FName: String;
    FSize: Integer;
  end;

  TGPUs = array of TGPUInfo;

procedure GetGPUs(out V: TGPUs);
  function Align(Value, Size: Integer): Integer;
  begin
    if Value mod Size <> 0 then
      Result := Succ(Max(0, Value div Size)) * Size
    else
      Result := Value;
  end;

var
  GPUInfo: TGPUInfo;
  i: Integer;
  riid: TGUID;
  hr: HRESULT;
  pFactory: IDXGIFactory;
  pAdapter: IDXGIAdapter;
  dxAdapterDesc: DXGI_ADAPTER_DESC;
begin
  riid := StringToGUID('{7b7166ec-21c7-44ae-b21a-c9ae321ae369}');
  pFactory := nil;
  hr := CreateDXGIFactory(riid, pFactory);
  if (hr = S_OK) and Assigned(pFactory) then
  begin
    pAdapter := nil;
    i := 0;
    while (pFactory.EnumAdapters(i, pAdapter) = S_OK) do
    begin
      FillChar(dxAdapterDesc, SizeOf(DXGI_ADAPTER_DESC), 0);
      hr := pAdapter.GetDesc(dxAdapterDesc);
      if hr = S_OK then
      begin
        GPUInfo.FName := dxAdapterDesc.Description;
        GPUInfo.FSize := IfThen(dxAdapterDesc.DedicatedVideoMemory = 0,
          dxAdapterDesc.DedicatedSystemMemory,
          dxAdapterDesc.DedicatedVideoMemory) div 1048576;
        GPUInfo.FSize := Align(GPUInfo.FSize, IfThen(GPUInfo.FSize < 512,
          32, 512));
        Insert(GPUInfo, V, Length(V));
      end;
      inc(i);
    end;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  i: Integer;
  MyGPUs: TGPUs;
begin
  GetGPUs(MyGPUs);
  for i := Low(MyGPUs) to High(MyGPUs) do
    ShowMessage(MyGPUs[i].FName + ' (' + MyGPUs[i].FSize.ToString + ' MB)');
end;

Quote:

Would this method work with older operating systems like WindowsXP or Vista, 7, etc?
This works using DXGI which was introduced in Windows Vista.

Quote:

The value in DedicatedVideoMemory is not correct here.
It should be 4 GB but it results 4239917056 = 4043.5 MB = 3.94 GB.
Actually it is correct, open task manager and you'll see why it is 3.94 GB, I added the align function to help with rounding off 4044 to 4096

Cesar82 30-05-2020 18:44

@Razor12911
If possible, share the compiled executable for me to check here.

I changed the code to use with Delphi 2010 (I only have this version installed), but in the Delphi 2010 version it does not have uses DXGI, so I include this DXGI from the link

The results here were well below what should be displayed (3584 MB).And in the second result he detected "Microsoft Basic Render Driver (0 MB)"

I don't know if I did something wrong or the DXGI I used doesn't work, so if possible share the exe for me to compare.
Thanks!

Razor12911 30-05-2020 18:51

2 Attachment(s)
there

edit: something I'm only realizing now XD, this method might have issues because it is SIZE_T that is being used which is an equivalent to NativeInt in Delphi.

NativeInt in x86 is actually a 32-bit integer, however this can be fixed by merging this code to the same idea I shared earlier about the same info being available on registry here


All times are GMT -7. The time now is 23:00.

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