the error is in both versions
I have read many treads
but no solution found
so I hope you can help me
oh and my system is win7 64bit
my video card has 4GB
Thanks in advance
[Code]
#define processor "2000"
#define videoram "255500000"
#define ram "2047"
#define pagefile "756"
[Setup]
AppName=System Check
AppVerName=System Check
DefaultDirName={pf32}\System Check
[Files]
Source: C:\Program Files (x86)\Inno Setup 5\get_hw_caps.dll; Flags: dontcopy
[Code]
function GetVideoCardName(): PansiChar; external 'hwc_GetVideoCardName@files:get_hw_caps.dll stdcall';
function GetSoundCardName(): PansiChar; external 'hwc_GetSoundCardName@files:get_hw_caps.dll stdcall';
function DetectHardware(): Integer; external 'hwc_DetectHardware@files:get_hw_caps.dll stdcall';
function GetHardDriveFreeSpace(hdd: integer): Integer; external 'hwc_GetHardDriveFreeSpace@files:get_hw_caps.dll stdcall';
function GetHardDriveName(hdd: integer): PansiChar; external 'hwc_GetHardDriveName@files:get_hw_caps.dll stdcall';
function GetHardDriveTotalSpace(hdd: integer): Integer; external 'hwc_GetHardDriveTotalSpace@files:get_hw_caps.dll stdcall';
function GetHardDrivesCount(): Integer; external 'hwc_GetHardDrivesCount@files:get_hw_caps.dll stdcall';
function GetSoundCards(): Integer; external 'hwc_GetSoundCards@files:get_hw_caps.dll stdcall';
function GetSystemPage(): Integer; external 'hwc_GetSystemPage@files:get_hw_caps.dll stdcall';
function GetSystemPhys(): Integer; external 'hwc_GetSystemPhys@files:get_hw_caps.dll stdcall';
function GetVidMemLocal(): Integer; external 'hwc_GetVidMemLocal@files:get_hw_caps.dll stdcall';
function GetVidMemNonLocal(): Integer; external 'hwc_GetVidMemNonLocal@files:get_hw_caps.dll stdcall';
function GetVideoCardDev(): Integer; external 'hwc_GetVideoCardDev@files:get_hw_caps.dll stdcall';
function GetVideoCardVen(): Integer; external 'hwc_GetVideoCardVen@files:get_hw_caps.dll stdcall';
function CheckSystemPage(PreviousPageId: Integer): Integer;
var
Page: TWizardPage;
ProcessorName:string;
Processor,ProcessorNamePanel,VideoCardNamePanel,Vi deoCardPanel,AudioCardNamePanel,RAMTotalPanel,Page FileTotalPanel,AudioCardPanel,RAMPanel,PageFilePan el: TMemo;
ProcessorMHZ: Cardinal;
StaticText,StaticText2:TNewStaticText;
oneGhz,oneMB,Rest:Integer;
begin
RegQueryStringValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0',' ProcessorNameString', ProcessorName);
RegQueryDWordValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0',' ~MHz', ProcessorMHZ);
GetVidMemLocal;
GetSoundCards;
oneGhz:=1000;
Rest:=ProcessorMHZ - oneGhz;
oneMB:=1024*1024;
Page := CreateCustomPage(PreviousPageId,'Hardware','Setup hat die folgenden Voraussetzungen erkannt');
StaticText:=TNewStaticText.Create(Page);
with StaticText do begin
Parent:=Page.Surface;
Caption:='Alle Komponenten erfüllen die Anforderungen des Spiels.';
Left:=0;
Top:=5;
AutoSize:=True;
end;
StaticText2:=TNewStaticText.Create(Page);
with StaticText2 do begin
Parent:=Page.Surface;
Caption:='Wenn Sie bereit sind fortzufahren, klicken Sie auf "Weiter"'
Left:=0;
Top:=220;
AutoSize:=True;
end;
Processor := TMemo.Create(Page);
with Processor do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Prozessor'));
Color := -16777194;
Left := ScaleX(0);
Top := ScaleY(32);
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;
ProcessorNamePanel := TMemo.Create(Page);
with ProcessorNamePanel do begin
Parent := Page.Surface;
Lines.Add(' '+ProcessorName+' '+IntToStr(ProcessorMHZ/oneGhz)+','+IntToStr(Rest)+'GHz'+' '+'@'+IntToStr(ProcessorMHZ)+'MHz');
Left := ScaleX(109);
Top := ScaleY(32);
Width := ScaleX(304);
Height := ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;
//CPU-Geschwindigkeit//
if ProcessorMHZ<{#processor} then begin
ProcessorNamePanel.Color:=clred;
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
end;
VideoCardPanel:=TMemo.Create(Page);
with VideoCardPanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Grafikkarte'));
Color := -16777194;
Left:=ScaleX(0);
Top:=Processor.Top+27;
Width:=ScaleX(104);
Height:=ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;
VideoCardNamePanel:=TMemo.Create(Page);
with VideoCardNamePanel do begin
Parent:=Page.Surface;
Lines.Add(' '+GetVideoCardName+' '+IntToStr(GetVidMemLocal/oneMB)+' MB');
Left:=ScaleX(109);
Top:=VideoCardPanel.Top;
Width:=ScaleX(304);
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;
//Video Memory//
if GetVidMemLocal<{#videoram} then begin
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
VideoCardNamePanel.Color:=clred;
end
; AudioCardPanel:=TMemo.Create(Page);
with AudioCardPanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Soundkarte'));
Color := -16777194;
Left := ScaleX(0);
Top:=VideoCardPanel.Top+27;
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True; Cursor := crArrow;
end;
AudioCardNamePanel:=TMemo.Create(Page);
with AudioCardNamePanel do begin
Parent:=Page.Surface;
Lines.Add(' '+GetSoundCardName);
Left:=ScaleX(109);
Top:=AudioCardPanel.Top;
Width:=ScaleX(304);
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;
//Audio//
if GetSoundCards=0 then begin
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
with
AudioCardNamePanel do begin
Color:=clred;
Lines.Add('nicht gefunden');
ReadOnly := True; Cursor := crArrow;
end;
end;
RAMPanel:=TMemo.Create(Page);
with RAMPanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' RAM'));
Color := -16777194;
Left := ScaleX(0);
Top:=AudioCardPanel.Top+27;
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;
RAMTotalPanel:=TMemo.Create(Page);
with RAMTotalPanel do begin
Parent:=Page.Surface;
Lines.Add(' '+IntToStr(GetSystemPhys+1) +' MB');
Left:=AudioCardNamePanel.Left;
Top:=RAMPanel.Top;
Width:=AudioCardNamePanel.Width;
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;
//RAM//
if GetSystemPhys+1<{#ram} then begin
RAMTotalPanel.Color:=clred;
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
end;
PageFilePanel:=TMemo.Create(Page);
with PageFilePanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Auslagerungsdatei'));
Color := -16777194;
Left := ScaleX(0);
Top:=RAMPanel.Top+27;
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;
PageFileTotalPanel:=TMemo.Create(Page);
with PageFileTotalPanel do begin
Parent:=Page.Surface;
Lines.Add(' '+IntToStr(GetSystemPage)+' MB');
Left:=RAMTotalPanel.Left;
Top:=PageFilePanel.Top;
Width:=RAMTotalPanel.Width;
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True; Cursor := crArrow;
end;
//Auslagerungsdatei//
if GetSystemPage<{#pagefile} then begin
PageFileTotalPanel.Color:=clred;
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
end;
Result:=Page.ID;
end;
procedure InitializeWizard();
begin
CheckSystemPage(wpWelcome);
end;
[LangOptions]
LanguageName=German
LanguageID=$0407