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 |
|
|
DLL |
|
See also