Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17-05-2014, 09:06
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
altef_4 is on a distinguished road
Quote:
Originally Posted by peterf1999 View Post
  • Added CheckFileSHA1 function to dll.
small error, if file for check not exists - error.
p.s. in attachment working module+example for those who don't know how to use this library.
p.p.s. can you provide me example how do you create callback for inno setup in delphi without CallbackCtrl.dll/InnoCallback.dll/CallbackAddr ?
Attached Files
File Type: 7z Isab_MODULE+EXAMPLE.7z (3.2 KB, 193 views)
Reply With Quote
The Following 5 Users Say Thank You to altef_4 For This Useful Post:
ffmla (18-06-2017), Nemko (22-05-2018), peterf1999 (17-05-2014), Razor12911 (12-12-2014), y_thelastknight (17-05-2014)
Sponsored Links
  #2  
Old 17-05-2014, 09:58
peterf1999's Avatar
peterf1999 peterf1999 is offline
Die Hard Member
 
Join Date: Nov 2008
Location: Italy
Posts: 928
Thanks: 14
Thanked 983 Times in 236 Posts
peterf1999 is on a distinguished road
Quote:
Originally Posted by altef_4 View Post
small error, if file for check not exists - error.
p.s. in attachment working module+example for those who don't know how to use this library.
p.p.s. can you provide me example how do you create callback for inno setup in delphi without CallbackCtrl.dll/InnoCallback.dll/CallbackAddr ?
Code:
type THashProgress = function(OverallProgress,FileProgress: Integer): Boolean of object;




function CheckFileSHA1(Filename,SHA1HashHex: AnsiString; PctOfTotal: integer; callback: THashProgress): integer export; stdcall;
begin
...

if not callback(FileProgress+OverallProgress,round(FileProgress*100/PctOfTotal)) then begin
      Result:=-1;
      break;
      end;
...

end;
I didn't intentionally handle the exception of TFileStream, because the file must exist.

Last edited by peterf1999; 17-05-2014 at 10:44.
Reply With Quote
The Following 2 Users Say Thank You to peterf1999 For This Useful Post:
altef_4 (17-05-2014), y_thelastknight (18-05-2014)
  #3  
Old 18-05-2014, 03:58
peterf1999's Avatar
peterf1999 peterf1999 is offline
Die Hard Member
 
Join Date: Nov 2008
Location: Italy
Posts: 928
Thanks: 14
Thanked 983 Times in 236 Posts
peterf1999 is on a distinguished road
  • Added GetFileSHA1 function to dll.
  • CheckFileSHA1 : no more exception is raised if the file to check is not found, an error code is returned from function (see the 1st post).
Reply With Quote
The Following 4 Users Say Thank You to peterf1999 For This Useful Post:
altef_4 (19-05-2014), arkantos7 (18-05-2014), Razor12911 (19-05-2014), y_thelastknight (18-05-2014)
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
Inno Setup: Additional Libraries altef_4 Conversion Tutorials 50 21-10-2020 09:59
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
Tutorial using CI 8.0.0 yener90 Conversion Tutorials 424 21-10-2014 09:49



All times are GMT -7. The time now is 12:27.


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