473,226 Members | 1,542 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,226 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 3915
> 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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.