IShellFolder::CompareIDs  JO6GN4

[Now Supported on Windows NT]

Determines the relative ordering of two file objects or folders, given their item identifier lists.

HRESULT CompareIDs(

    LPARAM lParam,

// Type of comparison to perform

    LPCITEMIDLIST pidl1,

// Address of ITEMIDLIST structure

    LPCITEMIDLIST pidl2

// Address of ITEMIDLIST structure

   );

 

 

Parameters

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 two ITEMIDLIST16GUB2N structures that uniquely identify the items to be compared. Both item identifier lists are relative to the parent folder.

 

Return Values

Returns a handle to a result code. If this method is successful, the CODE field of the status code (SCODE) has the following meaning:

CODE field

Meaning

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).

 

Remarks

Passing 0 as the lParam indicates sort by name. 0x00000001-0x7fffffff are for folder specific sorting rules. 0x80000000-0xfffffff are used the system.

See Also

IShellFolder, ITEMIDLIST