MSHTML: Always add gecko directory to the path before loading xpcom
Jacek Caban
jack at itma.pwr.wroc.pl
Sun Aug 21 12:27:17 CDT 2005
This patch fixes loading gecko in some configurations.
Changelog:
Always add gecko directory to the path before loading xpcom
-------------- next part --------------
Index: dlls/mshtml/nsembed.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/nsembed.c,v
retrieving revision 1.5
diff -u -p -r1.5 nsembed.c
--- dlls/mshtml/nsembed.c 11 Aug 2005 18:36:48 -0000 1.5
+++ dlls/mshtml/nsembed.c 21 Aug 2005 15:22:30 -0000
@@ -195,24 +195,21 @@ static BOOL load_gecko()
TRACE("found path %s\n", debugstr_w(gre_path));
- hXPCOM = LoadLibraryW(strXPCOM);
- if(!hXPCOM) {
- /* We have to modify PATH as XPCOM loads other DLLs from this directory. */
- WCHAR path_env[MAX_PATH];
- static WCHAR wszPATH[] = {'P','A','T','H',0};
- int len;
+ /* We have to modify PATH as XPCOM loads other DLLs from this directory. */
+ WCHAR path_env[MAX_PATH];
+ static WCHAR wszPATH[] = {'P','A','T','H',0};
+ int len;
- GetEnvironmentVariableW(wszPATH, path_env, sizeof(path_env)/sizeof(WCHAR));
- len = strlenW(path_env);
- path_env[len++] = ';';
- strcpyW(path_env+len, gre_path);
- SetEnvironmentVariableW(wszPATH, path_env);
+ GetEnvironmentVariableW(wszPATH, path_env, sizeof(path_env)/sizeof(WCHAR));
+ len = strlenW(path_env);
+ path_env[len++] = ';';
+ strcpyW(path_env+len, gre_path);
+ SetEnvironmentVariableW(wszPATH, path_env);
- hXPCOM = LoadLibraryW(strXPCOM);
- if(!hXPCOM) {
- ERR("Could not load XPCOM: %ld\n", GetLastError());
- return FALSE;
- }
+ hXPCOM = LoadLibraryW(strXPCOM);
+ if(!hXPCOM) {
+ ERR("Could not load XPCOM: %ld\n", GetLastError());
+ return FALSE;
}
#define NS_DLSYM(func) \
More information about the wine-patches
mailing list