[fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
Hello. I have a external dll. In Windows i can access perfectly the procedures with GetProcAddress() if i use Windows unit. If i use DynLibs unit, prog crash when i try to load the procedure. I prefer to use DynLibs unit because i want to use the dll for Linux too (of course with library.so).

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Michael Van Canneyt
On Mon, 13 Jan 2014, Fred van Stappen wrote: Hello. I have a external dll. In Windows i can access perfectly the procedures with GetProcAddress() if i use Windows unit. If i use DynLibs unit, prog crash when i try to load the procedure. I prefer to use DynLibs unit because i want to use the

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Tomas Hajny
On Mon, January 13, 2014 11:47, Fred van Stappen wrote: Hello. I have a external dll. In Windows i can access perfectly the procedures with GetProcAddress() if i use Windows unit. If i use DynLibs unit, prog crash when i try to load the procedure. I prefer to use DynLibs unit because i

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
Date: Mon, 13 Jan 2014 11:58:21 +0100 From: mich...@freepascal.org To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() On Mon, 13 Jan 2014, Fred van Stappen wrote: Hello. I have a external dll. In Windows i can

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Michael Van Canneyt
On Mon, 13 Jan 2014, Fred van Stappen wrote: Here part of NOT working code (if i call soundtouch_createInstance, it crash) ... uses   dynlibs ; ... var soundtouch_createInstance : function() : THandle; stdcall;  ... procedure InitLib(LibFile : PAnsiChar); begin

Re: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault

2014-01-13 Thread Michael Ring
I had a look at armv6m yesterday evening, parts of my code run fine in gdb, the code crashes in the init of a procedure when trying to prepare the access to contents of a set. The address of the set seems to get calculated totally wrong ending up in a memory access at the end of the chip's

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
Date: Mon, 13 Jan 2014 12:07:54 +0100 From: xhaj...@hajny.biz To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() On Mon, January 13, 2014 11:47, Fred van Stappen wrote: Hello. I have a external dll. In Windows i can

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Mark Morgan Lloyd
Tomas Hajny wrote: On Mon, January 13, 2014 11:47, Fred van Stappen wrote: Hello. I have a external dll. In Windows i can access perfectly the procedures with GetProcAddress() if i use Windows unit. If i use DynLibs unit, prog crash when i try to load the procedure. I prefer to use DynLibs

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
Date: Mon, 13 Jan 2014 12:32:53 +0100 From: mich...@freepascal.org To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() On Mon, 13 Jan 2014, Fred van Stappen wrote: Here part of NOT working code (if i call

[fpc-pascal] Does TBufDataSet support Blob or memo field?

2014-01-13 Thread Dennis Poon
I created a TMemoField in TBufDataSet but no matter I do: 1) Field.asString := 'some value' or 2) Field.LoadFromStream(someStream). Afterwards, this F.AsString always returns '' and F.LoadFromStream(someStream) always has a 0 BlobSize afterwards. Anyone has similar experience? Dennis

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Michael Van Canneyt
On Mon, 13 Jan 2014, Fred van Stappen wrote: Date: Mon, 13 Jan 2014 12:32:53 +0100 From: mich...@freepascal.org To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() On Mon, 13 Jan 2014, Fred van Stappen wrote: Here part of

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
On Mon, 13 Jan 2014, Fred van Stappen wrote: Date: Mon, 13 Jan 2014 12:32:53 +0100 From: mich...@freepascal.org To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() On Mon, 13 Jan 2014, Fred van Stappen wrote: Here

Re: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault

