On Wed, 22 Mar 2023 08:01:57 +0100, Sven Barth via fpc-pascal
<fpc-pascal@lists.freepascal.org> wrote:

>Bo Berglund via fpc-pascal <fpc-pascal@lists.freepascal.org> schrieb am
>Di., 21. März 2023, 23:54:
>
>> 1) How should I go about translating the above to current FreePascal
>> syntax?
>>
>> This involves:
>> { Force FAR calls }
>> {$F+}
>>
>> {$L SPROMEPS.OBJ}  { LINK WITH THE SUPERPRO OBJECT FILE }
>>
>
>These won't be a problem. Both Delphi and FPC (for non-i8086) will skip the
>$F directive as it's not necessary on 32- or 64-bit systems.

OK, so I don't have to modify this part then.

>The object file won't be a problem for FPC on i386-win32 because it will be
>a COFF file which is the default.

When you say "on i386-win32" does that mean a 32 bit version of Windows as the
host system for building the programs?

If I have fpc 3.2.2 inbstalled on Windows 10 x64 I assume it is a 64 bit target
exe which will be the output, right?

If that is the case will the obj file work when building the exe?

Is it possible to check if the obj file is of the "COFF" type?
Note that the timestamp of the obj file is 2003-05-29...

>> 2) Is there a way to translate/convert the 32 bit Windows SPROMEPS.OBJ
>> file into
>> a 64 bit one such that it could be used for a 64 bit fpc compiler?
>> It is the interface to the protection key driver on the Windows system...
>>
>
>Aside from asking the company for a 64-bit variant or reverse engineering
>the object file, no. How large is that object file?

Size = 39330 bytes

>Maybe it's only a relatively simple interface to the driver..

The accompanying pas file I quoted from declares 12 different API calls into the
driver, which we have used to create our own interface functions for the key
handling. This was done about 20 or so years ago...

>
>> It does work for our 32 bit Delphi7 programs on Windows 10 x64, so there
>> must be some 32<->64 bit handling in Windows maybe?
>>
>
>Are you really sure there's a driver involved? When you install it is there
>a driver binary for both 32- and 64-bit? Cause 64-bit Windows *can not*
>load 32-bit drivers.

THALES has supplied a dedicated driver for Windows, which we use on all s/w
installations. It is a rather big (2945376 bytes) installer file named "Sentinel
System Driver Installer 7.6.0.exe"
So, yes I am sure it is needed, whithout it the s/w cannot read the protection
key.
The driver has changed over the years as Windows progressed and we now use
version 7.6.0


I guess I have to just create a simple program which reads the key data and does
nothing else to check if the handling will actually work...
Or convert a small tool we already have from Delphi7 to Lazarus/FPC and see what
happens..


-- 
Bo Berglund
Developer in Sweden

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to