[Lazarus] Write to UNC or mapped drive

Denis Kozlov dezlov at gmail.com
Wed May 25 12:14:11 CEST 2016

On 24 May 2016 at 20:46, Leonardo M. Ramé <l.rame at griensu.com> wrote:

> Hi, My app is a CGI running on Windows2012 (IIS 7.0), it needs to save a
> file to a remote UNC or Mapped drive, but when I check using
> DirectoryExists in both cases I get False, but of course the UNC and mapped
> drive exists.

Does it fail only for the root UNC path but works for a path that contains
a folder component?

DirectoryExists internally uses GetFileAttributes WinAPI, which states:

> If you call GetFileAttributes for a network share, the function fails, and
> GetLastError returns ERROR_BAD_NETPATH. You must specify a path to a
> subfolder on that share.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160525/a833eef8/attachment-0003.html>

More information about the Lazarus mailing list