Platform SDK: Network Management

NetReplImportDirAdd

The NetReplImportDirAdd function registers an existing directory in the import path to receive replication from a master.

Security Requirements

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

NET_API_STATUS NetReplImportDirAdd(
  LPCWSTR servername, 
  DWORD level,        
  const LPBYTE buf,   
  LPDWORD parm_err    
);

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.
level
[in] Specifies the information level of the data. This parameter can be the following value.
Value Meaning
0 Specifies an import subdirectory name. The buf parameter points to a REPL_IDIR_INFO_0 structure.

buf
[in] Pointer to a buffer that specifies the data. The format of this data depends on the value of the level parameter.
parm_err
[out] Pointer to a DWORD value that receives an index to the first parameter that caused the ERROR_INVALID_PARAMETER error. If this parameter is NULL, the index is not returned on error.

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

The NetReplImportDirAdd function cannot create a directory.

A client directory can be registered for replication in one of the following ways:

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, NetReplImportDirDel, REPL_IDIR_INFO_0