lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Nov 2, 2010 at 11:15 AM, Lorenzo Donati
<lorenzodonatibz@interfree.it> wrote:
> Yes, but that requires a fair amount of knowledge of WinAPIs, which is a can
> of worm for itself (at least from my POV), unless you limit yourself to some
> very simple "one-shot" function calls.

I know, the Windows API is full of headaches. But another way to work
the system is using our friend io.popen and parsing the output from
system commands. For instance, dir /B *. gives all the directories
within the current directory, in a convenient bare format. And I
recently discovered the WMI command line tool:

C;\> wmic process get name,handle

actually does something very similar to the Unix ps.

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wmic.mspx?mfr=true

There's also commands like netstat available.

> Ah! By the way, I had problem with Alien since it requires luarocks for
> installation

It's part of the base LfW install.  I've never compiled it for
Windows, would depend on what your toolchain is.

> Is there some reason why 'cinvoke' is rarely mentioned on this list and all
> the focus is on 'Alien'? Are there some limitations or problems with it?

I don't know, Alien is more fully featured and developed.

steve d.