I have an application that sometimes access fileshare in local network. In this case the path is stored in fEBookPath. If user entered login and password since before all is good. But if not FindFirst don't return 0. In that case I want to display the same security dialog that Windows Explorer show. Like this
My simplified code
if FindFirst(fEBookPath + '*.*', faDirectory, vSearchRecFolder) = 0 then
begin
// Existing code to access fEBookPath
end
else
// Display Windows security dialog to enter login + password
