-
Notifications
You must be signed in to change notification settings - Fork 259
Open
Description
Hey! Thank you for your plugin!
I have a question about writing to pipe and getting output from programm.
I read the data from the "readPipe" without any problems. But when I try to send data something through "writePipe", I get the same in the response in "readPipe" instead of the real output from the programm.
I created a new function "WriteToPipe" using the example of other code
bool UExecutableProcessPipe::CreatePipe()
{
if(PipeIsValid())
{
//Ignore repeat creates without a close inbetween <3 Rama
return true;
}
return FPlatformProcess::CreatePipe( ReadPipe, WritePipe);
}
void UExecutableProcessPipe::ClosePipe()
{
if(PipeIsValid())
{
FPlatformProcess::ClosePipe(ReadPipe, WritePipe);
ReadPipe = nullptr;
WritePipe = nullptr;
}
}
bool UExecutableProcessPipe::ReadFromPipe(FString& PipeContents)
{
PipeContents = "";
if(!PipeIsValid())
{
return false;
}
PipeContents = FPlatformProcess::ReadPipe(ReadPipe);
return true;
}
bool UExecutableProcessPipe::WriteToPipe(FString InputString)
{
if(PipeIsValid())
{
return FPlatformProcess::WritePipe(WritePipe, InputString);
}
return false;
}
Metadata
Metadata
Assignees
Labels
No labels