summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-09-20 20:20:44 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-09-22 20:53:30 +0200
commiteef4c133e9649ebd690918bd7b83c2d5dc0dfcff (patch)
tree1a8d084c5b16056a15258770a05b9cd2d53a40bc /setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx
parentbb406680cebd6fa1e1bdb9e2de430cd9a1f44da0 (diff)
Windows: avoid dependence on UNICODE define; prefer W functions
Change-Id: I95b90128e93f0d88ed73601bcc5a7ca9279d4cf1 Reviewed-on: https://gerrit.libreoffice.org/42560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx')
-rw-r--r--setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx b/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx
index 7a841bdbe221..f3ec02a7772b 100644
--- a/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx
+++ b/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx
@@ -24,11 +24,11 @@
static BOOL CALLBACK EnumWindowsProc( HWND hWnd, LPARAM lParam )
{
MSIHANDLE hMSI = static_cast< MSIHANDLE >( lParam );
- CHAR szClassName[sizeof(QUICKSTART_CLASSNAMEA) + 1];
+ WCHAR szClassName[sizeof(QUICKSTART_CLASSNAME)/sizeof(WCHAR) + 1];
- int nCharsCopied = GetClassNameA( hWnd, szClassName, sizeof( szClassName ) );
+ int nCharsCopied = GetClassNameW( hWnd, szClassName, sizeof(szClassName)/sizeof(szClassName[0]) );
- if ( nCharsCopied && !_stricmp( QUICKSTART_CLASSNAMEA, szClassName ) )
+ if ( nCharsCopied && !_wcsicmp( QUICKSTART_CLASSNAME, szClassName ) )
{
DWORD dwProcessId;
@@ -39,10 +39,10 @@ static BOOL CALLBACK EnumWindowsProc( HWND hWnd, LPARAM lParam )
if ( !_wcsnicmp( sImagePath.c_str(), sOfficeImageDir.c_str(), sOfficeImageDir.length() ) )
{
- UINT uMsgShutdownQuickstart = RegisterWindowMessageA( SHUTDOWN_QUICKSTART_MESSAGEA );
+ UINT uMsgShutdownQuickstart = RegisterWindowMessageW( SHUTDOWN_QUICKSTART_MESSAGE );
if ( uMsgShutdownQuickstart )
- SendMessageA( hWnd, uMsgShutdownQuickstart, 0, 0 );
+ SendMessageW( hWnd, uMsgShutdownQuickstart, 0, 0 );
HANDLE hProcess = OpenProcess( SYNCHRONIZE, FALSE, dwProcessId );