IWMCLibraries::Add
![]() |
This functionality is expected to be available in Windows Media Player for the next version of Microsoft Windows. At that time, this SDK will be deprecated.
The Add method adds a shared Library and notifies the Content Directory Service to being scanning the new library.
Syntax
HRESULT Add(
BSTR Name,
BSTR Path,
VARIANT_BOOL AlwaysAvailable
);
Parameters
Name
[in] BSTR containing the name of the Library.
Path
[in] BSTR containing the path to the directory that contains the files to share for this library.
AlwaysAvailable
[in] VARIANT_BOOL indicating whether the shared library is always available or only available when you are logged on.
Return Values
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
| S_OK | The method succeeded. |
Remarks
The name and path must be unique for any given user. Otherwise Add will fail with the HRESULT_FROM_WIN32(ERROR_BAD_ARGUMENTS) error. Different users can share the same path with the same name or different names. There is no requirement for shares to be unique across all users.
Requirements
Library: wmcsci.dll.
Platform: Windows XP Home Edition Service Pack 2 (SP2), Windows XP Professional SP2, Windows XP Media Center Edition SP2, or Windows XP Tablet PC Edition SP2.
See Also
.gif)