Solved

Registered Messages between processes

Posted on 2000-04-13
7
181 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
unable to delete all specified values regedit 38 575
maven archtype selection in eclipse 1 57
Hibernate methods 2 77
centeredAverage challenge 8 180
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 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