зеркало из https://github.com/mozilla/gecko-dev.git
fixing bug 88880 - Launching Setup via a CD autorun causes dll error. r=sgehani sr=syd. affects only windows platforms
This commit is contained in:
Родитель
b40cca5635
Коммит
d2c5c26e40
|
@ -549,6 +549,7 @@ void ClearWinRegUninstallFileDeletion(void)
|
||||||
HRESULT Initialize(HINSTANCE hInstance)
|
HRESULT Initialize(HINSTANCE hInstance)
|
||||||
{
|
{
|
||||||
char szBuf[MAX_BUF];
|
char szBuf[MAX_BUF];
|
||||||
|
char szCurrentProcessDir[MAX_BUF];
|
||||||
|
|
||||||
bSDUserCanceled = FALSE;
|
bSDUserCanceled = FALSE;
|
||||||
hDlgMessage = NULL;
|
hDlgMessage = NULL;
|
||||||
|
@ -563,15 +564,18 @@ HRESULT Initialize(HINSTANCE hInstance)
|
||||||
if(NS_LoadStringAlloc(hInstance, IDS_ERROR_STRING_NULL, &szEStringNull, MAX_BUF))
|
if(NS_LoadStringAlloc(hInstance, IDS_ERROR_STRING_NULL, &szEStringNull, MAX_BUF))
|
||||||
return(1);
|
return(1);
|
||||||
|
|
||||||
|
GetModuleFileName(NULL, szBuf, sizeof(szBuf));
|
||||||
|
ParsePath(szBuf, szCurrentProcessDir,
|
||||||
|
sizeof(szCurrentProcessDir),
|
||||||
|
FALSE,
|
||||||
|
PP_PATH_ONLY);
|
||||||
hAccelTable = LoadAccelerators(hInstance, CLASS_NAME_SETUP_DLG);
|
hAccelTable = LoadAccelerators(hInstance, CLASS_NAME_SETUP_DLG);
|
||||||
|
|
||||||
if((hSetupRscInst = LoadLibraryEx("Setuprsc.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) == NULL)
|
if((hSetupRscInst = LoadLibraryEx("Setuprsc.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) == NULL)
|
||||||
{
|
{
|
||||||
char szFullFilename[MAX_BUF];
|
char szFullFilename[MAX_BUF];
|
||||||
|
|
||||||
GetModuleFileName(NULL, szBuf, sizeof(szBuf));
|
lstrcpy(szFullFilename, szCurrentProcessDir);
|
||||||
ParsePath(szBuf, szFullFilename,
|
|
||||||
sizeof(szFullFilename), FALSE, PP_PATH_ONLY);
|
|
||||||
AppendBackSlash(szFullFilename, sizeof(szFullFilename));
|
AppendBackSlash(szFullFilename, sizeof(szFullFilename));
|
||||||
lstrcat(szFullFilename, "Setuprsc.dll");
|
lstrcat(szFullFilename, "Setuprsc.dll");
|
||||||
if((hSetupRscInst = LoadLibraryEx(szFullFilename, NULL, 0)) == NULL)
|
if((hSetupRscInst = LoadLibraryEx(szFullFilename, NULL, 0)) == NULL)
|
||||||
|
@ -595,7 +599,7 @@ HRESULT Initialize(HINSTANCE hInstance)
|
||||||
|
|
||||||
if((szSetupDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
if((szSetupDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||||
return(1);
|
return(1);
|
||||||
GetCurrentDirectory(MAX_BUF, szSetupDir);
|
lstrcpy(szSetupDir, szCurrentProcessDir);
|
||||||
|
|
||||||
if((szTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
if((szTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||||
return(1);
|
return(1);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче