Kaydet (Commit) 29e0b587 authored tarafından skswales's avatar skswales Kaydeden (comit) Michael Stahl

Work towards tdf#72606 EasyHack _tstring/TCHAR elimination

Functions suffixed with A/W (ANSI/Wide) as needed for clarity

This completes the _tstring/TCHAR/TEXT elimination for setup_native/

Change-Id: I66292fd490a09f75b8691274255ba41870074065
Reviewed-on: https://gerrit.libreoffice.org/25771Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 0e3f354d
......@@ -54,7 +54,7 @@ OpenService_t OpenService_ = NULL;
QueryServiceStatus_t QueryServiceStatus_ = NULL;
StartService_t StartService_ = NULL;
const TCHAR* const INDEXING_SERVICE_NAME = TEXT("cisvc");
const char * const INDEXING_SERVICE_NAME = "cisvc";
bool StopIndexingService(SC_HANDLE hService)
{
......@@ -150,7 +150,7 @@ void StartIndexingService(SC_HANDLE hService)
extern "C" UINT __stdcall RestartIndexingService(MSIHANDLE)
{
//MessageBox(NULL, TEXT("Restarting Indexing Service"), TEXT("Message"), MB_OK | MB_ICONINFORMATION);
// MessageBoxW(NULL, L"Restarting Indexing Service", L"Message", MB_OK | MB_ICONINFORMATION);
HMODULE hAdvapi32 = LoadLibrary("advapi32.dll");
......
......@@ -110,16 +110,16 @@ void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallF
}
BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
BOOL GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
{
DWORD sz = 0;
if ( MsiGetProperty( hMSI, pPropName, const_cast<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA )
{
if ( MsiGetPropertyW( hMSI, pPropName, const_cast<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA )
{
sz++;
DWORD nbytes = sz * sizeof( wchar_t );
wchar_t* buff = reinterpret_cast<wchar_t*>( malloc( nbytes ) );
ZeroMemory( buff, nbytes );
MsiGetProperty( hMSI, pPropName, buff, &sz );
MsiGetPropertyW( hMSI, pPropName, buff, &sz );
*ppValue = buff;
return TRUE;
......@@ -132,7 +132,7 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
BOOL GetActiveXControlPath( MSIHANDLE hMSI, char** ppActiveXPath )
{
wchar_t* pProgPath = NULL;
if ( GetMsiProp( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath )
if ( GetMsiPropW( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath )
{
char* pCharProgPath = UnicodeToAnsiString( pProgPath );
......@@ -259,7 +259,7 @@ BOOL MakeInstallForAllUsers( MSIHANDLE hMSI )
{
BOOL bResult = FALSE;
wchar_t* pVal = NULL;
if ( GetMsiProp( hMSI, L"ALLUSERS", &pVal ) && pVal )
if ( GetMsiPropW( hMSI, L"ALLUSERS", &pVal ) && pVal )
{
bResult = UnicodeEquals( pVal , L"1" );
free( pVal );
......@@ -273,7 +273,7 @@ BOOL MakeInstallFor64Bit( MSIHANDLE hMSI )
{
BOOL bResult = FALSE;
wchar_t* pVal = NULL;
if ( GetMsiProp( hMSI, L"VersionNT64", &pVal ) && pVal )
if ( GetMsiPropW( hMSI, L"VersionNT64", &pVal ) && pVal )
{
bResult = TRUE;
free( pVal );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment