Platform SDK: Network Management |
The NetReplExportDirLock function locks a replicated export directory so that replication from it can be suspended. The function increments the lock reference count for the specified directory.
Only members of the Administrators local group or the Account Operators local group can successfully execute the NetReplExportDirLock function.
NET_API_STATUS NetReplExportDirLock( LPCWSTR servername, LPCWSTR dirname );
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.
The NetReplExportDirLock function locks a directory so that replication from it can be suspended. To remove the registration of an export directory for replication, call the NetReplExportDirDel function.
The rped2_lockcount and rped2_locktime members of the REPL_EDIR_INFO_2 structure contain lock status information. The rped2_locktime member is automatically set to 0 when the rped2_lockcount member is 0.
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.
Network Management Overview, Network Management Functions, Replicator Functions, NetReplExportDirUnlock