952{
953
961
962 if (ppmkPrefix==
NULL)
964
967
968 *ppmkPrefix=0;
969
970
971 IMoniker_IsSystemMoniker(pmkOther,&mkSys);
972 if (mkSys != MKSYS_FILEMONIKER)
974
978
979
980 ret = IMoniker_GetDisplayName(iface, bindctx,
NULL, &pathThis);
982 goto failed;
983
984 ret = IMoniker_GetDisplayName(pmkOther, bindctx,
NULL, &pathOther);
986 goto failed;
987
991 goto failed;
992 }
993
997 goto failed;
998 }
999
1000 if (nb1 == 0 || nb2 == 0) {
1002 goto failed;
1003 }
1004
1006 if (!commonPath) {
1008 goto failed;
1009 }
1010
1011 *commonPath = 0;
1012 for(sameIdx=0; ( (stringTable1[sameIdx]!=
NULL) &&
1013 (stringTable2[sameIdx]!=
NULL) &&
1014 (
lstrcmpiW(stringTable1[sameIdx],stringTable2[sameIdx])==0)); sameIdx++);
1015
1016 if (sameIdx > 1 && *stringTable1[0]=='\\' && *stringTable2[1]=='\\'){
1017 machineNameCase =
TRUE;
1018
1019 for(
i=2;
i<sameIdx;
i++)
1020 if( (*stringTable1[
i]==
'\\') && (
i+1 < sameIdx) && (*stringTable1[
i+1]==
'\\') ){
1021 machineNameCase =
FALSE;
1022 break;
1023 }
1024 }
1025
1026 if (machineNameCase && *stringTable1[sameIdx-1]=='\\')
1027 sameIdx--;
1028
1029 if (machineNameCase && (sameIdx<=3) && (nb1 > 3 || nb2 > 3) )
1031 else
1032 {
1033 for (
i = 0;
i < sameIdx;
i++)
1036 }
1037
1038failed:
1039 IBindCtx_Release(bindctx);
1045
1047}
HRESULT WINAPI MonikerCommonPrefixWith(IMoniker *pmkThis, IMoniker *pmkOther, IMoniker **ppmkCommon)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
static int FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR **stringTable)
static void free_stringtable(LPOLESTR *stringTable)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI CoTaskMemFree(void *ptr)
HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)