Search code examples
delphinetwork-programmingdelphi-7shareunc

How does one detect the action of adding/removing of a UNC share with Delphi? (Prev D7)


How does one detect the action of adding/removing a UNC share? I basically just need to know if a share has been added/removed not details about the share itself. A working example would be greatly appreciated.

Thanks SB


Solution

  • "By monitoring the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares\ I can catch changes to it."

    To monitor a registry key... http://delphi.about.com/od/kbwinshell/l/aa052003a.htm