2014-01-13 Thread Reinier Olislagers
On 13/01/2014 12:34, Michael Ring wrote: I had a look at armv6m yesterday evening, parts of my code run fine in gdb, the code crashes in the init of a procedure when trying to prepare the access to contents of a set. The address of the set seems to get calculated totally wrong ending up in a

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Michael Van Canneyt
On Mon, 13 Jan 2014, Fred van Stappen wrote: begin LibHandle:=DynLibs.LoadLibrary(libfilename);   if LibHandle DynLibs.NilHandle then         Pointer(soundtouch_createInstance)    := DynLibs.GetProcedureAddress(LibHandle, PAnsiChar('soundtouch_createInstance ')); Remove the

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
On Mon, 13 Jan 2014, Fred van Stappen wrote: begin LibHandle:=DynLibs.LoadLibrary(libfilename); if LibHandle DynLibs.NilHandle then Pointer(soundtouch_createInstance):= DynLibs.GetProcedureAddress(LibHandle, PAnsiChar('soundtouch_createInstance '));

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Michael Van Canneyt
On Mon, 13 Jan 2014, Fred van Stappen wrote: On Mon, 13 Jan 2014, Fred van Stappen wrote: begin LibHandle:=DynLibs.LoadLibrary(libfilename);   if LibHandle DynLibs.NilHandle then         Pointer(soundtouch_createInstance)    := DynLibs.GetProcedureAddress(LibHandle,

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Lukasz Sokol
Hi, 'scue me if I did not catch something, but On 13/01/14 12:13, Fred van Stappen wrote: [...] procedure InitLib(LibFile : PAnsiChar); begin LibHandle:=DynLibs.LoadLibrary(libfilename); if LibHandle DynLibs.NilHandle then Pointer(soundtouch_createInstance):=

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
On Mon, 13 Jan 2014, Fred van Stappen wrote: On Mon, 13 Jan 2014, Fred van Stappen wrote: begin LibHandle:=DynLibs.LoadLibrary(libfilename); if LibHandle DynLibs.NilHandle then Pointer(soundtouch_createInstance):=

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
To: fpc-pascal@lists.freepascal.org From: el.es...@gmail.com Date: Mon, 13 Jan 2014 12:52:51 + Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() Hi, 'scue me if I did not catch something, but On 13/01/14 12:13, Fred van Stappen wrote: [...]

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
To: fpc-pascal@lists.freepascal.org From: el.es...@gmail.com Date: Mon, 13 Jan 2014 12:52:51 + Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() Hi, 'scue me if I did not catch something, but On 13/01/14 12:13, Fred van Stappen wrote: [...]

Re: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault

2014-01-13 Thread Jeppe Græsdal Johansen
Might be related to the mla/mls optimization which somehow has been enabled even though it's still broken - Reply message - Fra: Reinier Olislagers reinierolislag...@gmail.com Dato: man., jan. 13, 2014 13:44 Emne: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives

Re: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault

2014-01-13 Thread Michael Ring
I guess not, when I remember correctly this has already been repaired for armv6m. The problem for me is that .Lj9 is defined as a negative number. As a consequence r13 points to nirvana and str r0,[r13, #8] creates an Exception. # [87] begin push{r4,r14} ldr

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Lukasz Sokol
On 13/01/14 13:36, Fred van Stappen wrote: [...] Hello Lucaz /// why not just : @soundtouch_createInstance := DynLibs.GetProcedureAddress(LibHandle, PAnsiChar('soundtouch_createInstance')); Get that error : libSoundTouch.pas(56,5) Error: Can't assign values to an address This

Re: [fpc-pascal] Does TBufDataSet support Blob or memo field?

2014-01-13 Thread Dennis Poon
All the other usual types (e.g. integer, string, datetime) work except ftMemo and ftblob. Yes, I have used POST Dennis LacaK wrote: AFAIR this is so. (we can call it bug ;-)) Data are not there until you Post record. After Post you will see data there, right? -Laco.

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
From: fi...@hotmail.com To: fpc-pascal@lists.freepascal.org Date: Mon, 13 Jan 2014 17:33:47 +0100 Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() Hello and many thanks to help. Here demo to show the problem (i hope).

Re: [fpc-pascal] Does TBufDataSet support Blob or memo field?

2014-01-13 Thread LacaK
All the other usual types (e.g. integer, string, datetime) work Yes it is expected behaviorexcept ftMemo and ftblob. Yes it is not consistent and from my POV it is bug.I will look (next week or two) if it can be fixed, but I have doubts, that it will not be so easy

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Ewald
On 13 Jan 2014, at 17:33, Fred van Stappen wrote: Hello and many thanks to help. Here demo to show the problem (i hope). https://sites.google.com/site/fiensprototyping/dynlib_vs_windows.zip in the dynlibs version, why do you use `PChar(1)` or `PChar(2)` [or ] instead of the name

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Fred van Stappen
From: ew...@yellowcouch.org Date: Mon, 13 Jan 2014 21:25:27 +0100 To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress() On 13 Jan 2014, at 17:33, Fred van Stappen wrote:Hello and many thanks to help. Here demo to show the problem (i

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Ewald
On 13 Jan 2014, at 23:06, Fred van Stappen wrote: The SoundTouch.dll uses index to call the procedures. Like that : [Ordinal/Name Pointer] [ 0] soundtouch_clear [ 1] soundtouch_createInstance [ 2] soundtouch_destroyInstance That explains why it works in windows

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread waldo kitty
fred, can you please adjust your quoting to use the standard '' for previous responses and then add your response below? you do add your response below but the quote is the exact of the previous and it is very hard to read only your responses when the previous is not prefixed by ''... thanks!

Re: [fpc-pascal] Profiling ARM targets

2014-01-13 Thread Bruce Tulloch
Thanks, I will give them a go. -b On Fri, Jan 10, 2014 at 10:36 PM, Jonas Maebe jonas.ma...@elis.ugent.bewrote: On 10 Jan 2014, at 01:13, Bruce Tulloch wrote: What is the recommended way to profile FPC applications run on ARM targets Callgrind and cachegrind (both part of Valgrind) are