[UpdateObject is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
Replaces an item in a view with another item.
HRESULT UpdateObject( [in] PUITEMID_CHILD pidlOld, [in] PUITEMID_CHILD pidlNew, [out] UINT *puItem );
- pidlOld [in]
The original item.
- pidlNew [in]
The new item.
- puItem [out]
When this method returns, contains a pointer to the index of the item that was replaced. You can use this value to call IShellFolderView::GetObject on later to get back the PITEMID_CHILD that you just added.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
If you immediately call IShellFolderView::GetObject with the index returned by puItem, you will get a copy of the ITEMID_CHILD that you added. However, the index position of an item may change over time, so code cannot trust that any specific index always returns the same ITEMID_CHILD.
Changes made through this method can be discarded in the view by the data source at any time.
Minimum supported client
|Windows XP [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|
End of client support
End of server support
|Windows Server 2008|