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 24-03-2016 05:32

Quote:

Originally Posted by BAMsE (Post 448250)
I can't create more than one timer with CreateTimer function. Only last defined TTimerProc is executed with the smallest Timeout defined:
Code:

ButtonCB := CreateTimer(10, @ButtonAction;
EqualizerCB := CreateTimer(100, @EqualizerAction);

In this case only EqualizerAction is executed with 10ms interval

A function issue.
Thx for feedback

peterf1999 24-03-2016 08:19

Changes: v0.0.9.3:
Fixed an issue with multiple timers creation.

@Bamse
I should rewrite the entire JoinFile function :eek:

BAMsE 25-03-2016 11:56

Another issue:
Any PAnsiChar of TSysInfo or TVolume is empty after GetDirectXVersion execution.

BTW: what are possible results of GetDirectXVersion?

peterf1999 26-03-2016 08:48

Quote:

Originally Posted by BAMsE (Post 448265)
Another issue:
Any PAnsiChar of TSysInfo or TVolume is empty after GetDirectXVersion execution.

I don't have this issue, the function are separated :confused:

Quote:

Originally Posted by BAMsE (Post 448265)
BTW: what are possible results of GetDirectXVersion?

Ansi string of Directx version or null ansi string.

BAMsE 26-03-2016 12:49

2 Attachment(s)
One pic tells more...

Attachment 14056

... plus small bonus: executing DiskVolumeInfo before GetSysInfo messing strings returned by the first mentioned...

Attachment 14055

BAMsE 26-03-2016 17:20

GetFileVersionData causes file dependent errors AFTER gathering info from file on both UNICODE and ANSI (tested different exes, dlls). I mean errors are not random - some files always pass with the same flag, but fails with another (e.g. pckr.dll never fails with CompanyName or FileVersion but always fails with FileDescription or ProductName). Problematic strings are always correct - errors occur AFTER retrieving and returning them.
Code:

Runtime Error (at 750:30170):
Access violation at address 05C276A2 in module 'Isab.dll'. Read of address A7FFFFFC.

Code:

Runtime Error (at 750:30170):
Exception "EOleException" at address 00497587.


Code:

Runtime Error (at 2:273):
Exception "EOSError" at address 00497587.


peterf1999 27-03-2016 10:09

Send pm with links of scripts have raised the errors of:
GetFileVersionData
DiskVolumeInfo
GetSysInfo

I tested GetFileVersionDataW & GetFileVersionDataA on Altef_4's pckr.dll without errors. ( Inno Setup ultra v5.5.1 unicode, and v5.5.5 ansi).

BAMsE 27-03-2016 14:06

1 Attachment(s)
Any script, e.g. your example from post 59 I've modified it to induce errors - duplicated lines 'OSName' and 'HDDLabel' after GetDirectXVersion call. Also try to define INVERT.
GetFileVersionData seems to work fine :confused: maybe some fault of my rig (but yesterday deliberately turned OC off to avoid any misrepresentations). Now compiled with 5.5.8(a) gives Access violation at the end of setup. With 5.5.1.ee2(u) works fine.

Razor12911 27-03-2016 17:22

2 Attachment(s)
Watch example

Razor12911 27-03-2016 17:36

3 Attachment(s)
Hey peterf, there seems to be a problem with SaveFileFromBuffer function, after saving a file, handle is not closed so I'm getting OpenError exceptions.

Edit:
Also this, I don't know if I'm doing anything wrong here.

Request:
GetImgRotation function ;)

Razor12911 27-03-2016 18:09

2 Attachment(s)
Cryptfile example

BAMsE 28-03-2016 01:34

1 Attachment(s)
Razor use DrawToDC instead of DrawImages. There's no DrawImages export in ISab.dll :p See example.

peterf1999 28-03-2016 05:09

Quote:

Originally Posted by Razor12911 (Post 448279)
Hey peterf, there seems to be a problem with SaveFileFromBuffer function, after saving a file, handle is not closed so I'm getting OpenError exceptions.

Fixed.

The verdict that I already knew:
Sharing data structures ( TSysInfo or TVolume) or classes between two modules (inno setup exe and dlls )
in delphi/pascal is deprecated or even illegal. This is the reason of the issues,
but I always hated to export a single function for only one value.

All I need is to export each function e.g.:

Code:

function GetProcessorName: PAnsichar;
function GetFileSystemType: PAnsichar;
function GetCpuClockSpeed: integer;
...

and so on

Razor12911 28-03-2016 05:48

1 Attachment(s)
Yea well there was no DrawToDC on first page, I used it as reference.

peterf1999 29-03-2016 09:20

DiskVolumeInfo function replaced by:

Code:


const
  TF_InBytes = 1;
  TF_InKiloBytes = 2;
  TF_InMegaBytes = 4;
  TF_InGigaBytes = 8;

function GetDiskVolumeName(const RootDir: PAnsichar):PAnsichar; external 'GetDiskVolumeName@files:Isab.dll stdcall delayload';
function GetFileSystemName(const RootDir: PAnsichar):PAnsichar; external 'GetFileSystemName@files:Isab.dll stdcall delayload';
function GetVolumeFreeSpace(const RootDir: PAnsichar; const OutSizeType: Byte): Double; external 'GetVolumeFreeSpace@files:Isab.dll stdcall delayload';
function GetVolumeSize(const RootDir: PAnsichar; const OutSizeType: Byte): Double; external 'GetVolumeSize@files:Isab.dll stdcall delayload';



All times are GMT -7. The time now is 20:28.

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