Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

SHGetItemFromObject function

Retrieves an IShellItem for an object.

Syntax


HRESULT SHGetItemFromObject(
  _In_  IUnknown *punk,
  _In_  REFIID   riid,
  _Out_ void     **ppv
);

Parameters

punk [in]

Type: IUnknown*

A pointer to the IUnknown of the object.

riid [in]

Type: REFIID

Reference to the desired IID.

ppv [out]

Type: void**

When this method returns, contains the interface pointer requested in riid. This is typically IShellItem or a related interface.

Return value

Type: HRESULT

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

Remarks

From the standpoint of performance, this method is preferred to SHGetIDListFromObject in those cases where the IDList is already bound to a folder.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

DLL

Shell32.dll

See also

SHCreateItemFromIDList
SHGetIDListFromObject

 

 

Community Additions

ADD
Show:
© 2015 Microsoft