Page 3 of 10

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Thu Mar 03, 2016 9:19 am
by Zinn
Ivan, sorry I don't understand what the Total Commander has to do with BlackBox.
When this application hang up your computer after its start it is not a BlackBox problem.
Further I don't understand why we need a so complicate solution?
Above I show an easy solution with Hook. What is wrong with it?
It solves the problem with the multiple InfoCmds and the problem with Wine.
- Helmut

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Thu Mar 03, 2016 9:47 am
by Ivan Denisov
Zinn wrote:Ivan, sorry I don't understand what the Total Commander has to do with BlackBox.
When this application hang up your computer after its start it is not a BlackBox problem.
Further I don't understand why we need a so complicate solution?
Above I show an easy solution with Hook. What is wrong with it?
It solves the problem with the multiple InfoCmds and the problem with Wine.
- Helmut
Total Commander is an example (by Alex Ilyin) of application that can starts slowly because of hardware reasons (HDD staring). Not the computer will hang up, but the BlackBox will hung up while application opening. If applications are staring in separate thread then there will be no problems.

Actions were introduced in version i21sysCalls which is extensively used by Russian community and by Fyodor Tkachov: http://oberoncore.ru/bbcc/subs/i21sys/calls
Also I used it in my Red version of BlackBox. So without Actions or threads it will not solve the problem with the multiple InfoCmds.
Zinn wrote:Above I show an easy solution with Hook. What is wrong with it?
It solves the problem with the multiple InfoCmds and the problem with Wine.
The execution of all BlackBox command will freeze while called application starting. This is especially bad if you app should handle some data from measuring device or it is like server and should fast answer responses.

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Fri Mar 04, 2016 6:25 am
by DGDanforth
I have a question that I should have asked at the beginning of this discussion.
Where (in what module) should the Start command be located?

I see that it has been moved to Dialog but is that really the correct home for the function?

In addition, why "Start"? I would think "Run" would be more appropriate.

-Doug

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Fri Mar 04, 2016 7:24 am
by Ivan Denisov
There was a command Start in HostDialog. I agree that we can rename Start to Run.

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Fri Mar 04, 2016 9:21 am
by Zinn
Doug,
yes, calling it Run is a better name as calling it Start.
- Helmut

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Sun Mar 06, 2016 5:26 am
by Ivan Denisov

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Sun Mar 06, 2016 9:11 am
by Ivan Denisov
I added IN parameter before procedures arguments and add documentation for two new procedures of Dialog.
http://blackboxframework.org/unstable/i ... a1.447.zip

Changes
http://redmine.blackboxframework.org/pr ... 115335d51f

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Sun Mar 06, 2016 3:33 pm
by Josef Templ
Ivan Denisov wrote:I made simple demo to demonstrate the security issue.

1. Please, prepare the folder with clean BlackBox.
2. Open this file with BlackBox:
demo.rtf
3. Click the link from imported file
4. Check is there a Docu folder still exists

It is working only under Wine. I noticed, that it does not work in Windows.

In my test under Windows 10 it returned res = 2, which means "file not found".
This results probably from the fact that the arguments of the command are not passed as lpParam but as part of lpFile.
wine may treat this case differently.

This example also shows that error handling is an issue.
It has been ommitted in HostTextConv for the sake of simplicity but could of course be added.
For a general purpose API it would however also be required that the caller has some control
over the error handling. Reporting errors e.g. in the log/status bar is only one possible way.
Other options are to return a result code and let the client handle the error.
But with every such generalization the API gets more complicated and eventually there is the question if
calling WinApi directly is actually simpler and more powerful.

- Josef


- Josef

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Tue Mar 08, 2016 11:34 am
by Zinn
Ivan Denisov wrote:I made simple demo to demonstrate the security issue.

1. Please, prepare the folder with clean BlackBox.
2. Open this file with BlackBox:
demo.rtf
3. Click the link from imported file
4. Check is there a Docu folder still exists

It is working only under Wine. I noticed, that it does not work in Windows.
On my Wine system it does nothing at all. It does not work.
What is wrong in my Wine installation?

When I exchange Open against Run on my Windows system then I see the black command windows a short time and it closed immediately.
Nothing else was done.

Saving your sample via BlackBox destroy the link.
How did you create the rtf file?

- Helmut

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Posted: Tue Mar 08, 2016 12:33 pm
by Ivan Denisov
This demo silently remove Docu. I recorded video demonstration. I had made this rtf in LibreOffice and then added one space into gedit application. I recorder video to show what I mean.