Platform SDK: Network Management |
The NetReplImportDirUnlock function unlocks an import directory so that replication to it can resume. The function decrements the lock reference count for the specified directory.
Only members of the Administrators local group or the Replicator group can successfully execute the NetReplImportDirUnlock function.
NET_API_STATUS NetReplImportDirUnlock( LPCWSTR servername, LPCWSTR dirname, DWORD unlockforce );
Value | Meaning |
---|---|
REPL_UNLOCK_NOFORCE | Decrements the lock reference count for the import 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 import 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 rpid1_lockcount and rpid1_locktime members of the REPL_IDIR_INFO_1 structure contain lock status information. The rpid1_locktime member is automatically set to 0 when the rpid1_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, NetReplImportDirLock