Nathan,

 You can find documentation about Windows api calls on the msdn site,
here's a link to CreateProcess, called in Bret's code:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp

If you take a look at that call you'll see that there are a bunch of
parameters to the method, the first one is a structure: STARTUPINFO. This
line sets up that structure:
startup_info = [68].pack('lx64')

startup_info in this case is a packed array(packed as a binary sequence to
send to the windows dll method) with 68, converted a long - the l in the
argument to pack, which if you follow the link to the startupinfo struct in
the windows api doc indicates the size of the structure. x64 then says add
64 Null bytes. 64, plus an assumed 4 bytes(32bits) for the long in this
case.

process_info = [0, 0, 0, 0].pack('llll')

Same thing here, set up a process_info structure needed by the call to
CreateProcess, pack 4 longs, all zero as a binary sequence.

There's some info in the Pickaxe book, ruby api documentation on Array#pack
for the arguments to pack. Then it's a matter of taking a look at the
Windows C api and calling it through ruby.

Anyhow that's the ugliness behind some of the basic win32 magic.

-Charley


On 2/8/07, Nathan Christie <[EMAIL PROTECTED]> wrote:

bbiker,

Butting in is encouraged! So, basically, this command USED to work
correctly for me in the past. Then something happened to my machine's
configuration or something along those lines that made this stop working as
it previously had.

Now the only way this command works is if an instance of IE is running
previously to execution.

Welcome!
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18403#18403
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to