2015-06-24 19:02 GMT-03:00 Bo Berglund bo.bergl...@gmail.com:
In order to port it we had to convert an OBJ file from the dongle
maker to a format FPC accepts (coff) using a 3rd party tool, which
also has some bug in it.
There's a tool called CVTRES.EXE that comes with Visual Studio that
El 25/06/2015 a las 21:03, Bo Berglund escribió:
There's a tool called CVTRES.EXE that comes with Visual Studio that does
such conversion. It's an alternative to get a proper coff format
I do have VS installed so I have this tool:
D:\cvtres
Hello,
I think the tool is Editbin, cvtres is
On Thu, 25 Jun 2015 07:28:51 -0300, luiz americo pereira camara
luiz...@oi.com.br wrote:
2015-06-24 19:02 GMT-03:00 Bo Berglund bo.bergl...@gmail.com:
In order to port it we had to convert an OBJ file from the dongle
maker to a format FPC accepts (coff) using a 3rd party tool, which
also has
El 19/06/2015 a las 9:38, Luca Olivetti escribió:
El 19/06/15 a les 09:25, Bo Berglund ha escrit:
constructor TSentinel.Create;
begin
FTimer := TTimer.Create(Application);
FTimer.Enabled := false;
FTimer.Interval := 0;
FTimer.OnTimer := OnCheckTimer(Self); //= Error here
On 23/06/15 23:06, luiz americo pereira camara wrote:
Take a look at
https://msdn.microsoft.com/pl-pl/library/vstudio/7dz62kfh(v=vs.110).aspx
https://msdn.microsoft.com/pl-pl/library/vstudio/7dz62kfh%28v=vs.110%29.aspx
(it suggests a cvtres.exe tool)
Ask to fpc guru if is possible to use
On 23/06/15 23:06, luiz americo pereira camara wrote:
Take a look at
https://msdn.microsoft.com/pl-pl/library/vstudio/7dz62kfh(v=vs.110).aspx
https://msdn.microsoft.com/pl-pl/library/vstudio/7dz62kfh%28v=vs.110%29.aspx
(it suggests a cvtres.exe tool)
Ask to fpc guru if is possible to use
ALMOST SOLVED (workaround found)
As patspiper has posted there has been a potential bug discovered in
the fpc linker while tracing my problems with porting the Sentinel
SuperPro dongle handler class from Delphi to Lazarus/FPC.
In order to port it we had to convert
On Tue, 23 Jun 2015 12:07:05 +, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
Bo Berglund wrote:
On Mon, 22 Jun 2015 16:43:31 -0300, luiz americo pereira camara
luiz...@oi.com.br wrote:
In the breakpoint do a step into (f7) and ser the exact line that crashes
Luiz
In the
El 23/06/15 a les 17:51, Bo Berglund ha escrit:
The problem is most likely in the conversion because even the smallest
test application throws an exception on the very first call into the
driver, the initialization of the Api data interface array.
Or in the calling convention
On Tue, 23 Jun 2015 18:30:46 +0200, Luca Olivetti l...@wetron.es
wrote:
El 23/06/15 a les 17:51, Bo Berglund ha escrit:
The problem is most likely in the conversion because even the smallest
test application throws an exception on the very first call into the
driver, the initialization of the
El 23/06/15 a les 20:38, Bo Berglund ha escrit:
On Tue, 23 Jun 2015 18:30:46 +0200, Luca Olivetti l...@wetron.es
wrote:
El 23/06/15 a les 17:51, Bo Berglund ha escrit:
The problem is most likely in the conversion because even the smallest
test application throws an exception on the very
Take a look at
https://msdn.microsoft.com/pl-pl/library/vstudio/7dz62kfh(v=vs.110).aspx
(it suggests a cvtres.exe tool)
Ask to fpc guru if is possible to use manually an different linker like
http://www.digitalmars.com/ctg/optlink.html
In the end, i would try to compile a delphi dll and access
On 2015-06-23 16:51, Bo Berglund wrote:
No matter what I try there are exceptions generated... :(
It would have been nice if FPC could accept linking with a regular OBJ
file so I did not have to convert it.
You might be better off moving this discussion to the fpc-users mailing
list. I
Bo Berglund wrote:
On Mon, 22 Jun 2015 16:43:31 -0300, luiz americo pereira camara
luiz...@oi.com.br wrote:
In the breakpoint do a step into (f7) and ser the exact line that crashes
Luiz
In the pas unit this is the exact line that crashes:
returnVal := RNBOsproFormatPacket (ApiPacket,
On 06/23/2015 01:35 PM, patspiper wrote:
Pls don't hijack the thread with your never ending NoGui discussions.
Sorry.
But for somebody coming from Delphi it is likely confusing that a NoGUI
application needs to be done completely different than an Application
that does have a GUI, so I
On Mon, 22 Jun 2015 16:43:31 -0300, luiz americo pereira camara
luiz...@oi.com.br wrote:
In the breakpoint do a step into (f7) and ser the exact line that crashes
Luiz
In the pas unit this is the exact line that crashes:
returnVal := RNBOsproFormatPacket (ApiPacket, RB_SPRO_APIPACKET_SIZE);
On 06/23/2015 10:43 AM, Graeme Geldenhuys wrote:
File-New Console Application
That creates a Console application - thus no dependenies on GUI toolkits.
And not support for things like TTimer, Application.QueuAsyncCall,
Support for TThread.Queue and TThread.Synchronize needs to be provided
by
On 2015-06-22 17:14, Bo Berglund wrote:
I tried to do what you proposed:
File-New Console Application
That creates a Console application - thus no dependenies on GUI toolkits.
sentinel.pas(14,3) Fatal: Cannot find unit ExtCtrls used by Sentinel.
Check if package LCLBase is in the
On 06/23/2015 12:51 PM, Graeme Geldenhuys wrote:
Not to rehash an old topic... Maybe that is true for TTimer, but it
took me all of 10 minutes to implement a multi-threaded console
application and implementing a TThread based timer from scratch. All
working just fine under FreeBSD. So I really
On Tue, 23 Jun 2015, Graeme Geldenhuys wrote:
On 2015-06-23 10:45, Michael Schnell wrote:
And not support for things like TTimer
Not to rehash an old topic... Maybe that is true for TTimer, but it took
me all of 10 minutes to implement a multi-threaded console application
and implementing
On 06/23/2015 01:26 PM, Michael Van Canneyt wrote:
Ehm. fpTimer contains just that, it exists since years.
This of course is a well known fact..
But if this is the recommended way to do timers, why does *any
*WidgetType (i.e. TApplication) offer TTimer ?
-Michael
--
On 23/06/15 14:30, Michael Schnell wrote:
On 06/23/2015 01:26 PM, Michael Van Canneyt wrote:
Ehm. fpTimer contains just that, it exists since years.
This of course is a well known fact..
But if this is the recommended way to do timers, why does *any
*WidgetType (i.e. TApplication) offer
On 2015-06-23 10:45, Michael Schnell wrote:
And not support for things like TTimer
Not to rehash an old topic... Maybe that is true for TTimer, but it took
me all of 10 minutes to implement a multi-threaded console application
and implementing a TThread based timer from scratch. All working just
On Mon, 22 Jun 2015 17:47:15 +0300, patspiper patspi...@gmail.com
wrote:
On 22/06/15 17:34, Bo Berglund wrote:
But your best bet is to install the 32 bit version and try it yourself.
That is what I have already...
I am out of ideas for now.
You can ask for help on the fpc mailing list. I
On Mon, 22 Jun 2015 13:29:07 -0300, luiz americo pereira camara
luiz...@oi.com.br wrote:
In my experince sigsegv occurs mostly when a field or variable is accessed
before initialization.
Try to set a breakpoint in dongle.initkey call. And evaluate the dongle
field (open debugger evaluate window)
In my experince sigsegv occurs mostly when a field or variable is accessed
before initialization.
Try to set a breakpoint in dongle.initkey call. And evaluate the dongle
field (open debugger evaluate window)
Look for dongle or one of the tsentinel fields being nil
Liiz
Em 22/06/2015 05:10, Bo
On 22/06/15 17:34, Bo Berglund wrote:
But your best bet is to install the 32 bit version and try it yourself.
That is what I have already...
I am out of ideas for now.
You can ask for help on the fpc mailing list. I propose you prepare a
minimum working example in an lpr file (no units,
In the breakpoint do a step into (f7) and ser the exact line that crashes
Luiz
Em 22/06/2015 14:03, Bo Berglund bo.bergl...@gmail.com escreveu:
On Mon, 22 Jun 2015 13:29:07 -0300, luiz americo pereira camara
luiz...@oi.com.br wrote:
In my experince sigsegv occurs mostly when a field or
On 22/06/15 02:00, Bo Berglund wrote:
I just made a first test by adding the object to my main form as a
private variable.
Which object? Better show the code.
It is created in the form.create event.
I added a button and a static text control on the form and in the
button event I added the
On Mon, 22 Jun 2015 01:00:58 +0200, Bo Berglund
bo.bergl...@gmail.com wrote:
When I stepped through the code I reached the first call to the driver
via the obj file I get an exception when calling RNBOsproFormatPacket
in this function, which is in the SPROMEPS.pas file supplied by
SafeNet:
On 22/06/15 11:09, Bo Berglund wrote:
On Mon, 22 Jun 2015 09:16:20 +0300, patspiper patspi...@gmail.com
wrote:
On 22/06/15 02:00, Bo Berglund wrote:
I just made a first test by adding the object to my main form as a
private variable.
Which object? Better show the code.
Here is the current
Il 22/06/2015 10:09, Bo Berglund ha scritto:
On Mon, 22 Jun 2015 09:16:20 +0300, patspiper patspi...@gmail.com
wrote:
On 22/06/15 02:00, Bo Berglund wrote:
I just made a first test by adding the object to my main form as a
private variable.
Which object? Better show the code.
Here is the
On Mon, 22 Jun 2015 09:16:20 +0300, patspiper patspi...@gmail.com
wrote:
On 22/06/15 02:00, Bo Berglund wrote:
I just made a first test by adding the object to my main form as a
private variable.
Which object? Better show the code.
Here is the current state of the main form where the object
Am 22.06.2015 12:31 schrieb patspiper patspi...@gmail.com:
Question:
Could it be that Lazarus is anyway compiling for a 64 bit application
since it is installed on a 64 bit Windows 7 laptop?
I just assumed that the main application would be 32 bit as is the
case for Delphi
Lazarus/fpc
On Mon, 22 Jun 2015 12:39:18 +0200, Giuliano Colla
giuliano.co...@fastwebnet.it wrote:
Both Win32 and Win64 generate the same compiler option(-WG)
In the same configuration page you should also pick up the right Target
CPU family: i386 as opposed to X86_64, in order to generate a 32bit
On Mon, 22 Jun 2015 13:31:29 +0300, patspiper patspi...@gmail.com
wrote:
The facts:
- You have 64 bit Windows
- You have Delphi 32 bit compiler that produces 32 bit executables
- The Safenet driver installed on 64 bit Windows works with the Delphi
compiled project
Correct summary!
Question:
On 22/06/15 15:55, Bo Berglund wrote:
Question:
Could it be that Lazarus is anyway compiling for a 64 bit application
since it is installed on a 64 bit Windows 7 laptop?
I just assumed that the main application would be 32 bit as is the
case for Delphi
Lazarus/fpc is 64 bit as it has been
On Mon, 22 Jun 2015 17:01:45 +0300, patspiper patspi...@gmail.com
wrote:
Check the bitness of the produced executable.
Did a check with the CygWin file command:
D:\Engineering\Projects\Lazarus\LazDonglefile dongletest.exe
dongletest.exe: PE32 executable (GUI) Intel 80386, for MS Windows
Seems
On 22/06/15 15:51, Bo Berglund wrote:
On Mon, 22 Jun 2015 12:39:18 +0200, Giuliano Colla
giuliano.co...@fastwebnet.it wrote:
Both Win32 and Win64 generate the same compiler option(-WG)
In the same configuration page you should also pick up the right Target
CPU family: i386 as opposed to
On Mon, 22 Jun 2015 16:48:14 +0300, patspiper patspi...@gmail.com
wrote:
I assume the compiler you installed produces 64 bit executables by
default. The Win32 GUI (-GW) description in the IDE is not exact. As per
fpc help:
-WG: Specify graphic type application (EMX, OS/2, Windows)
Anyway, you
On 20/06/15 18:41, Bo Berglund wrote:
After thinking a while more I don't really understand the problem...
Why are there errors thrown for function calls originating inside the
obj file functions? If the functions inside the obj function are
calling Windows API functions, why should that be a
On 21/06/15 23:35, Bo Berglund wrote:
I added the -nr lines to my parameters file and re-ran the conversion.
Then moved the resulting coff file to the project dir and compiled:
Message pane shows:
Compile Project, Target: DongleTest.exe: Success
Seems like my dongle module is now compiled
On Sun, 21 Jun 2015 19:43:10 +0300, patspiper patspi...@gmail.com
wrote:
Add the following options to the objconv command line:
-nr:GetVersion:_$dll$kernel32$GetVersion
-nr:GetLastError:_$dll$kernel32$GetLastError
-nr:WriteFile:_$dll$kernel32$WriteFile
-nr:ReadFile:_$dll$kernel32$ReadFile
On Mon, 22 Jun 2015 00:02:40 +0300, patspiper patspi...@gmail.com
wrote:
On 21/06/15 23:35, Bo Berglund wrote:
I added the -nr lines to my parameters file and re-ran the conversion.
Then moved the resulting coff file to the project dir and compiled:
Message pane shows:
Compile Project,
On 19/06/15 22:44, Bo Berglund wrote:
The error message when compiling the source: DongleTest.lpr(22,1)
Error: Undefined symbol:
SPROMEPS_RNBOSPROFORMATPACKET$RB_SPRO_APIPACKET_PTR$WORD$$WORD In
SproMeps.pas: implementation FUNCTION RNBOsproFormatPacket( ApiPacket
: RB_SPRO_APIPACKET_PTR;
On 20/06/15 11:38, Bo Berglund wrote:
On Fri, 19 Jun 2015 23:01:36 +0200, Marc Weustink
m...@dommelstein.nl wrote:
Just guessing, I've no experience with this.
1) Use the converter tool to dump the exported function names from the original
.obj
2) look for an exported name which looks like
On Sat, 20 Jun 2015 12:51:35 +0300, patspiper patspi...@gmail.com
wrote:
On 20/06/15 11:38, Bo Berglund wrote:
On Fri, 19 Jun 2015 23:01:36 +0200, Marc Weustink
m...@dommelstein.nl wrote:
Thanks very much! This seems to be the way to go!
By creating a coff file from the obj file while
On Sat, 20 Jun 2015 13:49:00 +0300, patspiper patspi...@gmail.com
wrote:
Seems like I am almost there except this list of errors
These are used in SPROMEPS.OBJ.
I figured as much, problem is why that works in Delphi but not in
FPC/Lazarus? The special functions would of course need the
On Fri, 19 Jun 2015 23:01:36 +0200, Marc Weustink
m...@dommelstein.nl wrote:
Just guessing, I've no experience with this.
1) Use the converter tool to dump the exported function names from the
original .obj
2) look for an exported name which looks like RNBOsproFormatPacket
3) use the name
On 20/06/15 11:38, Bo Berglund wrote:
On Fri, 19 Jun 2015 23:01:36 +0200, Marc Weustink
m...@dommelstein.nl wrote:
Just guessing, I've no experience with this.
1) Use the converter tool to dump the exported function names from the original
.obj
2) look for an exported name which looks like
On 20/06/15 14:20, Bo Berglund wrote:
On Sat, 20 Jun 2015 12:51:35 +0300, patspiper patspi...@gmail.com
wrote:
On 20/06/15 11:38, Bo Berglund wrote:
On Fri, 19 Jun 2015 23:01:36 +0200, Marc Weustink
m...@dommelstein.nl wrote:
Thanks very much! This seems to be the way to go!
By creating a
On Sat, 20 Jun 2015 11:27:27 +0300, patspiper patspi...@gmail.com
wrote:
What's the output of objconv -dfhs SPROMEPS.coff?
In particular, check the mangled name of RNBOsproFormatPacket and list
it here.
See my reply to patspiper where I listed the main command and the
arguments file
--
Bo
On Sat, 20 Jun 2015 13:33:09 +0200, Bo Berglund
bo.bergl...@gmail.com wrote:
On Sat, 20 Jun 2015 13:49:00 +0300, patspiper patspi...@gmail.com
wrote:
Seems like I am almost there except this list of errors
These are used in SPROMEPS.OBJ.
I figured as much, problem is why that works in
On 20/06/15 18:41, Bo Berglund wrote:
On Sat, 20 Jun 2015 13:33:09 +0200, Bo Berglund
bo.bergl...@gmail.com wrote:
On Sat, 20 Jun 2015 13:49:00 +0300, patspiper patspi...@gmail.com
wrote:
Seems like I am almost there except this list of errors
These are used in SPROMEPS.OBJ.
I figured
On June 19, 2015 9:44:19 PM GMT+02:00, Bo Berglund bo.bergl...@gmail.com
wrote:
On Fri, 19 Jun 2015 09:42:35 -0700 (MST), leledumbo
leledumbo_c...@yahoo.co.id wrote:
The warning about the $F switch concerns a setting to force far
calls,
what is the equivalent in FPC?
José Mejuto wrote:
El 19/06/2015 a las 9:50, Bo Berglund escribió:
Now I am getting to the real hurdle as follows:
DongleTest.lpr(20,1) Error: Illegal COFF Magic while reading
SPROMEPS.OBJ
Hello,
Try this tool: http://www.agner.org/optimize/#objconv
Looks useful. Out of curiosity, how
El 19/06/15 a les 09:25, Bo Berglund ha escrit:
constructor TSentinel.Create;
begin
FTimer := TTimer.Create(Application);
FTimer.Enabled := false;
FTimer.Interval := 0;
FTimer.OnTimer := OnCheckTimer(Self); //= Error here
...
Why is this difference Delphi/FPC appearing and
El 19/06/15 a les 09:50, Bo Berglund ha escrit:
Now I am getting to the real hurdle as follows:
DongleTest.lpr(20,1) Error: Illegal COFF Magic while reading
SPROMEPS.OBJ
This caused by the following line in a suppurt file from SafeNet:
...
IMPLEMENTATION
USES
Windows;
{$L SPROMEPS.OBJ}
Bo Berglund wrote:
On Fri, 19 Jun 2015 12:35:28 +0200, Michael Schnell
mschn...@lumino.de wrote:
On 06/19/2015 12:28 PM, Bo Berglund wrote:
Safenet might be able to provide a GNU C version
of that file.
Except I got a reply from them that they cannot support older software
in FPC
So
El 19/06/2015 a las 9:50, Bo Berglund escribió:
Now I am getting to the real hurdle as follows:
DongleTest.lpr(20,1) Error: Illegal COFF Magic while reading
SPROMEPS.OBJ
Hello,
Try this tool: http://www.agner.org/optimize/#objconv
--
--
___
On Fri, 19 Jun 2015 12:35:28 +0200, Michael Schnell
mschn...@lumino.de wrote:
On 06/19/2015 12:28 PM, Bo Berglund wrote:
Safenet might be able to provide a GNU C version
of that file.
Except I got a reply from them that they cannot support older software
in FPC
So I guess I have to
On Fri, 19 Jun 2015 09:38:01 +0200, Luca Olivetti l...@wetron.es
wrote:
El 19/06/15 a les 09:25, Bo Berglund ha escrit:
constructor TSentinel.Create;
begin
FTimer := TTimer.Create(Application);
FTimer.Enabled := false;
FTimer.Interval := 0;
FTimer.OnTimer := OnCheckTimer(Self);
Bo Berglund wrote:
FTimer.OnTimer := @OnCheckTimer
See:
http://wiki.freepascal.org/Code_Conversion_Guide
Amazing! Minutes to get a good solution! What a difference from the
Embarcadero support forum! :)
The address symbol did the job!
It's worth noting that that's one of the few
On 06/19/2015 12:28 PM, Bo Berglund wrote:
Safenet might be able to provide a GNU C version
of that file.
Except I got a reply from them that they cannot support older software
in FPC
So I guess I have to go the Delphi DLL route instead...
That has nothing to do at all with FPC. FPC
I am trying to make a test program in Lazarus to evaluate if I can
port a dongle component in Delphi to a normal class in Lazarus.
So far I had no real problems but now I don't understand what I am
doing wrong. Relevant code below:
TSentinel = class
private
FTimer: TTimer;
...
On Fri, 19 Jun 2015 08:55:47 +, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
I think that takes you back to Michael's suggestion
If the obj file format is not GNU/FPC compatible and can't be used by
the linker in fpc, Safenet might be able to provide a GNU C version
of that
On 06/19/2015 09:50 AM, Bo Berglund wrote:
Now I am getting to the real hurdle as follows:
DongleTest.lpr(20,1) Error: Illegal COFF Magic while reading
SPROMEPS.OBJ
Googeling coff magic shows e.g. this:
http://wiki.osdev.org/COFF
-Michael
--
On Fri, 19 Jun 2015 16:01:09 +0200, José Mejuto joshy...@gmail.com
wrote:
El 19/06/2015 a las 9:50, Bo Berglund escribió:
Now I am getting to the real hurdle as follows:
DongleTest.lpr(20,1) Error: Illegal COFF Magic while reading
SPROMEPS.OBJ
Hello,
Try this tool:
-html/prog/progsu142.html#x173-1760006.2.3
--
View this message in context:
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Newbie-porting-class-to-FPC-but-get-procedure-assignment-error-tp4042730p4042768.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com
On Fri, 19 Jun 2015 09:42:35 -0700 (MST), leledumbo
leledumbo_c...@yahoo.co.id wrote:
The warning about the $F switch concerns a setting to force far calls,
what is the equivalent in FPC?
http://www.freepascal.org/docs-html/prog/progsu21.html
And I am not sure that COFF is the correct file
70 matches
Mail list logo