IActiveDesktop::AddUrl method
Adds the desktop item associated with the specified URL.
Syntax
HRESULT AddUrl( [in, optional] HWND hwnd, [in] PCWSTR pszSource, [in] LPCOMPONENT pcomp, DWORD dwFlags );
Parameters
- hwnd [in, optional]
-
Type: HWND
A handle to the parent window for the user interface.
- pszSource [in]
-
Type: PCWSTR
A pointer to a string that contains the URL of the desktop item.
- pcomp [in]
-
Type: LPCOMPONENT
A pointer to the COMPONENT structure that contains the details of the desktop item to be added.
- dwFlags
-
Type: DWORD
An unsigned long integer value that controls this method. Can be set to ADDURL_SILENT to add a desktop item without displaying any user interfaces.
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. |
|
If the ADDURL_SILENT flag has been set, the desktop item has either been added successfully or it already exists on the Active Desktop. Otherwise, the desktop item has been added succesfully. |
Remarks
By default, this method will display some user interface and then add the desktop item to the Active Desktop. Like IActiveDesktop::AddDesktopItem, the client application must call IActiveDesktop::ApplyChanges to have the changes saved to 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