Thank you very much, Torsten!

It works great. For the moment, I can live with only spawning a command line, but if I hit a wall I will look into the��ReadFile��API.

In the meantime, I already committed a little addition for spawning a blocking process in a given directory.

Cheers,
Doru



On Mon, Aug 11, 2014 at 12:00 PM, Torsten Bergmann <astares@gmx.de> wrote:
Hi Tudor,
��
first I created the classes/APIs you are talking about directly as part of NativeBoost.��
After that there was a suggestion from Igor that NB should be reduced to it's��core
(so only FFI functionality, no wrapping) and as we want to reduce the��core Pharo to
a minimum I agree with this opinion.

Therefore I created the separate OSWindows project and continued my work there��
(also with the idea that other OSxxx may follow).

OSWindows is an external loadable package - also better structured from the package
side and well tested. Havent found the time to deprecate the older parts like��
NBWin32Shell in NB itself or the Pharo 3.0 image yet. Hope to be able to do for 4.0.

If you just want to open an explorer or browse an URL you can therefore (currently) still
use NBWin32Shell in 3.0 directly but if you require more (like calling an external process
or work with Commandline) then go for OSWindows.

If you want to call/run an external executable just check WinProcess class in OSWindows.
#createProcess: or #createAndWaitForProcess:

If you just want to do output on the command line check out the examples in class
WinConsole. For instance��
��
�� WinConsole example4
��
will do some colored output.
��
Reading from the console is not yet integrated (as ever for time reasons) - basically it��
would mean to just wrap the ReadFile API (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365467(v=vs.85).aspx)
and call it.

I've added you to the OS team if you want to help.
��
Bye
T.
��
��
��

Gesendet:��Samstag, 09. August 2014 um 14:33 Uhr
Von:��"Tudor Girba" <tudor@tudorgirba.com>
An:��"Discusses Development of Pharo" <pharo-dev@lists.pharo.org>
Betreff:��[Pharo-dev] NBWin32 vs OSWindows

Hi,
��
I am working on a little tool that requires a couple of interactions with either a command line interface or a DLL whose API I do not know :).
��
First, I would like to thank the authors for both NBWin32 and OSWindows. Having these possibilities at our fingertips makes the difference.
��
Second, I am still not clear how to judge the difference between these two. For example, the functionality of WinShell (from OSWindows) seems to exist one-to-one in NBWin32Shell. Is it correct to assume that I should just focus on NBWin32?
��
Third, how do I trigger a custom command line with a blocking call and how do I capture the output of the command? For example, suppose I just need to do a "dir" and capture the output. How do I do that? Are there examples?
��
Cheers,
Doru
��--
www.tudorgirba.com[http://www.tudorgirba.com]
��
"Every thing has its own flow"




--
www.tudorgirba.com

"Every thing has its own flow"