Re: [fpc-pascal] getaddrinfo

2015-03-28 Thread MegaBrutal
Hi, Can anyone help me with this? 2015-03-20 4:14 GMT+01:00 MegaBrutal : > > Hi all, > > I'm working on an cross-platform application with DNS resolution with > IPv6 support, but I can't really get around how should I handle IP > version independent DNS resolution.

[fpc-pascal] getaddrinfo

2015-03-19 Thread MegaBrutal
IP version independent network handling with Free Pascal, I'm all ears! ~MegaBrutal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Invalid standard handles in Windows service mode?

2014-02-21 Thread MegaBrutal
2014-02-21 10:18 GMT+01:00 Michael Van Canneyt : > You can check the handle of the StdOutputHandle variable. if it is invalid > (-1), you don't have output. > Thanks for your reply, it helped a lot! StdOutputHandle is 24 when I start the program on the console, and 0 when it starts as a service.

[fpc-pascal] Invalid standard handles in Windows service mode?

2014-02-20 Thread MegaBrutal
know the background of this issue. Along the way, maybe I find a better way to check for service mode. Anyway, how can I check if I have a valid stdout handle before actually trying to write to it? MegaBrutal ___ fpc-pascal maillist - fpc-pascal@lis

[fpc-pascal] SocketError 183

2012-12-23 Thread MegaBrutal
operation? Actually, I call fpRecv and then try to verify if it was successful by examining socketerror. - Is socketerror thread-safe? My application is multi-threaded - maybe it reads the result of another thread's socket operation. Greetings, MegaBrutal _

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

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

2010-11-10 Thread MegaBrutal
WinAPI call, CreateFile. In this case, my unit wouldn't be cross-platform anymore. However, now I'm writing my program for Windows, I'm considering porting it to Linux someday, thus I'd like to avoid platform-specific calls wherever possible. I think option 2 is the most prefe

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