3.2.5.4.4 SchRpcCreateFolder (Opnum 3)

The SchRpcCreateFolder method creates a new folder.

 HRESULT SchRpcCreateFolder(
   [in, string] const wchar_t* path,
   [in, string, unique] const wchar_t* sddl,
   [in] DWORD flags
 );

path: MUST contain the full path to be associated with a folder (section 2.3.11).

sddl: If non-NULL, MUST be a security descriptor in SDDL format as specified in [MS-DTYP].

flags: Unused, MUST be 0.

Return Values: For more information on return codes, see section 2.3.14, or Win32 Error Codes in [MS-ERREF] section 2.1.

Upon receipt of the SchRpcCreateFolder call, the server MUST:

  • Return E_INVALIDARG if the path parameter is the root or if the flags parameter is nonzero.

  • Return E_ACCESSDENIED if the caller does not have access to create subfolders in the deepest existing folder specified in the path parameter.<70>

  • Create deeper subfolders in the task store for the path using the security descriptor specified in the sddl parameter [MS-DTYP]. If the sddl parameter is NULL, use the security descriptor of the deepest existing folder in the path parameter.

  • Return S_OK.

If any errors are raised during the processing they are returned. For more information on return codes, see section 2.3.14 and Win32 Error Codes in [MS-ERREF] section 2.1.