Author Topic: Passing Parameters  (Read 3041 times)

0 Members and 1 Guest are viewing this topic.

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Passing Parameters
« on: March 07, 2020, 04:13:03 am »
Hi,
I have read the info on this but I am not quite sure how it works.

I want program A.exe to pass B$,C$,D$ .. to program Z.exe and then wait for Z.exe to complete its processing and pass back the same parameters to program A.exe.

Program A.exe will then use this passed data and then continue on from the next step to process the returned data.

What are the commands please ??

Thanks,

Mike

Offline EricE

  • Forum Regular
  • Posts: 114
    • View Profile
Re: Passing Parameters
« Reply #1 on: March 07, 2020, 07:10:03 am »
The three strings could be written to a file and then the A.exe program calls the SHELL function to run the program Z.exe which reads the file to get the three strings.
Program Z.exe then writes its output to a file, which will then be read by program A.exe when it resumes execution.

The above method uses files for Interprocess Communication (IPC) and would one way of implementing a solution for what you have specified.
« Last Edit: March 07, 2020, 07:11:19 am by EricE »

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Passing Parameters
« Reply #2 on: March 07, 2020, 07:24:28 am »
Look up the CHAIN and COMMON SHARED commands on the wiki. I think that's what you're looking for, but I personally have no experience with it. QB64 has no module size limits, so the commands are only there for legacy program purposes.

http://www.qb64.org/wiki/CHAIN

http://www.qb64.org/wiki/COMMON_SHARED
« Last Edit: March 07, 2020, 07:28:59 am by OldMoses »

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: Passing Parameters
« Reply #3 on: March 08, 2020, 06:36:46 am »
Thank you.

Mike