rafael.vieira Posted April 15, 2014 Share Posted April 15, 2014 Hi everyone, Does anyone use named pipes in a uniGui Web Project? In specifically Russel Libby? I've tried to use (example below) but i didn't have success. private FServer : TPipeServer; FClient1 : TPipeClient; procedure OnClientPipeMessage(Sender : TObject; Pipe : NativeUInt; Stream : TStream); procedure OnServerPipeMessage(Sender : TObject; Pipe : NativeUInt; Stream : TStream); procedure TUniFrame1.UniFrameCreate(Sender: TObject); begin FServer := TPipeServer.Create(self); FServer.PipeName := 'test'; FServer.Active := True; FServer.OnPipeMessage := OnServerPipeMessage; FClient1 := TPipeClient.Create(self); FClient1.PipeName := 'test'; FClient1.OnPipeMessage := OnClientPipeMessage; if not FClient1.Connect then uniMemo1.Lines.Add('Not connected'); end; procedure TUniFrame1.OnServerPipeMessage(Sender: TObject; Pipe: NativeUInt; Stream: TStream); var S : String; begin SetLength(S, Stream.Size); Stream.Read(S[1], Length(S)); uniMemo1.Lines.Add(S); end; procedure TUniFrame1.UniButton1Click(Sender: TObject); var S : String; begin S := uniEdit1.Text; if Length(S) > 0 then FServer.Write(FServer.Clients[0], S[1], Length(S)); end; procedure TUniFrame1.UniButton1Click(Sender: TObject); var S : String; begin S := uniEdit1.Text; if Length(S) > 0 then FServer.Write(FServer.Clients[0], S[1], Length(S)); end; procedure TUniFrame1.UniButton2Click(Sender: TObject); var S : String; begin S := uniEdit2.Text; if Length(S) > 0 then FClient1.Write(S[1], Length(S)); end; Ps: The unit Pipes is attached. Pipes.rar My uniGui version: 0.93.0.996 Link to comment Share on other sites More sharing options...
rafael.vieira Posted May 7, 2014 Author Share Posted May 7, 2014 Anyone? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 7, 2014 Administrators Share Posted May 7, 2014 uniGUI does not implement a message loop. As a result, components which rely on Windows messages to work will not work in uniGUI. Link to comment Share on other sites More sharing options...
rafael.vieira Posted May 8, 2014 Author Share Posted May 8, 2014 Ok, Thanks Farshad. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now