1. 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

new topic     » topic index » view message » categorize

2. RE: Running a euphoria program from a CD

Hi

To all who all who replied

Yup, you're right - doh

Cheers to all!

Chris


akusaya at gmx.net wrote:
> 
> 
> C> -- check for presence of divx5 dll
> C> fn = open("\\windows\\system32\\divx.dll","r")
> C> if fn > -1 then --disable install divx button
> C> 	setEnable(PushButton6, False)	
> C> end if
> 
> I have another idea for this, why not just
>  address = open_dll("divx.dll")
> and then check the value of address.
> Windows will search the divx.dll file in the system or system32
> directory automatically.
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu