Print a large failure message if we try to load stdole32.tlb and

fail.
This commit is contained in:
Marcus Meissner 2003-01-21 19:29:33 +00:00 committed by Alexandre Julliard
parent 91d4f41e6e
commit 0df0304048
1 changed files with 23 additions and 2 deletions

View File

@ -284,8 +284,8 @@ HRESULT WINAPI LoadTypeLibEx(
WCHAR *pIndexStr;
HRESULT res;
INT index = 1;
TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib);
TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib);
if(!SearchPathW(NULL,szFile,NULL,sizeof(szPath)/sizeof(WCHAR),szPath,
NULL)) {
@ -301,8 +301,29 @@ HRESULT WINAPI LoadTypeLibEx(
return TYPE_E_CANTLOADLIBRARY;
if (GetFileAttributesW(szFileCopy) & FILE_ATTRIBUTE_DIRECTORY)
return TYPE_E_CANTLOADLIBRARY;
} else
} else {
WCHAR tstpath[260];
WCHAR stdole32tlb[] = { 's','t','d','o','l','e','3','2','.','t','l','b',0 };
int i;
lstrcpyW(tstpath,szFile);
CharLowerW(tstpath);
for (i=0;i<strlenW(tstpath);i++) {
if (tstpath[i] == 's') {
if (!strcmpW(tstpath+i,stdole32tlb)) {
MESSAGE("\n");
MESSAGE("**************************************************************************\n");
MESSAGE("You must copy a 'stdole32.tlb' file to your Windows\\System directory!\n");
MESSAGE("You can get one from a Windows installation, or look for the DCOM95 package\n");
MESSAGE("on the Microsoft Download Pages.\n");
MESSAGE("**************************************************************************\n");
break;
}
}
}
FIXME("Wanted to load %s as typelib, but file was not found.\n",debugstr_w(szFile));
return TYPE_E_CANTLOADLIBRARY;
}
}
TRACE("File %s index %d\n", debugstr_w(szPath), index);