473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Intercepting Another Application's Events

I have been tasked with a project that I do not think can be accomplished.

Our company has an application that runs as an unmanaged ActiveX control on
user desktops. It is designed to work with our phone system.

When a phone call comes in, users can click a button on the ActiveX control
and begin recording.

My task is to fire off this recording, behind the scenes, without user
interaction, using the existing instance of the ActiveX control. The control
has an extensive API that I can use IF I were creating a separate
application, but basically I have to create an application that sits in the
system tray (ok), and have it behave as an event sink for this external
control (not ok).

There is other functionality I have to perform without user action, but if I
can at least manage this, I can work out the rest.

Personally, I dont think its possible. If it is, the only thing I can think
of is somehow accessing its process space and intercept its threads, but to
do what?

Any direction is GREATLY appreciated. Thank you to the community.


Nov 20 '05 #1
4 3924
> I have been tasked with a project that I do not think can be accomplished.

Pretty much everything is possible. Just desire to make it happen.
Our company has an application that runs as an unmanaged ActiveX control on user desktops. It is designed to work with our phone system.

When a phone call comes in, users can click a button on the ActiveX control and begin recording.

My task is to fire off this recording, behind the scenes, without user
interaction, using the existing instance of the ActiveX control. The control has an extensive API that I can use IF I were creating a separate
application, but basically I have to create an application that sits in the system tray (ok), and have it behave as an event sink for this external
control (not ok).

Don't understand the "If I were creating a separate application"... and
then immediatly followed by "I have to create an application."

And then you say API... well... it sounds like you have all the ingredients
you need to make this thing work.

there is also the win32 API and you could intercept messages to / from the
application...

There is other functionality I have to perform without user action, but if I can at least manage this, I can work out the rest.

Personally, I dont think its possible. If it is, the only thing I can think of is somehow accessing its process space and intercept its threads, but to do what?

Again... you have an API... so I don't quite understand what your problem
is...
Any direction is GREATLY appreciated. Thank you to the community.


Nov 20 '05 #2
CJ:

Thanks for the reply. Let me clarify the items you asked about.

" The control has an extensive API that I can use IF I were creating a
separate application.."
By this I mean if I were creating a separate winform that had the ActiveX
control dropped on it, I could use the ActiveX's API to access all the
events raised by it.

And here is where my question lies. Instead of doing the above, I need to do
what you describe later in your reply: Intercept messages and events as they
are raised in this external application and catch them in my system tray
application.

