[fpc-pascal] File Descriptor in Windows ?
fredvs
fiens at hotmail.com
Sat Mar 21 20:47:58 CET 2015
Hello.
Added Pipes in uses section.
Changed => AssignPipe(InHandle, FOutHandle);
Into => CreatePipeHandles (InHandle, FOutHandle, PipeBufferSize);
Then in code =>
var
Http: TFPHTTPClient;
Output: THandleStream = nil;
URL: String;
begin
Http := TFPHTTPClient.Create(nil);
Output := THandleStream.Create(FOutHandle);
URL := FWantedURL;
Http.RequestHeaders.Clear;
Http.Get(URL, Output);
=> Perfect for Linux, compiles + web procedure runs perfectly (like using
fpPipe).
In Windows, same code compiles ok but when trying to run the web procedure,
Program gives that error =>
> An unespected error occurred
> File not open
? ;-(
Fre;D
-----
Many thanks ;-)
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/File-Descriptor-in-Windows-tp5721448p5721451.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list