Solved

Registered Messages between processes

Posted on 2000-04-13
7
178 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 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