further research Ive done seems to point me to creating a "hook" DLL (this
is an example I found:
http://www.codeproject.com/dll/hooks...nts#xx748053xx)

but its written in C (which is OK I guess). Can I use VB.Net to intercept
the messages from the application? In this case, I would want to intercept
the event that is fired when a call comes in, so I could "force" the
application to record. Bear in mind that I dont want my system tray app to
record, I want it to cause the existing ActiveX control to fire its own
Record event... hope that clears it up.

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
I have been tasked with a project that I do not think can be accomplished.
Pretty much everything is possible. Just desire to make it happen.
Our company has an application that runs as an unmanaged ActiveX control

on
user desktops. It is designed to work with our phone system.

When a phone call comes in, users can click a button on the ActiveX

control
and begin recording.

My task is to fire off this recording, behind the scenes, without user
interaction, using the existing instance of the ActiveX control. The

control
has an extensive API that I can use IF I were creating a separate
application, but basically I have to create an application that sits in

the
system tray (ok), and have it behave as an event sink for this external
control (not ok).


Don't understand the "If I were creating a separate application"... and
then immediatly followed by "I have to create an application."

And then you say API... well... it sounds like you have all the

ingredients you need to make this thing work.

there is also the win32 API and you could intercept messages to / from the
application...

There is other functionality I have to perform without user action, but
if I
can at least manage this, I can work out the rest.

Personally, I dont think its possible. If it is, the only thing I can

think
of is somehow accessing its process space and intercept its threads, but

to
do what?


Again... you have an API... so I don't quite understand what your problem
is...
Any direction is GREATLY appreciated. Thank you to the community.



Nov 20 '05 #3
This is a good hook example of using the Win API, as I mentioned in my first
post for intercepting messages. But you have to know what messages your
looking for.

Second, you may want to check to see if the events contained in your active
x control are shared or not, becuase you can still drop an active x control
into a service, and if it has shared events (static whatever) then you're
job will be easy.

I think the hook example is a little extreme. And C is your only choice
because of the way it injects itself into the process. Managed doesn't have
this ability.
"Curious Coder" <ih***@noemail.com> wrote in message
news:Ow*************@TK2MSFTNGP10.phx.gbl...
CJ:

Thanks for the reply. Let me clarify the items you asked about.

" The control has an extensive API that I can use IF I were creating a
separate application.."
By this I mean if I were creating a separate winform that had the ActiveX
control dropped on it, I could use the ActiveX's API to access all the
events raised by it.

And here is where my question lies. Instead of doing the above, I need to do what you describe later in your reply: Intercept messages and events as they are raised in this external application and catch them in my system tray
application.

further research Ive done seems to point me to creating a "hook" DLL (this
is an example I found:
http://www.codeproject.com/dll/hooks...nts#xx748053xx)
but its written in C (which is OK I guess). Can I use VB.Net to intercept
the messages from the application? In this case, I would want to intercept
the event that is fired when a call comes in, so I could "force" the
application to record. Bear in mind that I dont want my system tray app to
record, I want it to cause the existing ActiveX control to fire its own
Record event... hope that clears it up.

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
I have been tasked with a project that I do not think can be accomplished.
Pretty much everything is possible. Just desire to make it happen.
Our company has an application that runs as an unmanaged ActiveX control
on
user desktops. It is designed to work with our phone system.

When a phone call comes in, users can click a button on the ActiveX

control
and begin recording.

My task is to fire off this recording, behind the scenes, without user
interaction, using the existing instance of the ActiveX control. The

control
has an extensive API that I can use IF I were creating a separate
application, but basically I have to create an application that sits
in the
system tray (ok), and have it behave as an event sink for this
external control (not ok).


Don't understand the "If I were creating a separate application"... and
then immediatly followed by "I have to create an application."

And then you say API... well... it sounds like you have all the

ingredients
you need to make this thing work.

there is also the win32 API and you could intercept messages to / from

the application...

There is other functionality I have to perform without user action,
but if
I
can at least manage this, I can work out the rest.

Personally, I dont think its possible. If it is, the only thing I can

think
of is somehow accessing its process space and intercept its threads,

but to
do what?


Again... you have an API... so I don't quite understand what your problem is...
Any direction is GREATLY appreciated. Thank you to the community.




Nov 20 '05 #4
Ok - I have come across this article in the MSDN that discusses intercepting
events using windows hooks:
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

Is it safe to say that I can use this approach, I just need to know the name
of the message that is being raised (like CJ suggested)?

"Curious Coder" <ih***@noemail.com> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
I have been tasked with a project that I do not think can be accomplished.

Our company has an application that runs as an unmanaged ActiveX control on user desktops. It is designed to work with our phone system.

When a phone call comes in, users can click a button on the ActiveX control and begin recording.

My task is to fire off this recording, behind the scenes, without user
interaction, using the existing instance of the ActiveX control. The control has an extensive API that I can use IF I were creating a separate
application, but basically I have to create an application that sits in the system tray (ok), and have it behave as an event sink for this external
control (not ok).

There is other functionality I have to perform without user action, but if I can at least manage this, I can work out the rest.

Personally, I dont think its possible. If it is, the only thing I can think of is somehow accessing its process space and intercept its threads, but to do what?

Any direction is GREATLY appreciated. Thank you to the community.


Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fenix | last post by:
I want intercept the call to a object method or object property . Its plausible ? Are there any event fired when i invoke a object method or property ?
6
by: Valery Polyakov | last post by:
I am drawing lines with a semi-transparent color (alpha=100). When these lines intercept, the color becomes more intense. Is there a way to avoid this, so that I would get the same intensity of...
0
by: hades5k | last post by:
Hi, I need to intercept mouse click events outside my applications. What I want to do is pretty simple. If I click on the Quick Launch toolbar an icon (let say IExplorer), I want to intercept the...
1
by: MCzajk | last post by:
Is there a way to intercept event, when user logs on/off to the system inside windows service? Thx for any tip, MCzajk
7
by: John | last post by:
Hi, Can anyone point me out how to intercept the keystrokes from a c# application that's not a active window? - intercepting the system wide keystrokes before it hits the target active window? ...
2
by: Steve McLellan | last post by:
Hi all, I'm trying to override Form events (for example OnClosing or OnClose) with the intention of preventing the base class function from happening. My functions are getting called but so are...
3
by: pamelafluente | last post by:
I am new to asp.net. I have an asp page with a submit button which sends out some information. Instead of having IIS to respond and deal with this information, I would like to have a .NET...
2
by: bryan rasmussen | last post by:
Hi, I've been looking at autohotkey to do some different usability hacks for windows http://www.autohotkey.com/ one of the benefits of this language is it allows one to catch keyboard usage,...
0
by: Gabriel Genellina | last post by:
En Thu, 18 Sep 2008 19:24:26 -0300, Robert Dailey <rcdailey@gmail.com> escribió: Why don't you try it yourself? You may replace builtins.print with your own function too. It's not exactly the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.