delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/08/13:05:03

Date: Thu, 8 May 1997 20:02:35 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Zastai <s09s96 AT zorro DOT ruca DOT ua DOT ac DOT be>
cc: djgpp AT delorie DOT com
Subject: Re: DXE trouble
In-Reply-To: <Pine.HPP.3.91.970505090318.19500A-100000@zorro.ruca.ua.ac.be>
Message-ID: <Pine.SUN.3.91.970508195412.21561A-100000@is>
MIME-Version: 1.0

On Mon, 5 May 1997, Zastai wrote:

> Also, is there any way to get a LFN version of _argv[0]?

You mean, on Windows 95, right?  Just call `_truename' library function on
argv[0] that you get: it should return the long name.

But there is a catch (as always with Microsoft): if the program .exe file
resides on a networked drive, you might get some redirector-specific
string instead of the drive letter in what `_truename' returns.  For
example, if F: is a networked drive and you invoked
f:\util\LongProgName.exe, `_truename' might return something like
"\\VOL23\DEPT87\util\LongProgName.exe".  If you then feed this value into
a file-oriented function, it might fail.  So if you get such a pathname,
you will need to restore the original drive letter.  The easiest way is to
call `_truename' on "f:/", it should return "\\VOL23\DEPT87", and you then
know which part of the full pathname do you need to nuke. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019