RE: Running a euphoria program from a CD
Chris Burch wrote:
<snip>
> procedure Window1_onOpen (integer self, integer event, sequence
> params)--params is ()
> integer fn
> -- check for presence of divx5 dll
> fn = open("\\windows\\system32\\divx.dll","r")
> if fn > -1 then --disable install divx button
> setEnable(PushButton6, False)
> end if
> close(fn)
>
> end procedure
> setHandler( Window1, w32HOpen, routine_id("Window1_onOpen"))
<snip>
> G:\natinst.exe:8894 in procedure Bpz()
> bad file number (-1)
> BqA = 3
> BqB = 13
> BqC = {}
> BqD = -1
The problem is the close(fn). You should put that in an else clause, so
that you don't try to close an invalid file number. Also, you might
want to use the WINDIR environment variable (see the Eu docs for getenv)
when checking for the dll, because I think you are looking on the cd
using "\\windows\\system32\\divx.dll" as your path.
Matt Lewis
|
Not Categorized, Please Help
|
|