Platform SDK: Network Management

NetReplImportDirGetInfo

The NetReplImportDirGetInfo function retrieves status information for a replicated directory on an import server.

Security Requirements

No special group membership is required to successfully execute the NetReplImportDirGetInfo function.

NET_API_STATUS NetReplImportDirGetInfo(
  LPCWSTR servername,  
  LPCWSTR dirname,     
  DWORD level,         
  LPBYTE *bufptr       
);

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 directory name about which to return control information.
level
[in] Specifies the information level of the data. This parameter can be one of the following values.
Value Meaning
0 Return the import subdirectory name. The bufptr parameter points to a REPL_IDIR_INFO_0 structure.
1 Return the import subdirectory name, status, and locking information. The bufptr parameter points to a REPL_IDIR_INFO_1 structure.

bufptr
[out] Pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter. This buffer is allocated by the system and must be freed using the NetApiBufferFree function.

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 status information for a directory consists of its replication state, the UNC computer name of the master, and the time (in seconds since 00:00:00, January 1, 1970, GMT) when the directory was last updated. For a complete description of this information, see REPL_IDIR_INFO_1.

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, NetReplImportDirEnum, REPL_IDIR_INFO_0, REPL_IDIR_INFO_1