Re: Parallelling system_exec

new topic     » goto parent     » topic index » view thread      » older message » newer message

> shellExecute (using a no-win32lib hack, searched the forum for info)
> doesn't seem to be working for me either... it will run a simple
> program, but it won't take command-line parameters...

If something crazy like this works for me, then..... ?

----
function alloc_str(sequence s)
atom mem
mem=machine_func(16,length(s)+1)
if mem then poke(mem,s) poke(mem+length(s),0) end if
return mem
end function

constant
 C_INT=#01000004
,sh32=machine_func(50,"shell32.dll")
,shEx=machine_func(51,{sh32,"ShellExecuteA",
  {C_INT,C_INT,C_INT,C_INT,C_INT,C_INT},C_INT})
,action=alloc_str("open")
,prog=alloc_str("cdrecord.exe")
,params=alloc_str(" -v -dummy -data -dev=0,1,0 test.iso")
,dir=alloc_str("d:\\unzipped\\cdrtools\\")

atom ret
ret=c_func(shEx,{0,action,prog,params,dir,1})
if ret < 33
 then printf(1,"shell_error#%d %s\n",{ret,"..oops"})
 machine_proc(64,3)
end if

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu