Contents Index Topic Contents | ||
Previous Topic: IShellFolder::BindToStorage Next Topic: IShellFolder::CreateViewObject |
IShellFolder::CompareIDs
HRESULT CompareIDs( LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2 );Determines the relative order of two file objects or folders, given their item identifier lists.
- If this method is successful, the CODE field of the status code (SCODE) contains one of the following values:
Less than zero The first item should precede the second (pidl1 < pidl2). Greater than zero The first item should follow the second (pidl1 > pidl2). Zero The two items are the same (pidl1 = pidl2). If this method is unsuccessful, it returns an OLE-defined error code.
- lParam
- Value specifying the type of comparison to perform. The calling application should always specify zero, indicating that the two items should be sorted by name.
- pidl1 and pidl2
- Addresses of ITEMIDLIST structures that uniquely identify the items to compare. Both item identifier lists are relative to this folder. These ITEMIDLIST structures may contain more than one element; therefore, the entire ITEMIDLIST must be compared and not just the first element.
Passing zero for lParam indicates a sort by name. Values ranging from 0x00000001 to 0x7fffffff are for folder-specific sorting rules, while values ranging from 0x80000000 to 0xfffffff are used for system-specific rules.
See also IShellFolder
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.