I think what needs to be done is run mkfifo to create a named pipe and then in the PowerBuilder app open the pipe, write commands to it and then close. A named pipe is handled with the same Win API functions as regular text file on disk. The difference is that it is actually in memory and when the player app reads a line, it disappears from the pipe. It is a FIFO stack basically.
I don't know if the PB built in functions can handle pipes, the Win API functions may be needed.
My FTP example has definitions of all the relevant API functions.