Hi
I'm trying to automate Nortel's VPN Client. Unlike their competitors, the
Nortel client doesn't output the results of a connection attempt to the
commandline, but instead uses PostMessage commands to send the connection
status back. When you launch the client, you can tell it to which hwnd the
message should be sent, and which message number should be used.
I write a simple windows form app that catches the message in question, then
launched the client giving it the hwnd of my forms app. As expected, it
worked (except that Nortel apparently didn't think of the scenario when the
connection is to be initiated with nobody in front of it.. so they don't
return the "not connected" message but just indicate the failure via popup
and only when you click on it will the postmessage being sent.. rather
useless really :(.
Anyway, then I added code to start the VPN Client from within my forms app.
It starts and connects just fine, but the darned postmessage does no longer
arrive in my app. If I keep the app running, disconnect and start the VPN
client manually again with the proper hwnd, then I do get the message.
So bottom line:
start the app sending the message from my forms app: no message received
starting the app sending the message manually: message received as expected
I'm wondering, does anybody have an idea why that is? FYI I have added a
messagefilter that catches every message to make sure I'm not losing
anything.. and yet I seem to be losing something. Unfortunately, being a
time sensitive scenario, I can't use spy++ to check if the vpn client really
sends the message in the scenario.. the time between the client is launched
from my app and the connection / failure message is too little to find the
proper window in spy++ and access its messages.
Regards
Stephan