A
Arnold
I need to modify my existing program into two separate executables. The
first exe will be executed once to initiate a hardware card, the second
program exe can be called multiple times to process data. The second program
calls a member function of the first program so it needs access to the
object created by the first exe. How can I do this?
More if details if you are curious:
I am writing a program which initializes and loads up a pci card, the whole
process takes about 20 seconds since large files are copied to the card.
This card is then accessed by a program which uses it to accelerate the
processing of data files. Currently I put the initilization function at the
start of main() so it loads up the card each time the program is executed.
This is a waste of time since the card only need to be initialized once not
every time. Therefore I need to make the initialization separate. The
initialization process creates an object with a handle to the card. I cannot
create multiple handles to the card as it can only be opened once. So the
program need to have access to that handle. This program is meant to run on
the commandline from a Windows system. The API the card came with has no
functions to facilitate what I need to do.
Intended operation:
c:\myprogram\InitiateCard.exe
Card initialized.
\\card would be opened, initialized, and ready for use
\\and would return me to the commandline after outputting
\\small message
c:\myprogram\process.exe test1.txt
c:\myprogram\process.exe *.dat
\\process can be called multiple times.
\\when done, close the card.
c:\myprogram\InitiateCard.exe quit
\\close card
At the present, process.exe just initiate the card each time it is called.
I'm a junior programmer just out of college and this is my project for work.
Thanks for any help guys.
first exe will be executed once to initiate a hardware card, the second
program exe can be called multiple times to process data. The second program
calls a member function of the first program so it needs access to the
object created by the first exe. How can I do this?
More if details if you are curious:
I am writing a program which initializes and loads up a pci card, the whole
process takes about 20 seconds since large files are copied to the card.
This card is then accessed by a program which uses it to accelerate the
processing of data files. Currently I put the initilization function at the
start of main() so it loads up the card each time the program is executed.
This is a waste of time since the card only need to be initialized once not
every time. Therefore I need to make the initialization separate. The
initialization process creates an object with a handle to the card. I cannot
create multiple handles to the card as it can only be opened once. So the
program need to have access to that handle. This program is meant to run on
the commandline from a Windows system. The API the card came with has no
functions to facilitate what I need to do.
Intended operation:
c:\myprogram\InitiateCard.exe
Card initialized.
\\card would be opened, initialized, and ready for use
\\and would return me to the commandline after outputting
\\small message
c:\myprogram\process.exe test1.txt
c:\myprogram\process.exe *.dat
\\process can be called multiple times.
\\when done, close the card.
c:\myprogram\InitiateCard.exe quit
\\close card
At the present, process.exe just initiate the card each time it is called.
I'm a junior programmer just out of college and this is my project for work.
Thanks for any help guys.