473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

catching postmessage from 3rd party app - doesn't work if the app is started from the message receiver app

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
May 22 '06 #1
0 1153

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: James | last post by:
In my code I have a problem in abtaining a windows handle. I do not know the namespace to obtain the windows hanle. here is the code. using System; using System.Collections; using...
12
by: Wilfried Mestdagh | last post by:
Hi, Using P/Invoke I use PostMessage to send a message from one thread to another. I'm pretty sure this has already worked in dotnet. but I've upgraded version 2 few day ago. Now I have an...
17
by: Bonj | last post by:
Is PostQuitMessage(?) different to PostMessage(hWnd, WM_QUIT, ... ) ? I've got a window in a DLL (the same one experiencing the issue below, "return value of WM_QUIT") in which PostMessage(hWnd,...
6
by: SM | last post by:
Hello group, i'm converting a VB6 application for .NET Framework. The application depends on a DLL written in standard C. The C DLL code creates an invisible window with CreateWindow() with the...
2
by: Lenster | last post by:
When using PostMessage to post myself a message, the msg and wparam parameters somehow get swapped over. They are in the correct order when calling PostMessage but by the time wndproc handles the...
3
by: Max M. Power | last post by:
When I use the SendMessage API I can sucessfully send and receive a user defined message. When I use the PostMessage API I can NOT sucessfully send and receive the same user defined message. ...
2
by: sameer | last post by:
Encapsulating 3rd party controls to avoid backword incompatiblities Hi all, Environment : VB6\ VS2003\ VS2005, VB.NEt in Winforms, 3rd party component is a GRID from Sheridan & Devexpress...
10
by: Sergei | last post by:
Can anyone explain why PostMessage to a Windows Form is considered unsafe and raises InvalidOperationException? I can get rid of that setting CheckForIllegalCrossThreadCalls to false and...
21
by: one2001boy | last post by:
PostMessage() function returns ERROR_NOT_ENOUGH_QUOTA after running in a loop for 700 times, but the disk space and memory are still big enough. any suggestion to resolve this problem? thanks.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.