PATCH: warn if missing stdole32.tlb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Ciao, Marcus

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

Index: dlls/oleaut32/typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.88
diff -u -u -r1.88 typelib.c
--- dlls/oleaut32/typelib.c	11 Jan 2003 20:58:35 -0000	1.88
+++ dlls/oleaut32/typelib.c	21 Jan 2003 07:42:10 -0000
@@ -284,8 +284,8 @@
     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 @@
 	        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);


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux