Its probably because the file does not exist... it  has to exist before teh
function can work.


----- Original Message -----
From: "Grant Black" <[EMAIL PROTECTED]>
To: "Multiple recipients of list offtopic" <[EMAIL PROTECTED]>
Sent: Thursday, 5 April 2001 11:58
Subject: [DUG-OFFTOPIC]: ExtractShortPathName


> I find that on my new machine which runs Windows 2000, that
> 'ExtractShortPathName' returns an empty string.  The function is a thin
> wrapper to the Windows API call 'GetShortPathName' - and MS claim that it
> works under Win NT/Win2K.
>
> I haven't tried it on a Win9x machine yet, but I am pretty sure it used to
> work.
>
> Has MS got it wrong, or am I missing something?
>
>   var
>     s : string;
>   begin
>     s := 'C:\Program Files\foobar.txt';
>     s := ExtractShortPathName(s);
>     edit1.Text := s;   // s = '' !
>   end;
>
> BTW - machine came with the 18Gb drive setup as one FAT32 partition -
> strange that it was not setup by Compaq to run NTFS...
>
>
> (Not actually offtopic, but I don't get delphi mail-list here)
>
>   _____
>
> Grant Black
> Software Designer
> Information Tools Ltd
> Phone DDI +64 9 488-4593
> Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> Web:    http://www.infotool.com <http://www.infotool.com/>
>
>

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to