Очень странно, почему то я не могу использовать библеотеку innocallback.dll
Например тут
[more=КОД_1]#define TIME_FOR_VIEW 1
[Setup]
AppName=My Program
AppVerName=My Program v.1.2
DefaultDirName={pf}\My Program
OutputBaseFileName=Timer_with_InnoCallback.dll
OutputDir={#SourcePath}
[Files]
Source: InnoCallback.dll; Flags: dontcopy;
[Code]
type
TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
var
TimerID: LongWord;
currTime: Integer;
SplashImage: TBitmapImage;
function WrapTimerProc(callback:TProc; paramcount:integer):longword;
external 'wrapcallback@files:InnoCallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord;
external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord;
external 'KillTimer@user32.dll stdcall';
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
currTime := currTime + 1;
case currTime of
{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{src}\Image_2.bmp')) end;
2*{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{src}\Image_3.bmp')); KillTimer(0, TimerID); end;
end;
end;
procedure InitializeWizard();
begin
currTime := 0;
WizardForm.ProgressGauge.Parent := WizardForm;
WizardForm.ProgressGauge.Top := WizardForm.CancelButton.Top;
WizardForm.ProgressGauge.Left := ScaleX(10);
WizardForm.ProgressGauge.Width := WizardForm.ProgressGauge.Width / 2;
WizardForm.ProgressGauge.Hide;
WizardForm.StatusLabel.Hide;
WizardForm.FilenameLabel.Hide;
SplashImage := TBitmapImage.Create(WizardForm);
SplashImage.Top := 0;
SplashImage.Left := 0;
SplashImage.Width := WizardForm.MainPanel.Width;
SplashImage.Height := WizardForm.Bevel.Top;
SplashImage.Parent := WizardForm.InnerPage;
SplashImage.Stretch := True;
SplashImage.Bitmap.LoadFromFile(ExpandConstant('{src}\Image_1.bmp'));
SplashImage.Hide;
end;
procedure CurPageChanged(CurPageID: Integer);
var
pfunc: LongWord;
begin
if (CurPageID = wpInstalling) then
begin
pfunc := WrapTimerProc(@OnTimer, 4);
TimerID := SetTimer(0, 0, 1000, pfunc);
WizardForm.InnerNotebook.Hide;
WizardForm.Bevel1.Hide;
WizardForm.MainPanel.Hide;
WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
WizardForm.ProgressGauge.Show;
SplashImage.Show;
end
else
begin
WizardForm.ProgressGauge.Hide;
SplashImage.Hide;
if (CurPageID > wpInstalling) and (CurPageID < wpFinished) then
begin
WizardForm.InnerNotebook.Show;
WizardForm.Bevel1.Show;
WizardForm.MainPanel.Show;
WizardForm.PageNameLabel.Show;
WizardForm.PageDescriptionLabel.Show;
end;
end;
end;
procedure DeinitializeSetup();
begin
KillTimer(0, TimerID);
end;[/more]
Или тут [more=КОД][Setup]
AppName=My Program
AppVerName=My Program version 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
Compression=zip
[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
[Files]
Source: c:\games\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
Source: is7z.dll; DestDir: {tmp}; Flags: dontcopy
Source: InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
[Icons]
Name: {group}\Удалить; IconFilename: {app}\unins000.exe; Filename: {app}\unins000.exe
[Code]
type
TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord);
var
ProgressBar : TNewProgressBar;
TimerID: LongWord;
pfunc: LongWord;
Label1:tlabel;
function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
procedure Extract7z (hWnd: THandle; fpath,extractPath:pchar); external 'Extract7z@files:is7z.dll stdcall';
function progress:integer; external 'progress@files:is7z.dll stdcall';
function progressmax:integer; external 'progressmax@files:is7z.dll stdcall';
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
progressbar.Max:=progressmax;
progressbar.Position:=progress;
end;
procedure InitializeWizard();
begin
ProgressBar := TNewProgressBar.Create(WizardForm);
label1:=Tlabel.Create(WizardForm);
WizardForm.ProgressGauge.left:=135;
WizardForm.FilenameLabel.left:=135;
WizardForm.ProgressGauge.width:=280;
ProgressBar.Left := 10;
ProgressBar.Top := WizardForm.ProgressGauge.Top;
ProgressBar.Width := 120;
ProgressBar.Height := WizardForm.ProgressGauge.Height;
ProgressBar.Parent := WizardForm.InstallingPage;
ProgressBar.Position := 0;
label1.parent:=WizardForm.InstallingPage;
label1.top:=WizardForm.FilenameLabel.Top;
label1.caption:='Распаковка архива 7zip';
label1.left:=10;
label1.width:=130;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
If CurStep=ssPostInstall then
begin
pfunc:=WrapTimerProc(@OnTimer, 4)
TimerID:=SetTimer(0, 0, 200, pfunc)
Extract7z (wizardform.handle, ExpandConstant('{src}') + '\anyfiles.7z', ExpandConstant('{app}'));
end
end;
procedure CurPageChanged(CurPageID: Integer);
begin
If CurPageID=wpFinished then KillTimer(0, TimerID);
end;[/more]
Выдает ошибку
Не знаю, что делать, ибо скрипт Corona, где тоже используется модуль работает...
Проблема решина самостоятельно)