IActiveDesktop::AddDesktopItem method
Adds a desktop item.
Syntax
HRESULT AddDesktopItem(
[in] LPCCOMPONENT pcomp,
DWORD dwReserved
);
Parameters
- pcomp [in]
-
Type: LPCCOMPONENT
A pointer to the COMPONENT structure that specifies the item to be added.
- dwReserved
-
Type: DWORD
Reserved. Must be set to zero.
Return value
Type: HRESULT
Returns one of the following values.
| Return code | Description |
|---|---|
|
Failed to add the desktop item, or an instance of the desktop item already exists on the Active Desktop. |
|
One or more of the parameters were invalid. |
|
Desktop item has been added succesfully. |
Remarks
The desktop item is added to the desktop, but it does not save it to the registry. The client application must call IActiveDesktop::ApplyChanges separately to update the registry.
Requirements
|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
DLL |
|
See also
Show: