|
-
Aug 24th, 2006, 09:32 PM
#1
Thread Starter
New Member
Need to write an intercept
Joined an organization a couple years ago – client server application. Client is VB6 to IBM interspace to CICS client to CICS on a windows sever running COBOL server applications and Oracle DB. They hired us to support the application written by a consulting service. Problem is the Interspace S/W hides some of it’s stuff so it is not real clear what is being passed between the client and so the COBOL people will say they sent something and the VB will say no or visa versa.
I am COBOL but have played with VB a little so know enough to be dangerous so this may be obvious to most of you. I want to write a VB DLL that will trap, intercept, wrapper, whatever you want to call it, between the IBM interspace and IBM client S/W. Both probably C++. This would allow be to display or write out precisely what is being sent and returned. Perhaps allow the user to edit, resend, etc – but I’ll deal with that later.
I have identified the interspace component that calls the client and the client dll being called – first with Editpad then with the Pedump program I got from Microsoft. I need to 1) figure the parameters passed to the Client API then 2) understand how to write a VB Dll that is called by the interspace C++ dll and will then call the client C++ dll. I changed the name of the external name in the interspace DLL but it would not load I am guessing because the Client pieces were missing. I tried to add a define function to call the client DLL but I could not get it defined as an import.
Any help appreciated.
Thanks,
Clark
-
Aug 25th, 2006, 12:11 PM
#2
Frenzied Member
Re: Need to write an intercept
I think you make have to do some API hooking. Could be done a number of ways, one being Import Address Patching. You'll probably have to use c++.
-
Aug 25th, 2006, 05:31 PM
#3
Thread Starter
New Member
Re: Need to write an intercept
Have not used C, so for me, not a good option. I understand that there are tricks to make a VB6 dlls callable. They are PE files. I read somewhere about using a def. Maybe I need to link the obj with a def to create the dll outside of VB.
-
Aug 25th, 2006, 05:59 PM
#4
Re: Need to write an intercept
No can do. C is the only way....
-
Aug 25th, 2006, 10:01 PM
#5
Thread Starter
New Member
Re: Need to write an intercept
I much appreciate the help. I down loaded the "HookControl" and will play with it next week.
Many thanks,
Clark
-
Aug 26th, 2006, 02:28 AM
#6
Re: Need to write an intercept
You can make VB dlls callable, but they won't be able to do anything interesting when called from a non-VB application.
-
Aug 26th, 2006, 09:52 AM
#7
Re: Need to write an intercept
-
Aug 27th, 2006, 12:46 PM
#8
Thread Starter
New Member
Re: Need to write an intercept
I thought that is why it was attached to your reply. I just did a quick read and it looked like I could manually start a VB application, press a button to invoke your “C” control and start intercepting the calls, look at the data, maybe change it, then pass it on. When the data comes back, look at it again, then pass it on back. That would let me do what I need.
This is in development only so performance is not an issue and I will be looking at only one thread. What I am envisioning is the developer starts the VB Client application, enters his test data, selects the (xmit) to send it to the host. My application, by some method grabs and displays it to the developer so he can see exactly what is sent (and what host application it is sent to). (I can deal with presenting it.) He selects “OK” and off it goes to the host. A few seconds later the host replies and it shows him exactly what came back. Again, he selects “OK” and it is returned back to the client application. These applications are unaware that was looked at.
I do not care if it automatically pops up or the developer starts it and presses a button to attach and detatch it. I have not had a chance to play with yours yet but I did see there were some updates to it. It looked like I added a control which I simply invoke to “hook” into a program to intercept it. I assumed I provide it the function or sub to call. If I can do that then do my thing and at “function end” it passes all the data on to the original called dll, I can do what I need. If your hook won’t do this or you have a better way, I am all ears. Unfortunately, our VB developers are young and can’t think out of the box, so to a great extent I am on my own.
We had some production problems that have priority, so I don’t know how quick I can get to this, but hope to get some time, probably in the evening, next week to play with it some.
Additional thoughts very much welcome and appreciated.
Again very many thanks,
Clark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|