Hi,
I need to pass out an array(ints), to some third partay software (exe) which will execute using the array passed to it. After exe has run the now modified array needs to be passed back in to the original application.
What kind of methods should i be looking at to solve this. I think in java its called JNI. breif sample code would help me
Thanks in advance,
Julian
julz barrabPosted Oct 23, 2007, 1:41 PM
EDIT: my bad, silly err by me
all working now, many many thanks alan 4 pointing me in all the right directions (again)
AlanPosted Oct 19, 2007, 10:27 AM
Well you could write the array to a text file, start the third party application using the System.Diagnostics.Process.Start() method and pass it the name of the text file as an argument. The application could then process the array and either overwrite the file with the results or just add them to the existing file.
In the meantime, the C# application could be suspended by calling the Process.WaitForExit() method until the third part application had exited. It would then be safe to read the results from the file.
julz barrabPosted Oct 19, 2007, 7:42 AM
hi,
im not looking to create a new instance of my application (app1),, im looking to pass in an array to another application,,, for example a java file which can be run from the command line (or maybe an exe which searches for the array as input from app1). then pass back a solution to app1.
My aim is: to make my software more versitile and allow the user to use / create ther own Evolutionary Algorithms to solve Grouping Problems - rather than being limited by using the genetic algorithm provided in my software.
---
Would it be possible to do this by passing and reciving values to the command prompt..
like shown here
http://www.geekpedia.com/code42_Pass-values-and-retrieve-response-from-Command-Prompt.html
thanks for your help
DanielPosted Oct 18, 2007, 8:19 PM
Hi Julia
Check out this Article: http://www.codeproject.com/useritems/SingleInstancingWithIpc.asp
Regards
Daniel