How display Windows security dialog

Viewed 682

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

enter image description here

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
1 Answers
Related