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.
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
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.
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
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
_
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
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
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