×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

intercepting external process messages

intercepting external process messages

intercepting external process messages

(OP)
is there a way to intercept an arbitrary process's messages?  I need to develop a QC program that monitors a testing program .  that program uses a IEEE488 card to do the work.  I need to know unobtrusively if that program is using the IEEE488 card, i could care less what the transmissions are.  modifying the test program is out of the question.  I have been reading that  I might ba able to view the messages that it passes, is this possible with WINAPI calls?

RE: intercepting external process messages

(OP)
ok
there seems to be at least two ways to accomplish this,
1) is to install hooks and look for certain messages but the problem with this is how do I find out what the messages are that I'm looking for
2) rip apart the dll that I need to monitor, make a new one with stubs to all the function calls to the real dll, renaming the original, of course.  the problem with this is that it is slightly slower, and it might not handle new versions of that dll very well.

has anyone tried something like this, and if so what might be the better approach?

appreciated...

RE: intercepting external process messages

Logic analyzer

<nbucska@pcperipherals DOT com> subj: eng-tips

RE: intercepting external process messages

(OP)
I have 250 testing machines, I can't really afford to install a large number of logic analyzers in the lab.  It needs to be done in the software somehow across different contexts.

RE: intercepting external process messages

SDK:

National Instruments has a feature for 488.2 cards called NI-Spy that monitors API calls. I do not know if it works for other manufactures GPIB cards, but it may be worth looking into. Here is a link, it is mentioned on the 3rd page of the Adobe document.

http://www.ni.com/pdf/products/us/4gpib659-663.pdf

Good Luck!

Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.

RE: intercepting external process messages

Assuming that the program runs on a PC or compatible:

You could write a memory resident program which intercepts
the communication between the 488 driver and the rest
of the system. You could run this before the test program
and it would record the communication.

I would start with disassembling the 488 device driver.
Your program should patch into this.

<nbucska@pcperipherals DOT com> subj: eng-tips

RE: intercepting external process messages

(OP)
<------------------------------>
National Instruments has a feature for 488.2 cards called NI-Spy that monitors API calls. I do not know if it works for other manufactures GPIB cards, but it may be worth looking into. Here is a link, it is mentioned on the 3rd page of the Adobe document.
<------------------------------>

I have thought about this. I have used NI-SPY to debug my programs in the past.  The problem with this is that I can't control the execution of it.  It could run in the background and write out to a file that I could monitor, but then I have two processes running along with the test program, some of the older programs are tempermental and I'm afraid that combined with the slowness of the PC's that we are using it might tend to crash the test.  I agree that this would be the easiest solution to this... but not an option.

RE: intercepting external process messages

(OP)
nbuckska,
this is exactly what i had in mind.  So, you're saying that the function forwarding via a DLL might be the best method for doing this?
By the way, I appreciate all the help on this.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources