Platform SDK: Network Management |
The NetReplExportDirUnlock function unlocks an export directory so that replication from it can resume. The function decrements 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 NetReplExportDirUnlock function.
NET_API_STATUS NetReplExportDirUnlock( LPCWSTR servername, LPCWSTR dirname, DWORD unlockforce );
Value | Meaning |
---|---|
REPL_UNLOCK_NOFORCE | Decrements the lock reference count for the export directory. Note that the lock reference count may or may not return to 0, so the directory could remain locked. |
REPL_UNLOCK_FORCE | Unlocks the export directory by removing all outstanding locks on the directory. Sets the lock reference count to 0. |
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.
Replication resumes when all outstanding locks on the directory are released and the lock reference count is returned to 0.
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, NetReplExportDirLock