3.1.4.3.6.2 Enumerate All Subfolders in a Folder

To enumerate all subfolders in a folder, the client MUST invoke the SchRpcEnumFolders method with the following parameters:

  • The path of the folder in the path parameter.

  • Zero in the flags parameter.

  • The location of the starting index of the enumeration in the pStartIndex parameter.

  • The number of names to be returned in the cRequested parameter.

  • A pointer to a DWORD to receive the number of names returned in the pcNames parameter.

  • A pointer to a buffer to receive the array of names in the pNames parameter.

The client MUST deallocate the pNames after successful execution of the method, as specified in [C706] section 5.1.1.1.

If the SchRpcEnumFolders method returns S_FALSE, the client MUST continue to invoke SchRpcEnumFolders until a call to SchRpcEnumFolders returns S_OK. In subsequent calls to SchRpcEnumFolders, the client MUST pass the parameter values as specified earlier, except the client MUST NOT modify the pStartIndex parameter because the previous call to SchRpcEnumFolders returned the index of the next folder to be enumerated.