Rocket Terminal Emulator

 View Only

 Query session function (10) works incorrectly

Jump to Best Answer
Ilya Hadleuski's profile image
Ilya Hadleuski posted 05-10-2022 08:26
Hi, community. Now working on some application based on ehllapi and Passport Rocket emulator (a C# WPF application). And I am writing unit tests for this application. And one of my test is a test of Query Sessions function (function Id - 10).  And the result is the next: function result is 0 (SUCCESS), but byte array is empty and its length is 0. I use 16 bytes for a session. I want to query one session. I also used 12 bytes per session, but result the same. It seems like this function just doesn't work. Could anyone help me or give some instructions? I use Mainframe Display session
P.S. All other functions/ like Query Cursor Position or Find Field Position, work fine and all the tests are passed.
Ilya Hadleuski's profile image
Ilya Hadleuski Best Answer
I have found the reason. Your application, that uses EHLLAPI and Rocket should be started under the same rights (user or admin). Nevertheless, this function works incorrectly, because it should return the return code in this case
Mike Slater's profile image
ROCKETEER Mike Slater
Hi Ilya,

For Standard HLLAPI use 12 bytes for a session; and for Enhanced HLLAPI use 16 bytes. When querying max 24 sessions, on input the Length parameter should be 24 times the session size (288 or 384), and the byte array parameter needs to be at least this size. On return the byte array will contain session info of any actively running Passport sessions queried, and the Length parameter will be the count of sessions found. Does this help? If your input parameters were correct, do you have Passport sessions running?

Thanks,
Mike