QuickFix
05-26-2005, 12:56 PM
Ok here is my dilemma, hope you can help or at least point me in the right direction.
I wrote a wrapper program that takes the place of the exe for my file type (*.WS). My exe opens a 3270 telnet session using the shell command. I use returned shell information to get the PID and in tern find out the hWnd of this new task (but I do not currently use this info in my program). Then I use hllapi to connect to the terminal session and scrape screen data. The program works like a charm.. except for one glitch.
The program is initiated by clicking on a valid .ws file and for every .ws file clicked an instance of my program is opened. If for some reason there are more than one .ws file to be opened and they are opened in a quick manner, such as highlighting 2 or more then right clicking on one and choosing open, my program does not always retrieve the 3270 screen data from the session that it opened. Fir instance…
This is the way it is supposed to work when multiple .ws files are opened simultaneously:
Myprogram1 --> opens 3270 task1 --> Myprogram1 gets info from task1.
Myprogram2 --> opens 3270 task2 --> Myprogram2 gets info from task2.
Myprogram3 --> opens 3270 task3 --> Myprogram3 gets info from task3.
But this is how it is working now:
Myprogram1 --> opens 3270 task1 --> Myprogram1 gets info from task3.
Myprogram2 --> opens 3270 task2 --> Myprogram2 gets info from task2.
Myprogram3 --> opens 3270 task3 --> Myprogram3 gets info from task1.
Note: this order is not always the case, it appears that the task that my program receives data from is random in nature.
So here is my big question:
Is there a way for me to use the PID or hWnd, or any other way for that matter to make sure that my program gets screen data from the 3270 task “IT” initiates.
Don’t forget that I am using Hllapi to connect and scrape the screen of an IBM Personal Communications 3270 telnet session.
Please help, my whole department is waiting for me to finish this crap.
I wrote a wrapper program that takes the place of the exe for my file type (*.WS). My exe opens a 3270 telnet session using the shell command. I use returned shell information to get the PID and in tern find out the hWnd of this new task (but I do not currently use this info in my program). Then I use hllapi to connect to the terminal session and scrape screen data. The program works like a charm.. except for one glitch.
The program is initiated by clicking on a valid .ws file and for every .ws file clicked an instance of my program is opened. If for some reason there are more than one .ws file to be opened and they are opened in a quick manner, such as highlighting 2 or more then right clicking on one and choosing open, my program does not always retrieve the 3270 screen data from the session that it opened. Fir instance…
This is the way it is supposed to work when multiple .ws files are opened simultaneously:
Myprogram1 --> opens 3270 task1 --> Myprogram1 gets info from task1.
Myprogram2 --> opens 3270 task2 --> Myprogram2 gets info from task2.
Myprogram3 --> opens 3270 task3 --> Myprogram3 gets info from task3.
But this is how it is working now:
Myprogram1 --> opens 3270 task1 --> Myprogram1 gets info from task3.
Myprogram2 --> opens 3270 task2 --> Myprogram2 gets info from task2.
Myprogram3 --> opens 3270 task3 --> Myprogram3 gets info from task1.
Note: this order is not always the case, it appears that the task that my program receives data from is random in nature.
So here is my big question:
Is there a way for me to use the PID or hWnd, or any other way for that matter to make sure that my program gets screen data from the 3270 task “IT” initiates.
Don’t forget that I am using Hllapi to connect and scrape the screen of an IBM Personal Communications 3270 telnet session.
Please help, my whole department is waiting for me to finish this crap.