Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

Gets a list of the widgets that are currently installed on the device.

Syntax

HRESULT GetInstalledWidgetsList(
  LPWIDGETSUMMARY* 
lpWidgetList,
  UINT* 
lpcWidgetCount
);

Parameters

lpWidgetList

[out] A pointer to an array of WIDGETSUMMARY structures, each one representing an installed widget. The memory for this array is allocated by this function and must be freed by the caller using LocalFree().

lpWidgetCount

[out] An unsigned integer representing the number of widgets installed on the device as well as the size of the lplWidgetListarray.

Return Value

This function can return one of the following values.

Value Description

S_OK

The widget list was successfully retrieved.

S_FALSE

The widget list was empty.

E_INVALIDARG

The parameters are invalid.

E_OUTOFMEMORY

There is not enough memory available for the widget list.

E_UNEXPECTED

The enumeration procedure failed.

E_FAIL

The widget list was not retrieved.

Remarks

This function allocates memory for the all of the WIDGETSUMMARY structures in one contiguous block. The caller is responsible for freeing this memory.