Share via


IMLDSPlugin::GetDataSources (Compact 7)

3/12/2014

This method is implemented by the data source plug-in to return the number of attached data sources connected to the Media Library.

Syntax

HRESULT GetDataSources(
  BOOL fForceRefresh,
  USHORT *pcDataSources,
  MLDataSource **prgDataSources
);

Parameters

  • fForceRefresh
    [in] Forces a refresh of the connected data sources and is used to instruct the data source to clear any previously cached list of connected data sources.
  • pcDataSources
    [out] Pointer to the returned number of MLDataSource structures in the prgDataSources array.
  • prgDataSources
    [out] Pointer to an array of MLDataSource structures that contain the data sources for the plug-in. To free memory, your application must call SysFreeString on the internal BSTR values returned in this array of MLDataSource structures and you must also call CoTaskMemFree on the array itself.

Return Values

Returns an HRESULT value. Possible values include the following.

Value Description

S_OK

Method succeeded.

E_INVALIDARG

One or more parameters are invalid.

E_POINTER

The pcDataSources or the prgDataSources parameter is invalid.

E_FAIL

The method was not successful.

E_OUTOFMEMORY

Exceeded available memory.

Remarks

The full list of all collected data sources in the Media Library is returned by the IMLCore::GetDataSources method.

The Digital Living Network Alliance (DLNA) data source plug-in can return multiple MLDataSource structures, with one structure per discovered DLNA Digital Media Server. If the fForceRefresh flag is set to TRUE, then the DLNA plug-in will refresh its internal list of attached devices by enumerating the local network.

Requirements

Header

mlibdll_plugin.h,
mlibdll_plugin.idl

Library

mlibdll.lib

See Also

Reference

IMLDSPlugin