You really need two adapters for a text application.
A Windows Application that launches Microfocus Reflection and opens the proper session file that you have configured to use a specific ShortSessionName (usually A).
A Text Application using the Generic WINHLLAPI adapter where you define the ShortSessionName from the session file.
Start the Windows adapter and wait for the session to load. Then start the Text adapter which will find the already running session. I am not sure why you are getting an error, but perhaps, you have something configured incorrectly.