Postby Rozis » 12 Sep 2006 01:41
I'm doing much the same thing, so maybe i can help if your're using Windows. Then i would expect you called Vlc via the Windows API-function Createproccess(), You could wait for Vlc to stop using waitforsingleobject(). Although i program all my code in Visual Objects here is the source:
method wait(floatseconds,lkill) class runapp
local dwresult,dwhowlong as dword
dwhowlong:=if(IsNil(floatseconds),infinite,floatseconds*1000)
dwresult:=waitforsingleobject(self:phandle,dwhowlong)
if dwresult=wait_timeout
if lkill
return self:kill() //Program takes too much time: kill it
endif
else
if self:houtput!=null_ptr // if output was redirected restore it
CloseHandle(self:houtput)
self:houtput:=null_ptr
endif
if self:hinput!=null_ptr // if input was redirected restore it
CloseHandle(self:hinput)
self:hinput:=null_ptr
endif
endif
return .t.
Just give me a yell if you need more help...
Rozis