Platform SDK: Network Management

NetReplImportDirDel

The NetReplImportDirDel function removes the registration of a directory so that it no longer receives updates from the master. The function does not delete the directory from the file system.

Security Requirements

Only members of the Administrators local group or the Replicator group can successfully execute the NetReplImportDirDel function.

NET_API_STATUS NetReplImportDirDel(
  LPCWSTR servername,  
  LPCWSTR dirname      
);

Parameters

servername
[in] Pointer to a constant null-terminated Unicode string specifying the name of the remote server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.
dirname
[in] Pointer to a constant null-terminated Unicode string specifying the name of a replicated directory to remove the registration.

Return Values

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value is a Win32 API error code. For a list of error codes, see Error Codes.

Remarks

To unregister a directory that is no longer being exported, call the NetReplImportDirDel function. However, a call to NetReplImportDirDel does not stop replication of a directory if an exporter is actively exporting the directory. This is because the directory will be registered again the next time the exporter informs the importer of the directories it is exporting. To suspend replication and prevent importing a directory that is actively being exported, call the NetReplImportDirLock function.

The file replicator service can automatically register the directory service at any time.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or earlier.
  Windows 95/98: Unsupported.
  Header: Declared in Lmrepl.h; include Lm.h.
  Library: Use Netapi32.lib.

See Also

Network Management Overview, Network Management Functions, Replicator Functions, NetReplImportDirAdd, NetReplImportDirLock