?
Solved

Registered Messages between processes

Posted on 2000-04-13
7
Medium Priority
?
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 150 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

770 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