Announcement

Collapse
No announcement yet.

passing parameters between EXEs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Henning Wallgren
    replied
    Thank you all



    ------------------
    Henning

    Leave a comment:


  • Lance Edmonds
    replied
    Generally speaking, the clipboard should be left to the user to work with.

    For example, if the user has some data in the clipboard, this will delete it, and you may end up with an unhappy user.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Mel Bishop
    replied
    Have you tried copy-n-paste via the clipboard?


    ------------------

    Leave a comment:


  • Tom Hanlin
    replied
    Testing COMMAND$ with CreateProcess under Windows 2000 shows an apparent limit of 32Kb for the length of the command line. Testing with SHELL shows an apparent limit of 255 characters, so there may be a length limit for SHELL. I'll have to refer that to R&D.


    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Lance Edmonds
    replied
    One note about COMMAND$ (command-line parameter passing)... the "127 byte limit" mentioned above is not correct (127 was a generally true in MSDOS, but not so in Windows).

    PowerBASIC itself imposed no limits on the command-line length with SHELL/SHELL() or the amount of data that can be returned by COMMAND$. While some versions of windows allow around 2Kb for the maximum parameter length, the exact limit appears to vary from version to version of Windows.

    For example, from my experiments under Windows 2000, the limit seems to be around 2050 bytes, or thereabouts. I'm not aware of any specific MS documentation on the absolute limits for other versions of Windows.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Lance Edmonds
    replied
    This topic is generally known as "InterProcess Communication" (IPC), and there are quite a few technques available. Memory Maapped files and %WM_COPYDATA are the easiest. but you can also use a mailslot, TCP, etc.

    Try searching for "IPC" at www.msdn.microsoft.com for more ideas.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Mike Jenkins
    Guest replied
    Originally posted by Fred Buffington:
    If the information is not too great in length you could even
    pass the information via the command line and retrieve it with
    command$ but im sure you've already ruled that out for your
    specific situation.
    Yes, as Fred points out, that's the quick & easy way to pass the
    data, if it consists of no more than 127 bytes.


    ------------------

    Leave a comment:


  • Fred Buffington
    replied
    If the information is now too great in length you could even pass
    the information via the command line and retrieve it with command$
    but im sure you've already ruled that our
    for your specific situation.




    ------------------

    Leave a comment:


  • Michael Mattias
    replied
    You can use a memory-mapped file. Sample Code in source code forum at.. hmm, just looked, and I guess I never posted that. SOmeone remind me, OK?

    Oh, well, the PD source code is at the IMS web site:

    http://www.infoms.com/bsp/list9-01.zip

    MCM


    Leave a comment:


  • Don Dickinson
    replied
    Pass the windows handle of the first program to the second program on the command line. The second program can use this handle to send a windows message (WM_COYPDATA) containing data to be copied to the first program's memory space. Download the 32-bit Memory Sharing code from: http://dickinson.basicguru.com/code.htm

    Best Regards,
    Don

    ------------------
    dickinson.basicguru.com

    Leave a comment:


  • Henning Wallgren
    started a topic passing parameters between EXEs

    passing parameters between EXEs

    Hi

    I have a program that reads in information from a couple of files on startup.
    From this program I SHELL to another EXE file. This exe-file uses the same
    information. Is it somehow possible to pass this information without having to
    set up the second EXE to read the info from file too?

    ------------------
    Henning
Working...
X