Re: A89: Re: when a file can't find itself


[Prev][Next][Index][Thread]

Re: A89: Re: when a file can't find itself



> I was wondering how a program might figure out which folder it's in?  I know
> you can just search for the file and test for size and type, but what if
> there is a copy of the same file in a different folder? how do i find the
> correct one?

Compare an address within your file with the first and last one of the file
you're checking. It might also be possible to get the first address of the
program somehow but that would probably be more complicated.

But this won't work if the user had the program in archive memory because
archived programs are copied to RAM before being executed.

Josh