22#include <systools/win32/qswin32.h>
26 MSIHANDLE hMSI =
static_cast< MSIHANDLE
>( lParam );
27 WCHAR szClassName[
sizeof(QUICKSTART_CLASSNAME)/
sizeof(WCHAR) + 1];
29 int nCharsCopied = GetClassNameW( hWnd, szClassName,
sizeof(szClassName)/
sizeof(szClassName[0]) );
31 if ( nCharsCopied && !_wcsicmp( QUICKSTART_CLASSNAME, szClassName ) )
35 if ( GetWindowThreadProcessId( hWnd, &dwProcessId ) )
40 if ( !_wcsnicmp( sImagePath.c_str(), sOfficeImageDir.c_str(), sOfficeImageDir.length() ) )
42 UINT uMsgShutdownQuickstart = RegisterWindowMessageW( SHUTDOWN_QUICKSTART_MESSAGE );
44 if ( uMsgShutdownQuickstart )
45 SendMessageW( hWnd, uMsgShutdownQuickstart, 0, 0 );
48 HANDLE hProcess = OpenProcess( SYNCHRONIZE,
FALSE, dwProcessId );
52 WaitForSingleObject( hProcess, 30000 );
53 CloseHandle( hProcess );
66extern "C" __declspec(dllexport) UINT __stdcall ShutDownQuickstarter( MSIHANDLE hMSI )
std::wstring GetProcessImagePathW(DWORD dwProcessId)
std::wstring GetOfficeInstallationPathW(MSIHANDLE handle)
const wchar_t *typedef BOOL
static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
__declspec(dllexport) UINT __stdcall ShutDownQuickstarter(MSIHANDLE hMSI)