IMLCore::GetDataSources (Compact 7)
3/12/2014
This method returns the names and IDs of the data sources connected to the Media Library.
Syntax
HRESULT GetDataSources(
BOOL fForceRefresh,
USHORT *pcDataSources,
MLDataSource **prgDataSources
);
Parameters
- fForceRefresh
[in] Forces a refresh of the specified data source plug-in modules.
- pcDataSources
[in] Pointer to the number of data sources in the prgDataSources parameter.
- prgDataSources
[out] Pointer to the array of MLDataSource structures containing the data sources. This array must be freed by the caller.
Return Values
Returns the HRESULT values shown in the following table.
Value | Description |
---|---|
S_OK |
The method was successful. |
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_MEMORY |
An out of memory error occurred. |
Remarks
The array of MLDataSource structures returned from this method must be released by the caller. To free the memory allocated for the array, call CoTaskMemFree with a pointer to the data source array. The BSTR members of each MLDataSource structures must also be released by calling SysFreeString.
Requirements
Header |
mlibdll.h, |
Library |
mlibdll.lib |