Robert wrote:I would like to see the Docu text expanded, maybe with examples, to properly understand what these two do, and the differences between them
There is Docu.
PROCEDURE Run (IN exeName: ARRAY OF CHAR)
Run any external application. exeName can include path.
PROCEDURE Open (IN fileName: ARRAY OF CHAR)
Open fileName in external application associated with such file type.
URLs will be opened in default browser application.
If you want to add something, please suggest your text. From my point of view, we should not include any examples in this documentation.
Robert wrote:I can't really comment much on the implementation as I have very little knowledge of the WinApi functions, but I don't like the static declaration of a 5 kByte string - I hate wasting memory!. Can it be much shorter, or dynamic so only used when required?
It is allocated only ones for Dialog. Better not to make this string dynamic, because in this case garbage collector can clean it before other thread will use it. The size is used by the developers of i21sysCmds... However we can change it to 8191. This will be reasonable according this documentation:
https://support.microsoft.com/en-us/kb/830473 wrote:On computers running Microsoft Windows XP or later, the maximum length of the string that you can use at the command prompt is 8191 characters. On computers running Microsoft Windows 2000 or Windows NT 4.0, the maximum length of the string that you can use at the command prompt is 2047 characters.
Robert wrote:Personally I would like the Run command to have an input Boolean option to open the "Dos Box" to see the .exe's output
You can easily add your realization and even change them "on the fly" using procedure Dialog.SetExtCallHook(); I gave an example
here.
Robert wrote:Can you explain how the "hook realisation" helps with error reporting. Surely that would have interface issues to get the information out?
For error reporting you can also make modified realization which will put reports in the log window during development. Later for production version normal HostDialog.Open/Run can be used. Or you can keep your realization with reporting if it necessary for target user.