IActiveDesktop::GetDesktopItem method

Gets the specified desktop item.

Syntax


HRESULT GetDesktopItem(
            int         nComponent,
  [in, out] LPCOMPONENT pcomp,
            DWORD       dwReserved
);

Parameters

nComponent

Type: int

An unsigned long integer value that contains the desktop item's index. The index values start at zero. Use IActiveDesktop::GetDesktopItemCount to retrieve a count on the total number of desktop items.

pcomp [in, out]

Type: LPCOMPONENT

The address of the COMPONENT structure of the retrieved desktop item.

dwReserved

Type: DWORD

Reserved. Must be set to zero.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The index values will change as desktop items are added and removed from the Active Desktop. Applications cannot assume that an index value will always be associated with a particular desktop item.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlobj.h

DLL

Shell32.dll (version 4.71 or later)

See also

IActiveDesktop

 

 

Show: