FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Useful Dll for Inno Setup users (https://fileforums.com/showthread.php?t=95775)

peterf1999 30-03-2016 08:18

GetSysInfo procedure replaced by:

Code:

function GetCpuName: PAnsichar; external 'GetCpuName@files:Isab.dll stdcall delayload';
function GetCpuMaxClockSpeed: integer; external 'GetCpuMaxClockSpeed@files:Isab.dll stdcall delayload';
function GetCpuCurrentClockSpeed: integer; external 'GetCpuCurrentClockSpeed@files:Isab.dll stdcall delayload';
function GetCpuManufacturer: PAnsichar; external 'GetCpuManufacturer@files:Isab.dll stdcall delayload';
function GetCpuPhysicalCores: integer; external 'GetCpuPhysicalCores@files:Isab.dll stdcall delayload';
function GetCpuLogicalCores: integer; external 'GetCpuLogicalCores@files:Isab.dll stdcall delayload';
function GetGpuName: PAnsichar; external 'GetGpuName@files:Isab.dll stdcall delayload';
function GetGpuRam: integer; external 'GetGpuRam@files:Isab.dll stdcall delayload';
function GetVideoDescription: PAnsichar; external 'GetVideoDescription@files:Isab.dll stdcall delayload';
function GetHorizontalResolution: PAnsichar; external 'GetHorizontalResolution@files:Isab.dll stdcall delayload';
function GetVerticalResolution: PAnsichar; external 'GetVerticalResolution@files:Isab.dll stdcall delayload';
function GetRefreshRate: PAnsichar; external 'GetRefreshRate@files:Isab.dll stdcall delayload';
function GetAudioDeviceName: PAnsichar; external 'GetAudioDeviceName@files:Isab.dll stdcall delayload';
function GetTotalVisibleMemory: integer; external 'GetTotalVisibleMemory@files:Isab.dll stdcall delayload';
function GetFreePhysicalMemory: integer; external 'GetFreePhysicalMemory@files:Isab.dll stdcall delayload';
function GetOSName: PAnsichar; external 'GetOSName@files:Isab.dll stdcall delayload';
function GetOSVersionMajor: Cardinal; external 'GetOSVersionMajor@files:Isab.dll stdcall delayload';
function GetOSVersionMinor: Cardinal; external 'GetOSVersionMinor@files:Isab.dll stdcall delayload';
function GetOSBuildNumbers: Cardinal; external 'GetOSBuildNumbers@files:Isab.dll stdcall delayload';
function GetServicePackMajorVersion: Word; external 'GetServicePackMajorVersion@files:Isab.dll stdcall delayload';
function GetServicePackMinorVersion: Word; external 'GetServicePackMinorVersion@files:Isab.dll stdcall delayload';
function GetOSArchitecture: Byte; external 'GetOSArchitecture@files:Isab.dll stdcall delayload';


altef_4 30-03-2016 10:09

Quote:

Originally Posted by peterf1999 (Post 448306)
GetSysInfo procedure replaced by:

Code:

function GetCpuName: PAnsichar; external 'GetCpuName@files:Isab.dll stdcall delayload';
function GetCpuMaxClockSpeed: integer; external 'GetCpuMaxClockSpeed@files:Isab.dll stdcall delayload';
function GetCpuCurrentClockSpeed: integer; external 'GetCpuCurrentClockSpeed@files:Isab.dll stdcall delayload';
function GetCpuManufacturer: PAnsichar; external 'GetCpuManufacturer@files:Isab.dll stdcall delayload';
function GetCpuPhysicalCores: integer; external 'GetCpuPhysicalCores@files:Isab.dll stdcall delayload';
function GetCpuLogicalCores: integer; external 'GetCpuLogicalCores@files:Isab.dll stdcall delayload';
function GetGpuName: PAnsichar; external 'GetGpuName@files:Isab.dll stdcall delayload';
function GetGpuRam: integer; external 'GetGpuRam@files:Isab.dll stdcall delayload';
function GetVideoDescription: PAnsichar; external 'GetVideoDescription@files:Isab.dll stdcall delayload';
function GetHorizontalResolution: PAnsichar; external 'GetHorizontalResolution@files:Isab.dll stdcall delayload';
function GetVerticalResolution: PAnsichar; external 'GetVerticalResolution@files:Isab.dll stdcall delayload';
function GetRefreshRate: PAnsichar; external 'GetRefreshRate@files:Isab.dll stdcall delayload';
function GetAudioDeviceName: PAnsichar; external 'GetAudioDeviceName@files:Isab.dll stdcall delayload';
function GetTotalVisibleMemory: integer; external 'GetTotalVisibleMemory@files:Isab.dll stdcall delayload';
function GetFreePhysicalMemory: integer; external 'GetFreePhysicalMemory@files:Isab.dll stdcall delayload';
function GetOSName: PAnsichar; external 'GetOSName@files:Isab.dll stdcall delayload';
function GetOSVersionMajor: Cardinal; external 'GetOSVersionMajor@files:Isab.dll stdcall delayload';
function GetOSVersionMinor: Cardinal; external 'GetOSVersionMinor@files:Isab.dll stdcall delayload';
function GetOSBuildNumbers: Cardinal; external 'GetOSBuildNumbers@files:Isab.dll stdcall delayload';
function GetServicePackMajorVersion: Word; external 'GetServicePackMajorVersion@files:Isab.dll stdcall delayload';
function GetServicePackMinorVersion: Word; external 'GetServicePackMinorVersion@files:Isab.dll stdcall delayload';
function GetOSArchitecture: Byte; external 'GetOSArchitecture@files:Isab.dll stdcall delayload';


You can try to use interfaces instead creating so many exported functions (but only for unicode version)

peterf1999 30-03-2016 10:25

Quote:

Originally Posted by altef_4 (Post 448311)
You can try to use interfaces instead creating so many exported functions (but only for unicode version)

I know, but I used the old procedure getsysinfo to retrieve values. It was the fastest way :D

BAMsE 01-04-2016 11:35

peterf1999 there was a problem with GetSysInfo (not tested with current version, but I think it will be too) on rigs with more than one graphic adapter
http://www.tgp-gaming.de/img/error.png

peterf1999 02-04-2016 04:31

Quote:

Originally Posted by BAMsE (Post 448335)
peterf1999 there was a problem with GetSysInfo (not tested with current version, but I think it will be too) on rigs with more than one graphic adapter
http://www.tgp-gaming.de/img/error.png

Which function (GetGpuName/GetGpuRam) fails?

rinaldo 02-04-2016 17:22

http://fileforums.com/images/icons/icon13.gif

peterf1999 03-04-2016 05:28

  • Renamed 'GetFileSHA1' function to 'GetFileHash'.
  • function prototype changes.
  • Added support for SHA512(SHA-2) hash algorithm to both functions (GetFileHash, CheckFileHash).
Code:

const
  DCP_MD5 = 1;
  DCP_SHA1 = 2;
  DCP_SHA256 = 4; // SHA-2
  DCP_SHA512 = 8; //SHA-2

Code:

function GetFileHash(const Filename: PAnsichar; const DCP_Hash: integer): PAnsichar; external 'GetFileHash@files:Isab.dll stdcall delayload';

peterf1999 06-04-2016 07:51

  • Renamed 'GetGpuRam' function to 'GetGpuVRam'.
  • Optimized WMI code and queries for faster retrieval of values.
  • Now the gpu's functions should work on multi-gpu configuration.

peterf1999 04-05-2016 01:36

1 Attachment(s)
SystemInfo (ISab.dll v0.1.0.4):
  • GetGpuName function returns all vga adapters (running and off line)

nizcoz 10-04-2017 05:02

Somebody can upload an example code to use this library to check hash after installation? Thanks!

pakrat2k2 24-05-2017 02:26

Quote:

Originally Posted by peterf1999 (Post 448816)
SystemInfo (ISab.dll v0.1.0.4):
  • GetGpuName function returns all vga adapters (running and off line)

still reports gpuram incorrectly, says on amd 8gb its has only 4gb

peterf1999 30-11-2017 09:26

@mods
Please delete this thread.

Gupta 30-11-2017 09:50

this thread is good for reading purposes, may be good to lock it rather

Grumpy 01-12-2017 16:00

Quote:

Originally Posted by peterf1999 (Post 464522)
@mods
Please delete this thread.

Why Peter? It is a very useful thread and you have put a lot of work into it, I can not see any point in Deleting it entirely, I could Lock the thread for you?


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

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