Solved

Registered Messages between processes

Posted on 2000-04-13
7
173 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:greg_roberts
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Would you have a code example
of code reading registered messages ?

Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 52
sumNumber challenge 16 98
haveThree challenge 22 100
wordappend challenge 8 84
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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