[fpc-pascal] How to use ExtTextOut with Printer.Canvas.Handle on Gtk2

2010-11-10 Thread Fred Flinestone
Hello all, When I use ExtTextOut with Printer.Canvas.Handle then function ends because of not valid DC and nothing is written to Canvas. I know that there os TextOut which works, but I need to use TextOut with definition of character positions. How can I create device context to get ExtTextOut wo

Re: [fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-10 Thread Sven Barth
On 10.11.2010 14:32, Jonas Maebe wrote: On 10 Nov 2010, at 14:13, MegaBrutal wrote: I should have noted this, but my "LockFile" is not a global variable. It's a field of my object. So each object instance has its own "LockFile", and threads create their own instance of the object. However, the

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-11-10 Thread Reimar Grabowski
On Sat, 6 Nov 2010 23:43:58 +0100 Felipe Monteiro de Carvalho wrote: > Here is a tutorial: > > http://gimite.net/en/index.php?Run%20native%20executable%20in%20Android%20App > > It just uses standard Android Java API calls AFAIK Thanks for the tutorial, but as you surely have read (see comments)

Re[2]: [fpc-pascal] Unable to compile JSON SuperObject on FPC 2.5.1

2010-11-10 Thread Michael Van Canneyt
On Wed, 10 Nov 2010, José Mejuto wrote: Hello FPC-Pascal, Wednesday, November 10, 2010, 11:57:52 AM, you wrote: function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; MVC> The declaration of the IUnknown has been changed on non-windows platforms MVC> to be XP-COM

Re[2]: [fpc-pascal] Unable to compile JSON SuperObject on FPC 2.5.1

2010-11-10 Thread José Mejuto
Hello FPC-Pascal, Wednesday, November 10, 2010, 11:57:52 AM, you wrote: >>function QueryInterface(const IID: TGUID; out Obj): HResult; >> virtual; stdcall; MVC> The declaration of the IUnknown has been changed on non-windows platforms MVC> to be XP-COM compatible. You can copy the new definit

Re: [fpc-pascal] Unable to compile JSON SuperObject on FPC 2.5.1

2010-11-10 Thread Michael Van Canneyt
On Wed, 10 Nov 2010, Fred Flinestone wrote: Hello all, I am not able to compile JSON – SuperObject where compiler says this: .../superobject.pas(135,18) Error: No matching implementation for interface method "IUnknown.QueryInterface(constref TGuid,out ):LongInt; CDecl;" found .../superobject

Re: [fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-10 Thread Jonas Maebe
On 10 Nov 2010, at 14:13, MegaBrutal wrote: I should have noted this, but my "LockFile" is not a global variable. It's a field of my object. So each object instance has its own "LockFile", and threads create their own instance of the object. However, they try to open the same file on the file s

Re: [fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-10 Thread MegaBrutal
2010/11/10 Jonas Maebe : > The problem is that calling rewrite on an already opened file works fine (at > least on Unix platforms). This program runs fine on Mac OS X and Linux: > > var >  f: file; > begin > {$i+} >  assign(f, 'test.txt'); >  rewrite(f); >  rewrite(f); > end. > > That's why I sugge

Re: [fpc-pascal] Win CE

2010-11-10 Thread Fantomas
Hello, Uffe! > When developing for WinCE, is it possible to compile for DLL's or COM > objects? You can compile your DLLs as easy as you do under Win32. As for COM-objects, it depends on your task. In general, WinCE supports COM. But firmware of your target device may implement one of several lev

Re: [fpc-pascal] Unable to compile JSON SuperObject on FPC 2.5.1

2010-11-10 Thread Fred Flinestone
Thanks. On Wed, Nov 10, 2010 at 11:56 AM, Jonas Maebe wrote: > > On 10 Nov 2010, at 11:48, Fred Flinestone wrote: > >> not it stopped to write the error for _AddRef and _Release, but to >> QueryInterface is still the same error present. >> >> What could be a solution? > > http://wiki.freepascal.o

Re: [fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-10 Thread Jonas Maebe
On 10 Nov 2010, at 13:48, MegaBrutal wrote: Well, my object should keep the lockfile opened as long as it's working. If the file has already existed, but Rewrite is able to lock it, that means that my application was shut down improperly. But it's not a problem. Actually, the operating system s

[fpc-pascal] Unable to compile JSON SuperObject on FPC 2.5.1

2010-11-10 Thread Fred Flinestone
Hello all, I am not able to compile JSON – SuperObject where compiler says this: .../superobject.pas(135,18) Error: No matching implementation for interface method "IUnknown.QueryInterface(constref TGuid,out ):LongInt; CDecl;" found .../superobject.pas(135,18) Error: No matching implementation fo

[fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-10 Thread MegaBrutal
Hello, I'm new on the list. I have a problem. I've been trying to make my application thread-safe by using lockfiles. I used System.Rewrite to lock the file, and System.IOResult to check the result. But I've encountered problems, and such problems are most likely occur, when more than one thread's

Re: [fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-10 Thread MegaBrutal
2010/11/10 Jonas Maebe : >> Not a big >> deal, though, I may use an other function to lock the file in a >> thread-safe manner. >> >> This is my function (that tries to lock the file): >> >> function TSpoolObjectReader.Open: boolean; >> begin >>  {$I-} Rewrite(LockFile, 1); {$I+} > > Rewrite does n

[fpc-pascal] Re: Win CE

2010-11-10 Thread Uffe Kousgaard
"Felipe Monteiro de Carvalho" wrote in message > > Your frase isn't very clear, so you want to use a COM object or you > want to implement one? Implement. It should be used from VBscript in another application. ___ fpc-pascal maillist - fpc-pasca

Re: [fpc-pascal] Re: Win CE

2010-11-10 Thread Felipe Monteiro de Carvalho
On Wed, Nov 10, 2010 at 10:00 AM, Uffe Kousgaard wrote: > Implement. It should be used from VBscript in another application. As already said, I don't use COM, but I found this in the forum: http://www.lazarus.freepascal.org/index.php/topic,10938.msg55198/topicseen.html#new If you manage to make

Re: [fpc-pascal] Unable to compile JSON SuperObject on FPC 2.5.1

2010-11-10 Thread Jonas Maebe
On 10 Nov 2010, at 11:48, Fred Flinestone wrote: not it stopped to write the error for _AddRef and _Release, but to QueryInterface is still the same error present. What could be a solution? http://wiki.freepascal.org/User_Changes_Trunk#IInterface.QueryInterface.2C_._AddRef_and_._Release_defi

Re: [fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-10 Thread Jonas Maebe
On 10 Nov 2010, at 13:26, MegaBrutal wrote: I'm new on the list. I have a problem. I've been trying to make my application thread-safe by using lockfiles. I used System.Rewrite to lock the file, and System.IOResult to check the result. But I've encountered problems, and such problems are most l

Re: [fpc-pascal] Win CE

2010-11-10 Thread Felipe Monteiro de Carvalho
On Wed, Nov 10, 2010 at 9:13 AM, Uffe Kousgaard wrote: > When developing for WinCE, is it possible to compile for DLL's or COM > objects? Your frase isn't very clear, so you want to use a COM object or you want to implement one? Using COM objects should work nearly the same as in Win32, but peop

Re: [fpc-pascal] Win CE

2010-11-10 Thread Sven Barth
Am 10.11.2010 09:13, schrieb Uffe Kousgaard: When developing for WinCE, is it possible to compile for DLL's or COM objects? I don't even know if COM objects exist on WinCE, so sorry if that part of the question makes little sense - still trying to get an overview of available "glue" technology o

[fpc-pascal] Win CE

2010-11-10 Thread Uffe Kousgaard
When developing for WinCE, is it possible to compile for DLL's or COM objects? I don't even know if COM objects exist on WinCE, so sorry if that part of the question makes little sense - still trying to get an overview of available "glue" technology on that platform.