Share via


3.1.4.22.1 CreateShare (Opnum 3)

 This method is called by a replication client application to create a Common Internet File System (CIFS) [MS-CIFS] file share for copying installer package files.

 HRESULT CreateShare(
   [in] LPCWSTR pwszShareName,
   [in] LPCWSTR pwszPath
 );

pwszShareName: The share name (as specified for a path in UNC syntax) of the file share to create. This MUST be a SourceShareName or TargetNewShareName, according to the following ABNF syntax, as specified in [RFC4234].

 SourceShareName = "ReplicaSource" CurlyBracedGuidString
 TargetNewShareName = "ReplicaTargetNew" CurlyBracedGuidString

Where CurlyBracedGuidString is in Curly Braced GUID String Syntax ([MS-DTYP] section 2.3.4.3).

These formats have the following usage.

Format

Usage

SourceShareName

Used when the server is a replication source.

TargetNewShareName

Used when the server is a replication target.

pwszPath: An ImplementationSpecificPathProperty (section 2.2.2.2) representing the path to the directory that is to back the file share. This MUST be derived from the server's base replication directory path by appending one of the following strings.

Value

Meaning

"\ReplicaSource"

 The server is a replication source.

"\ReplicaNew"

 The server is a replication target.

Return Values: This method MUST return S_OK (0x00000000) on success, and a failure result, as specified in [MS-ERREF] section 2.1, on failure. All failure results MUST be treated identically.

Upon receiving a call to this method, the server MAY verify that pwszShareName and pwszPath are valid, and fail the call if they are not valid.

The server then MUST verify that the directory represented by pwszPath exists, and fail the call if does not exist.

The server then MUST attempt to create a CIFS file share with the provided name and back it by the directory represented by pwszPath, ensuring that the COMA client's user identity is granted read and write access, and fail the call if it cannot.

 The server MUST then return success.