Thanks Cody and Mattias:
What I did was roll my own compare class that called the StrCmpLogicalW
function. Unfortunately this limits my users to XP only since it's not
available on 2000.
I need to check for string nulls but below is a code fragment to sort file
names as in the XP File Explorer:
Declare Unicode Function StrLogicalComparer Lib "shlwapi.dll" _
Alias "StrCmpLogicalW" (ByVal str1 As String, ByVal str2 As String) As
Integer
Public Class StrLogicalComparerClass
Implements IComparer
Function Compare(ByVal x As [Object], ByVal y As [Object]) As
Integer _
Implements IComparer.Compare
Dim text1, text2 As String
text1 = CStr(x)
text2 = CStr(y)
Return StrLogicalComparer(text1, text2)
End Function 'IComparer.Compare
End Class 'StrLogicalComparerClass
"Mattias Sjögren" wrote:
> >What I’m looking for is the class/api that performs the same sort by name as
> >in the XP File Explorer.
>
> StrCmpLogical
>
> http://msdn.microsoft.com/library/en...mplogicalw.asp
>
>
>
> Mattias
>
> --
> Mattias Sjögren [MVP] mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
>