mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:45:43 +00:00
Process window messages while the (un)installer is running and disable it
svn path=/trunk/; revision=29765
This commit is contained in:
parent
e474c7c74f
commit
05e20948eb
1 changed files with 23 additions and 4 deletions
|
@ -106,10 +106,11 @@ CallUninstall(HWND hwndDlg, UINT Control, UINT RemBtn, UINT InfoBtn, BOOL isUpda
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
INT nIndex;
|
INT nIndex;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
DWORD dwType;
|
DWORD dwType, dwRet;
|
||||||
TCHAR pszUninstallString[MAX_PATH];
|
TCHAR pszUninstallString[MAX_PATH];
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
TCHAR Buf[256],Title[256];
|
TCHAR Buf[256],Title[256];
|
||||||
|
MSG msg;
|
||||||
|
|
||||||
nIndex = (INT)SendMessage(GetDlgItem(hwndDlg, Control),LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
|
nIndex = (INT)SendMessage(GetDlgItem(hwndDlg, Control),LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
|
||||||
if (nIndex != -1)
|
if (nIndex != -1)
|
||||||
|
@ -136,10 +137,28 @@ CallUninstall(HWND hwndDlg, UINT Control, UINT RemBtn, UINT InfoBtn, BOOL isUpda
|
||||||
si.wShowWindow = SW_SHOW;
|
si.wShowWindow = SW_SHOW;
|
||||||
if (CreateProcess(NULL,pszUninstallString,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi))
|
if (CreateProcess(NULL,pszUninstallString,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi))
|
||||||
{
|
{
|
||||||
ButtonStatus(hwndDlg, FALSE, RemBtn, InfoBtn);
|
|
||||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
|
||||||
CloseHandle(pi.hProcess);
|
|
||||||
CloseHandle(pi.hThread);
|
CloseHandle(pi.hThread);
|
||||||
|
EnableWindow(GetParent(hwndDlg), FALSE);
|
||||||
|
ButtonStatus(hwndDlg, FALSE, RemBtn, InfoBtn);
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
dwRet = MsgWaitForMultipleObjects(1, &pi.hProcess, FALSE, INFINITE, QS_ALLEVENTS);
|
||||||
|
if (dwRet == WAIT_OBJECT_0 + 1)
|
||||||
|
{
|
||||||
|
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
|
{
|
||||||
|
TranslateMessage(&msg);
|
||||||
|
DispatchMessage(&msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (dwRet == WAIT_OBJECT_0 || dwRet == WAIT_FAILED)
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
CloseHandle(pi.hProcess);
|
||||||
|
EnableWindow(GetParent(hwndDlg), TRUE);
|
||||||
|
|
||||||
// Update software list
|
// Update software list
|
||||||
(void)ListView_DeleteAllItems(GetDlgItem(hwndDlg, Control));
|
(void)ListView_DeleteAllItems(GetDlgItem(hwndDlg, Control));
|
||||||
FillSoftwareList(hwndDlg, isUpdate, Control);
|
FillSoftwareList(hwndDlg, isUpdate, Control);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue