<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 27, 2016 at 4:36 PM, Marc-André Lureau <span dir="ltr"><<a href="mailto:mlureau@redhat.com" target="_blank">mlureau@redhat.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">
>> Rather than the user name of the driver, it would be more reliable to check<br>
>> the connection details, with a function such as<br>>> WNetGetResourceInformation(). (I haven't looked in details if this is the<br>>> right function)<br>
><br>
> So I tested this function, and it doesn't actually return the local name<br>
> (drive letter). It might return this on older Windows, but on the newer<br>
> ones, since drive letters are per user, it doesn't return anything.<br>
> (localname is null).<br>
<br>
</span>I would rather check if there is a remote name (the webdav server). If you can find one, I suppose it means it is mapped.<br>
</blockquote></div><div><br></div><div>Well that would be fine for only checking whether the drive is connected, or not,<div>but we have to get the driver letter, so that we can unmap it later.</div><div><br></div><div>The drive shouldn't be mapped before starting the service, this is just a safety check,</div><div>but we should still unmap it later. </div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Lukas Venhoda</div>
</div></div>