There are several possibilities for 'getting between'.
In the end, you will end up providing an interface to the program that must act as it expects the 'LPT' to act.
To better understand the problem:
Does the program think that a printer is attached to the LPT or is it some other device?
What Operating System does the program run under?
Does the program have any configuration to select the LPT or printer?
I doubt this is an option, but is it possible for you to modify and re-build the program?
The source code you included appears to be for Windows. Almost all Windows applications allow you to select the printer to print to.
The stream of bytes that Windows sends to the printer very rarely reflects the characters that are being printed. For example, if you put "Hello, World" in notepad and print it, the resulting byte stream to the printer will far exceed the 12 characters you typed.
Are you trying to catch the byte-stream or the characters?