3.4.4.5 CprepCreateNewSmbShares3 (Opnum 7)

The CprepCreateNewSmbShares3 method retrieves the list of IP addresses, with \\ prepended. This method can be used to access a share via an implementation-specific mechanism.

The output strings have the form

  • \\<IPv4 address> 

or

  • \\[<IPv6 address>].

     HRESULT CprepCreateNewSmbShares3(
       [out, string, size_is(,*pdwNumberOfPaths)] 
         LPWSTR** ppwszSharePaths,
       [out] DWORD* pdwNumberOfPaths
     );
    

ppwszSharePaths: On successful return, specifies the address of a pointer to a *pdwNumberOfPaths-sized block of LPWSTRs. The server allocates and initializes the returned buffer. Callers MUST free this memory when they are finished with it.

pdwNumberOfPaths: The number of file share path names returned in ppwszSharePaths.

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it has failed. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF] sections 2.2 and 2.1.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].

The opnum field value for this method is 7.

When processing this call, the server MUST do the following:

  • Construct or retrieve one or more IP addresses that are prepended with \\, for the server, that allow access to shares on that server represented by ClusPrepShares in the ClusPrepShareList, via an implementation-specific mechanism.

  • Allocate a buffer, and copy the list of IP address strings to the buffer. Each IP address string MUST have at least one NULL terminator character appended to the file share path name string.

  • Initialize pdwNumberOfPaths to the number of BYTEs being returned.

The client is responsible for freeing the returned memory allocation.