Welcome! Log In Create A New Profile

Advanced

WD22 - Command Line Variable Return

WD22 - Command Line Variable Return
September 16, 2018 04:36PM
Hi All

No idea if this makes any sense. I want to call a non WD program and read the returned variables from that app. The called app will read data and return five variables.

What is the syntax calling that with WD so that I can read the data that is returned?


Cheers
André
Re: WD22 - Command Line Variable Return
September 17, 2018 01:23PM
Hi André,

there is no built in mechanism for a windows application to return 5 variables. It can return ONE numerical value, and that's the end of it. Therefore there is no mechanism in windev to get more than that.

To get THE return value, see EXERun help.

If you need more than that, then you need to build a special mechanism in both application (shared memory, by example).

Best regards
Peter Holemans
Re: WD22 - Command Line Variable Return
September 17, 2018 03:18PM
Hi André,

There is a system in Windows (coming from the unix world originally) and that is named pipes.
It behaves like sort of a filesystem (npfs) and it can be used for interprocess communication (even remotely over a network).

If both processes are on the same machine you can use anonymous pipes and that is what you are looking for.
I'm sure you can also use some API's from the Kernel32 DLL out of WX using the API function to achieve the same as it is an embedded part of the operating system.

A simple C# example can be found here: https://docs.microsoft.com/en-us/dotnet/standard/io/how-to-use-anonymous-pipes-for-local-interprocess-communication


For use out of WX (which is C++ based) you'll need to search for the kernel32 API references to use and these can be found here: https://docs.microsoft.com/en-us/windows/desktop/ipc/anonymous-pipe-operations


Just my 2 cents,

Peter Holemans
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: