1. RE: current_dir() on WinXP

Must be just you...  This test program prints whatever directory it's 
started from on my XP system.
--------------------
include get.e
include file.e

puts(1,current_dir())
if wait_key() then end if
--------------------
How are you launching your program?  (Double-clicking?  Command-line?  
Batch file?)

-- Brian


Euman wrote:
> 
> Has anyone other then me noticed that current_dir()
> doesnt work on WinXP? 
> I always get the :\Documents and Settings directory...
> 
> Euman

new topic     » topic index » view message » categorize

2. RE: current_dir() on WinXP

euman at bellsouth.net wrote:
> 
> Has anyone other then me noticed that current_dir()
> doesnt work on WinXP? 
> I always get the :\Documents and Settings directory...
> 
> Euman

Hello again Wayne,

current_dir() doesnt work on any machine if you drag and drop
a file onto your executable.

I submitted a CClient piece installer a while back which has
an include file "GetStartupDir.e" in the source.
This has a function GetStartupDirectory() which always 
returns the correct startup directory.

Take care for now,
Al

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

3. RE: current_dir() on WinXP

Hello again Wayne,

I have to apologize for not mentioning that the include file
i pointed you to doesnt use any win api links, it's all done
in raw Euphoria code, and it's a very short file.
All it does is look at command line args and do a simple
split_path() ignoring everything except the dir.

It's also of interest to note that the win api also doesnt
work as expected, at least not on Win98 (which i end up using
more then WinXP).  If you drag and drop a file and use
the win api GetCurrentDirectory() you still dont get the
correct directory smile  The function doesnt fail, it just
returns the wrong directory!  

I think the name of the file is "GetCurrentDir.e"
not "GetCurrentDir.ew".  I try to remember to use the
"e" extension for files that dont use windows specific
stuff.


Take care for now,
Al




euman at bellsouth.net wrote:
> 
> Thanks AL,
> 
> I knew I could do this using Win API, just wanted to
> know if others had similar problems with built-in
> Euphoria commands.
> 
> Robert may want to check into changing current_dir()
> for us Windows programmers.
> 
> Euman
>  
> ----- Original Message ----- 
> From: "Al Getz" <Xaxo at aol.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Wednesday, May 28, 2003 3:15 PM
> Subject: RE: current_dir() on WinXP
> 
> 
> > 
> > euman at bellsouth.net wrote:
> > > 
> > > Has anyone other then me noticed that current_dir()
> > > doesnt work on WinXP? 
> > > I always get the :\Documents and Settings directory...
> > > 
> > > Euman
> > 
> > Hello again Wayne,
> > 
> > current_dir() doesnt work on any machine if you drag and drop
> > a file onto your executable.
> > 
> > I submitted a CClient piece installer a while back which has
> > an include file "GetStartupDir.e" in the source.
> > This has a function GetStartupDirectory() which always 
> > returns the correct startup directory.
> > 
> > Take care for now,
> > Al
> > 
> > 
> > 
> > TOPICA - Start your own email discussion gro========================
> > 
> >

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

4. RE: current_dir() on WinXP

euman at bellsouth.net wrote:
> 
> Thanks Al,
> 
> your routine works great!
> 
> Euman
> 
> ----- Original Message ----- 
> From: "Al Getz" <Xaxo at aol.com>
> 
> > 
> > Hello again Wayne,
> > 
> > I have to apologize for not mentioning that the include file
> > i pointed you to doesnt use any win api links, it's all done
> > in raw Euphoria code, and it's a very short file.
> > All it does is look at command line args and do a simple
> > split_path() ignoring everything except the dir.
> > 
> > It's also of interest to note that the win api also doesnt
> > work as expected, at least not on Win98 (which i end up using
> > more then WinXP).  If you drag and drop a file and use
> > the win api GetCurrentDirectory() you still dont get the
> > correct directory smile  The function doesnt fail, it just
> > returns the wrong directory!  
> > 
> > I think the name of the file is "GetCurrentDir.e"
> > not "GetCurrentDir.ew".  I try to remember to use the
> > "e" extension for files that dont use windows specific
> > stuff.
> > 
> > 
> > Take care for now,
> > Al
> 

Hello there Wayne,

That's good to hear smile

It doesnt actually do much, but at least it works when
you use drag and drop to open the program, and when
you use the shell context menu to open one of your programs
written in Euphoria too.

There is also a winapi function (probably the one you
meant) that does the same thing, but i couldnt see
linking, poking, calling the function, and then peeking
the string just to use it smile  Apparently it's easier 
to do in Euphoria then in winapi.


Take care for now,
Al

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

Search



Quick Links

User menu

Not signed in.

Misc Menu