Bo Berglund via fpc-pascal <fpc-pascal@lists.freepascal.org> schrieb am Mi., 22. März 2023, 11:18:
> > >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? > I mean a variant of FPC that targets the i386 platform together with the compiled units for i386-win32. > 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? > No. > 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... > You could use the objdump utility provided with FPC (call it as "objdump -x <file>"). If it doesn't print any errors then it's a COFF file. > >> 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 > That mean there's quite a bit of code in there, so it isn't trivially to reverse engineer... > > >> 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 > Then you should ask them for a suitable 64-bit object file (I assume that they'll provide the one for C which they probably also did for you back then and then you might need to adjust the import unit a bit to be usable with x86_64-win64; as long as they also provide a C header that should be doable). Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal