Re: call an executable with array of strings parameter

Tech-Archive recommends: Fix windows errors by optimizing your registry



On May 11, 3:01 pm, Ananya <Ana...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I am calling a Java native executable from a C++ program.

Since the command line arguments of a Java program are an array of strings,
I would like to use an array of strings as a parameter for calling my
executable, not just one string.

However, I am using ShellExecuteEx, and the attribute lpParameters of
ShellExecuteInfo only seems to allow one string.

Can an array of strings be forced for ShellExecuteEx, or is there another
way of calling an executable with an array of strings?

Another reason why I would like an array of strings is that my parameter
contains the colors of all pixels of an image, and it is too slow to make one
string out of that.

Thanks for looking at my question.

Ananya wrote:

Can an array of strings be forced for ShellExecuteEx, or is there another
way of calling an executable with an array of strings?


Well! i would prefer to use the windows messaging system rather
passing even such a long string to another app. And as pointed by
Alexander you got to rethink your design. Windows messaging system is
very robust and passing an array of string would make that solution
potential design option.

For example i would do something like following:

0) A app wants to send a damn long long string, so i'l put all the
things on messaging system (wm_copy_data , wm_set_text etc. etc.)

1) B app will hook the messages and can process all the input as it
arrives or just wait to gather all the stuff coming in.

ali

ali

.



Relevant Pages

  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: Returning array of strings through callback from unmanaged to
    ... Is the array of strings a jagged array or fixed length array? ... It is imperative that I am able to return the array of strings from the ... I have control over how many strings I want the unmanaged code to return ... What I want to accomplish is to pass a callback function to unmanaged ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: attempting to return values from array from w/in a function
    ... What I get is an array w/ only the most recent array entry. ... I am new to PHP & do not have formal scripting ... you end up comparing strings, but the test you mean probably is simply: ... case 1: {codeblock} ...
    (comp.lang.php)
  • Re: K&R2 Secition 5.9 - major blunders
    ... Would changing 'point to a' to 'point into a' twenty element array be ... > arrays of pointers is to store character strings of diverse ... comparison between what was really happening (arrays of pointers to ... pointer to a string(this probably would confuse beginners)" and ...
    (comp.lang.c)