January 1, 2005

WinTask - PathCommonPrefix

' PathCommonPrefix -
'
' Author: Joe Strazzere
'

'PathCommonPrefix(pszFile1, pszFile2, pszPath);

dim ptr as unsigned

a$="c:\testdir\more\test.exe"
b$="c:\testdir\more\unique\test.doc"
c$=" "
ptr=External("shlwapi.dll","PathCommonPrefixA",a$,b$,c$)
msgbox("The common part of the path is "+c$,,"PathCommonPrefix")