Solved

Registered Messages between processes

Posted on 2000-04-13
7
176 Views
Last Modified: 2013-11-20
I have a TV card with remote control.
I have established it uses a seperate program to send through
the key presses on the remote control.

A Spy++ on the main TV program showed

0000018C P message:0xCD8C [Registered:"FlyVideo - Remote Message"]
wParam:00000002 lParam:00000000
0000018C P message:0xCD8C [Registered:"FlyVideo - Remote Message"]
wParam:00000017 lParam:00000000
0000018C P message:0xCD8C [Registered:"FlyVideo - Remote Message"]
wParam:00000002 lParam:00000000

(wParam is a bit mask of the remote keys)

(this was sent by the remote monitor exe, interestingly
a Spy on this showed nothing coming from it ?)

>> What i want to do is write my own application to run
when the TV program is NOT running, to use the remote
to skip music tracks etc.

>> What do i need to do to make the remote monitor think
i am the correct application running ?
>> How do i gain access to the messages ?
>> Does anyone have an example of process A talking to process B
in this way i can use to gain knowledge ?

Thanks in advance

0
Comment
Question by:greg_roberts
7 Comments
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2714941
should just be able to send the registered message (as you know its name) to the other process. the only trick is getting the window for the application that you want to send the message to.
0
 

Author Comment

by:greg_roberts
ID: 2715011
Thanks but you have not given me any detail. I am a notice (but experienced
embedded programmer) windows programmer.
0
 
LVL 1

Expert Comment

by:MT_MU
ID: 2723695
You will need to use a function such as FindWindow() or EnumWindows() to find the "top" level window, then use SendMessage() to send the message.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:greg_roberts
ID: 2724518
Thanks MT_MU

But your commenst seem to be with
respect to the sender of the message.
IN my case the sender exists,
i want to be a new receiver of the
message ?

0
 
LVL 1

Expert Comment

by:MT_MU
ID: 2724573
Yep - I misread your message.

My guess - and it's only a guess...

The remote application is using some method to determine the window of the TV application in order to send these messages.  Your program would have to implement enough of the TV's characteristics in order for the remote to "find" your window.

Sorry I couldn't be of any more help.



0
 

Accepted Solution

by:
simmvar earned 50 total points
ID: 2743274
Sending messages from one application to another application can be done only when both the programs agree upon a common message which is registered using RegisterWindowsMessage() which returns an integer.  This is the message which will be propagated to all windows or particular windows by using SendMessage() or PostMessage() with either the HWND parameter obtained by FindWindow() or HWND_BROADCAST which is sent to all windows.
However it is not possible to send messages to all windows which are not mutually agreed and the message is not handled for eg. u cannot PostMessage(HWND, WM_QUIT....) to any HWND even if u send it u may not be able to process it.
Your TV program and the remote program may have agreed upon such message which is handled.  RegisterWindowsMessage() accepts a unique string which is common to both the application.  By any means if u r able to find out that common string (using any hex editor or disassembly) then u can also use the same technique in u r program but u should make sure that u r main window has the same name/title as that of the TV program window.

I think this should solve u r problem

simmvar
0
 

Author Comment

by:greg_roberts
ID: 2743327
Would you have a code example
of code reading registered messages ?

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 89
Separate files macro - Errors on larger data set 18 65
zeroMAx challenge 20 87
x-bar in Google Sheets 2 26
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now