mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 04:23:32 +00:00
release mozctl_install_semaphore semaphore when the user doesn't want to download the mozilla control
svn path=/trunk/; revision=20881
This commit is contained in:
parent
1eafbf2c6b
commit
e592a21cc6
1 changed files with 8 additions and 6 deletions
|
@ -406,6 +406,7 @@ static BOOL SHDOCVW_TryDownloadMozillaControl(void)
|
||||||
WCHAR buf[0x100];
|
WCHAR buf[0x100];
|
||||||
static const WCHAR szTitle[] = { 'R','e','a','c','t','O','S',0 };
|
static const WCHAR szTitle[] = { 'R','e','a','c','t','O','S',0 };
|
||||||
HANDLE hsem;
|
HANDLE hsem;
|
||||||
|
BOOL ret = TRUE;
|
||||||
|
|
||||||
SetLastError( ERROR_SUCCESS );
|
SetLastError( ERROR_SUCCESS );
|
||||||
hsem = CreateSemaphoreA( NULL, 0, 1, "mozctl_install_semaphore");
|
hsem = CreateSemaphoreA( NULL, 0, 1, "mozctl_install_semaphore");
|
||||||
|
@ -413,17 +414,18 @@ static BOOL SHDOCVW_TryDownloadMozillaControl(void)
|
||||||
{
|
{
|
||||||
LoadStringW( shdocvw_hinstance, 1001, buf, sizeof buf/sizeof(WCHAR) );
|
LoadStringW( shdocvw_hinstance, 1001, buf, sizeof buf/sizeof(WCHAR) );
|
||||||
r = MessageBoxW(NULL, buf, szTitle, MB_YESNO | MB_ICONQUESTION);
|
r = MessageBoxW(NULL, buf, szTitle, MB_YESNO | MB_ICONQUESTION);
|
||||||
if( r != IDYES )
|
if( r == IDYES )
|
||||||
return FALSE;
|
DialogBoxW(shdocvw_hinstance, MAKEINTRESOURCEW(100), 0, dlProc);
|
||||||
|
else
|
||||||
DialogBoxW(shdocvw_hinstance, MAKEINTRESOURCEW(100), 0, dlProc);
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
WaitForSingleObject( hsem, INFINITE );
|
WaitForSingleObject( hsem, INFINITE );
|
||||||
|
|
||||||
ReleaseSemaphore( hsem, 1, NULL );
|
ReleaseSemaphore( hsem, 1, NULL );
|
||||||
CloseHandle( hsem );
|
CloseHandle( hsem );
|
||||||
|
|
||||||
return TRUE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL SHDOCVW_TryLoadMozillaControl(void)
|
static BOOL SHDOCVW_TryLoadMozillaControl(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue