473,779 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3958
> 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****@blowgoa ts.com> wrote in message
news:10******** *****@corp.supe rnews.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******** *****@TK2MSFTNG P10.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****@blowgoa ts.com> wrote in message
news:10******** *****@corp.supe rnews.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******** ******@TK2MSFTN GP10.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
1370
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
1802
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 color? Thanks a lot.
0
1610
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 click event to have IExplorer executed by my application (in my MDI Childs). It is possible? Thx for your help! Christopher
1
7671
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
4092
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? Thanks! John
2
1901
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 the base class ones, which isn't what I want (for example, I was hoping an empty OnClose event would make closing the form impossible). Two questions: 1) Is this the right way to do this, or should I be detaching event handlers? and 2) Any reason...
3
1455
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 program (for instance a .NET service, or even a client .net application) which is able to intercept this call and deal with the associate information. This middle application might decide whether to send something to IIS or just do everything by itself...
2
4786
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, joystick usage, and mouse usage inputs very easily at a global level or at application levels by watching applications for events within the applications. I was wondering if there were any python libraries that provided
0
1052
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 same thing, but given your request "intercepting things send to print() before they're sent to sys.stdout" it may be more adequate. --
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8961
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.