mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[RAPPS]
Close downloaded application before attempting to execute it. CORE-8134 #resolve svn path=/trunk/; revision=63085
This commit is contained in:
parent
3d22f7e832
commit
9282f9855e
1 changed files with 5 additions and 2 deletions
|
@ -217,7 +217,7 @@ ThreadFunc(LPVOID Context)
|
||||||
BOOL bCab = FALSE;
|
BOOL bCab = FALSE;
|
||||||
HINTERNET hOpen = NULL;
|
HINTERNET hOpen = NULL;
|
||||||
HINTERNET hFile = NULL;
|
HINTERNET hFile = NULL;
|
||||||
HANDLE hOut = NULL;
|
HANDLE hOut = INVALID_HANDLE_VALUE;
|
||||||
unsigned char lpBuffer[4096];
|
unsigned char lpBuffer[4096];
|
||||||
const LPWSTR lpszAgent = L"RApps/1.0";
|
const LPWSTR lpszAgent = L"RApps/1.0";
|
||||||
|
|
||||||
|
@ -284,6 +284,9 @@ ThreadFunc(LPVOID Context)
|
||||||
}
|
}
|
||||||
while (dwBytesRead);
|
while (dwBytesRead);
|
||||||
|
|
||||||
|
CloseHandle(hOut);
|
||||||
|
hOut = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
if (bCancelled) goto end;
|
if (bCancelled) goto end;
|
||||||
|
|
||||||
ShowWindow(Dlg, SW_HIDE);
|
ShowWindow(Dlg, SW_HIDE);
|
||||||
|
@ -294,7 +297,7 @@ ThreadFunc(LPVOID Context)
|
||||||
ShellExecuteW( NULL, L"open", path, NULL, NULL, SW_SHOWNORMAL );
|
ShellExecuteW( NULL, L"open", path, NULL, NULL, SW_SHOWNORMAL );
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
CloseHandle(hOut);
|
if (hOut != INVALID_HANDLE_VALUE) CloseHandle(hOut);
|
||||||
InternetCloseHandle(hFile);
|
InternetCloseHandle(hFile);
|
||||||
InternetCloseHandle(hOpen);
|
InternetCloseHandle(hOpen);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue