Platform SDK: Network Management |
The NetReplExportDirAdd function registers an existing directory in the export path for replication.
Only members of the Administrators local group or the Account Operators local group can successfully execute the NetReplExportDirAdd function.
NET_API_STATUS NetReplExportDirAdd( LPCWSTR servername, DWORD level, const LPBYTE buf, LPDWORD parm_err );
Value | Meaning |
---|---|
1 | Specifies an export subdirectory and its attributes. The buf parameter points to a REPL_EDIR_INFO_1 structure. |
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.
When you add a directory to the export path using a call to the NetReplExportDirAdd function, you must specify the settings for the integrity and extent replication controls. To do this, use the rpedX_integrity and rpedX_extent members of the appropriate REPL_EDIR_INFO structure. The integrity control determines when a master updates a client. The extent control specifies the selection of files for replication within the main export directory. For more information, see replicator export directory functions and REPL_EDIR_INFO_1.
The file replicator service automatically registers a new directory for replication when a user creates it under the master directory's export path. In this case, the file replicator service gives the directory the REPL_INTEGRITY_FILE and REPL_EXTENT_TREE settings for the integrity and extent replication controls.
The default values for locktime and lockcount are both 0. For more information about these values, see REPL_EDIR_INFO_2.
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, NetReplExportDirDel, REPL_EDIR_INFO_1