Ich hab da was altes gefunden...das ist allerdings sehr alt.
Delphi-Quellcode:
function GetFreeSystemResources(SysResource: Word): Word;
var
huser16, huser32: THandle;
ThunkTrash:
array[0..$20]
of Word;
fp, qfp: Pointer;
begin
result := 0;
if (SysUtils.Win32PlatForm = VER_PLATFORM_WIN32_NT)
then
exit;
// NT
huser16 := 0;
huser32 := 0;
try
ThunkTrash[0] := huser16;
huser16 := LoadLibrary16('
user.exe');
fp := GetProcAddress16(huser16, '
GetFreeSystemResources');
huser32 := LoadLibrary('
Kernel32');
qfp := GetProcAddress(huser32, '
QT_Thunk');
if (fp =
nil)
or (qfp =
nil)
then
exit;
asm
push SysResource
mov edx, fp
call qfp
mov Result, ax
end;
finally
FreeLibrary16(huser16);
FreeLibrary(huser32);
end;
end;
Edit: Das Ergebnis sind wohl die freien Ressourcen in %...oder so ähnlich
Sherlock