That's the sort of thing I was after - but I want to go the other way. I have '\\MyServer\MyDirectory' I want to find the Drive mapping the user has eg H:\
I want to avoid iterating through the Drive mappings checking each one. Also the
UNC for the D:\ or C:\ may be the one required.
Regards
Paul McKenzie
=========================
Paul McKenzie
Jetbet II Developer
=========================
[EMAIL PROTECTED]
Ph: (04) 576-6822
T.A.B. National Office
106-110 Jackson Street
Petone
New Zealand
____________________Reply Separator____________________
Subject: Re: [DUG]: UNC Path Names
Author: [EMAIL PROTECTED]
Date: 16/11/2001 13:11
On 16 Nov 2001, at 13:25, [EMAIL PROTECTED] wrote:
> G'Day,
>
> If I have a UNC directory path (eg '\\MyServer\MyDir') that is mapped to
a Drive
> letter, how can I extract the drive letter ?
> I have tried
> MyDriveString := ExtractFileDrive('\\MyServer\MyDir');
> but no luck ...
> any ideas ? I have tried trailing "\" etc but still no luck
I think u'll have to use WNetGetUniversalName to get the info. Be
careful if u are going to use it on 95/98 there's a bug in it and u'll
find a workaround as suggested by M$ (and it works) in Windows
SDK help file.
Regards
Sandeep
Software Developer
CFL
[EMAIL PROTECTED]
http://www.cfl.co.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/(See
attached file: att1.eml)
att1.eml
Description: Binary data
