Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 325903
Collapse All | Expand All

(-)library/eclipse.c (+20 lines)
Lines 332-337 Link Here
332
332
333
#ifdef _WIN32
333
#ifdef _WIN32
334
static void     createConsole();
334
static void     createConsole();
335
static void 	fixDLLSearchPath();
335
#endif
336
#endif
336
337
337
/* Record the arguments that were used to start the original executable */
338
/* Record the arguments that were used to start the original executable */
Lines 370-375 Link Here
370
   	 * it now.
371
   	 * it now.
371
   	 */
372
   	 */
372
    initWindowSystem( &argc, argv, !noSplash );
373
    initWindowSystem( &argc, argv, !noSplash );
374
#elif _WIN32
375
    /* fix the DLL search path for security reasons  */
376
    fixDLLSearchPath();
373
#endif
377
#endif
374
    
378
    
375
    /* Find the directory where the Eclipse program is installed. */
379
    /* Find the directory where the Eclipse program is installed. */
Lines 1186-1191 Link Here
1186
		*stderr = *fp;
1190
		*stderr = *fp;
1187
	}
1191
	}
1188
}
1192
}
1193
1194
static void fixDLLSearchPath() {
1195
#ifdef UNICODE
1196
	_TCHAR* functionName = _T_ECLIPSE("SetDllDirectoryW");
1197
#else
1198
	_TCHAR* functionName = _T_ECLIPSE("SetDllDirectoryA");
1199
#endif
1200
1201
	BOOL (WINAPI *SetDLLDirectory)(LPCTSTR);
1202
	void * handle = loadLibrary(_T_ECLIPSE("Kernel32.dll"));
1203
	if (handle != NULL) {
1204
		if ( (SetDLLDirectory = findSymbol(handle, functionName)) != NULL) {
1205
			SetDLLDirectory(_T_ECLIPSE(""));
1206
		}
1207
	}
1208
}
1189
#endif
1209
#endif
1190
1210
1191
/*
1211
/*

Return to bug 325903