Platform SDK: Network Management

NetReplExportDirSetInfo

The NetReplExportDirSetInfo function modifies the control information of a replicated export directory.

Security Requirements

Only members of the Administrators local group or the Account Operators local group can successfully execute the NetReplExportDirSetInfo function.

NET_API_STATUS NetReplExportDirSetInfo(
  LPCWSTR servername, 
  LPCWSTR dirname,    
  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.
dirname
[in] Pointer to a constant null-terminated Unicode string specifying the export directory to return control information about.
level
[in] Specifies the information level of the data. This parameter can be one of the following values.
Value Meaning
1 Specifies the export subdirectory name and attributes. The buf parameter points to a REPL_EDIR_INFO_1 structure.
1000 Specifies a value for the integrity replication control. The buf parameter points to a REPL_EDIR_INFO_1000 structure.
1001 Specifies a value for the extent replication control. The buf parameter points to a REPL_EDIR_INFO_1001 structure.

For a description of the integrity and extent replication controls, see replicator functions.

buf
[in] Pointer to the 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 the index of the first parameter error when the function returns an 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

To modify the current lock count on an export subdirectory you must call the NetReplExportDirLock function or the NetReplExportDirUnlock function. You cannot change the lock count with a call to the NetReplExportDirSetInfo function.

To retrieve the control information for an export directory, call NetReplExportDirGetInfo.

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.

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, NetReplExportDirGetInfo, REPL_EDIR_INFO_0, REPL_EDIR_INFO_1000, REPL_EDIR_INFO_1001