Q:

Delphi 7 , Passing runtime field values to anther Program

I am trying to write a Payment Interface to an existing win32 program written in Delphi7.  I do not have the source code for the program. I simply want to send the run time value contained in the amount 1 field to the credit card machines API. 
Example Amount1 = 50.00

Amount 1 is a Tedit field 
I have considered com, name pipes shared memory and so on. The examples I have found assume I have the source code. 
A dll or Ocx?  
Any advise,  help or examples would be much appreciated.  

A:

Use Winsight or Spy++ to get the class information of the TEdit control.  Then use the FindWindow/GetWindowText API methods to get the amount.  The trick would be getting the amount at the right time.  I assume you want to do so when the user clicks the Accept button.  There are various techniques that can be used to hook into existing applications that you cannot re-compile from modified source.  I would suggest you look at the DelphiDetours project.

