summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorskswales <stuart.swales.croftnuisk@gmail.com>2016-06-21 17:59:01 +0100
committerMichael Stahl <mstahl@redhat.com>2016-06-22 12:31:42 +0000
commita50cdeb70ec19369f42ed08abfd4a5301d05edb5 (patch)
tree70081e60d642b507e572dbfdd4cf191f4608ec14 /shell
parent547e4b3a80708600edbc3f5669b4428877b5a951 (diff)
Work towards tdf#72606 EasyHack _tstring/TCHAR elimination
shell module largely already compiled UNICODE: A/W clarity Verified by installing release build and trying property sheets etc. Change-Id: I4965cdadbce635d86da1996c3c1bbd37a981ffde Reviewed-on: https://gerrit.libreoffice.org/26556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/inc/config.hxx12
-rw-r--r--shell/inc/utilities.hxx4
-rw-r--r--shell/source/backends/localebe/localebackend.cxx8
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx34
-rw-r--r--shell/source/win32/shlxthandler/propsheets/propsheets.cxx18
-rw-r--r--shell/source/win32/shlxthandler/shlxthdl.cxx16
-rw-r--r--shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx4
-rw-r--r--shell/source/win32/shlxthandler/util/utilities.cxx10
-rw-r--r--shell/source/win32/simplemail/senddoc.cxx20
-rw-r--r--shell/source/win32/simplemail/simplemapi.cxx4
-rw-r--r--shell/source/win32/simplemail/simplemapi.hxx4
-rw-r--r--shell/source/win32/zipfile/zipexcptn.cxx4
12 files changed, 69 insertions, 69 deletions
diff --git a/shell/inc/config.hxx b/shell/inc/config.hxx
index b65079166e39..eda0cfb06f9f 100644
--- a/shell/inc/config.hxx
+++ b/shell/inc/config.hxx
@@ -27,15 +27,15 @@
#include <tchar.h>
#ifdef _AMD64_
-#define MODULE_NAME TEXT("shlxthdl_x64.dll")
+#define MODULE_NAME L"shlxthdl_x64.dll"
#else
-#define MODULE_NAME TEXT("shlxthdl.dll")
+#define MODULE_NAME L"shlxthdl.dll"
#endif
-#define COLUMN_HANDLER_DESCRIPTIVE_NAME TEXT("LibreOffice Column Handler")
-#define INFOTIP_HANDLER_DESCRIPTIVE_NAME TEXT("LibreOffice Infotip Handler")
-#define PROPSHEET_HANDLER_DESCRIPTIVE_NAME TEXT("LibreOffice Property Sheet Handler")
-#define THUMBVIEWER_HANDLER_DESCRIPTIVE_NAME TEXT("LibreOffice Thumbnail Viewer")
+#define COLUMN_HANDLER_DESCRIPTIVE_NAME L"LibreOffice Column Handler"
+#define INFOTIP_HANDLER_DESCRIPTIVE_NAME L"LibreOffice Infotip Handler"
+#define PROPSHEET_HANDLER_DESCRIPTIVE_NAME L"LibreOffice Property Sheet Handler"
+#define THUMBVIEWER_HANDLER_DESCRIPTIVE_NAME L"LibreOffice Thumbnail Viewer"
#define META_CONTENT_NAME "meta.xml"
#define DOC_CONTENT_NAME "content.xml"
diff --git a/shell/inc/utilities.hxx b/shell/inc/utilities.hxx
index 0351e910658f..551089afd600 100644
--- a/shell/inc/utilities.hxx
+++ b/shell/inc/utilities.hxx
@@ -113,7 +113,7 @@ LCID LocaleSetToLCID( const LocaleSet_t & Locale );
#ifdef DEBUG
-inline void OutputDebugStringFormat( LPCSTR pFormat, ... )
+inline void OutputDebugStringFormatA( LPCSTR pFormat, ... )
{
CHAR buffer[1024];
va_list args;
@@ -124,7 +124,7 @@ inline void OutputDebugStringFormat( LPCSTR pFormat, ... )
OutputDebugStringA( buffer );
}
#else
-static inline void OutputDebugStringFormat( LPCSTR, ... )
+static inline void OutputDebugStringFormatA( LPCSTR, ... )
{
}
#endif
diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx
index 07729f0afa05..852d1dc9be7d 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -36,13 +36,13 @@
OUString ImplGetLocale(LCID lcid)
{
- TCHAR buffer[8];
- LPTSTR cp = buffer;
+ CHAR buffer[8];
+ PSTR cp = buffer;
- cp += GetLocaleInfo( lcid, LOCALE_SISO639LANGNAME , buffer, 4 );
+ cp += GetLocaleInfoA( lcid, LOCALE_SISO639LANGNAME , buffer, 4 );
if( cp > buffer )
{
- if( 0 < GetLocaleInfo( lcid, LOCALE_SISO3166CTRYNAME, cp, buffer + 8 - cp) )
+ if( 0 < GetLocaleInfoA( lcid, LOCALE_SISO3166CTRYNAME, cp, buffer + 8 - cp) )
// #i50822# minus character must be written before cp
*(cp - 1) = '-';
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index 4e02b2574415..5f4bda470c21 100644
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -63,7 +63,7 @@ CPropertyHdl::CPropertyHdl( long nRefCnt ) :
m_RefCnt( nRefCnt ),
m_pCache( NULL )
{
- OutputDebugStringFormat( "CPropertyHdl: CTOR\n" );
+ OutputDebugStringFormatA( "CPropertyHdl: CTOR\n" );
InterlockedIncrement( &g_DllRefCnt );
}
@@ -87,7 +87,7 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::QueryInterface(REFIID riid, void __RPC_F
if (IID_IUnknown == riid || IID_IPropertyStore == riid)
{
- OutputDebugStringFormat( "CPropertyHdl: QueryInterface (IID_IPropertyStore)\n" );
+ OutputDebugStringFormatA( "CPropertyHdl: QueryInterface (IID_IPropertyStore)\n" );
IUnknown* pUnk = static_cast<IPropertyStore*>(this);
pUnk->AddRef();
*ppvObject = pUnk;
@@ -95,7 +95,7 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::QueryInterface(REFIID riid, void __RPC_F
}
else if (IID_IPropertyStoreCapabilities == riid)
{
- OutputDebugStringFormat( "CPropertyHdl: QueryInterface (IID_IPropertyStoreCapabilities)\n" );
+ OutputDebugStringFormatA( "CPropertyHdl: QueryInterface (IID_IPropertyStoreCapabilities)\n" );
IUnknown* pUnk = static_cast<IPropertyStore*>(this);
pUnk->AddRef();
*ppvObject = pUnk;
@@ -103,13 +103,13 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::QueryInterface(REFIID riid, void __RPC_F
}
else if (IID_IInitializeWithStream == riid)
{
- OutputDebugStringFormat( "CPropertyHdl: QueryInterface (IID_IInitializeWithStream)\n" );
+ OutputDebugStringFormatA( "CPropertyHdl: QueryInterface (IID_IInitializeWithStream)\n" );
IUnknown* pUnk = static_cast<IInitializeWithStream*>(this);
pUnk->AddRef();
*ppvObject = pUnk;
return S_OK;
}
- OutputDebugStringFormat( "CPropertyHdl: QueryInterface (something different)\n" );
+ OutputDebugStringFormatA( "CPropertyHdl: QueryInterface (something different)\n" );
return E_NOINTERFACE;
}
@@ -212,7 +212,7 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::Initialize( IStream *pStream, DWORD grfM
#else
if ( FAILED( PSCreateMemoryPropertyStore( IID_PPV_ARGS( &m_pCache ) ) ) )
#endif
- OutputDebugStringFormat( "CPropertyHdl::Initialize: PSCreateMemoryPropertyStore failed" );
+ OutputDebugStringFormatA( "CPropertyHdl::Initialize: PSCreateMemoryPropertyStore failed" );
BufferStream tmpStream(pStream);
@@ -226,7 +226,7 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::Initialize( IStream *pStream, DWORD grfM
}
catch (const std::exception& e)
{
- OutputDebugStringFormat( "CPropertyHdl::Initialize: Caught exception [%s]", e.what() );
+ OutputDebugStringFormatA( "CPropertyHdl::Initialize: Caught exception [%s]", e.what() );
return E_FAIL;
}
}
@@ -237,7 +237,7 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::Initialize( IStream *pStream, DWORD grfM
void CPropertyHdl::LoadProperties( CMetaInfoReader *pMetaInfoReader )
{
- OutputDebugStringFormat( "CPropertyHdl: LoadProperties\n" );
+ OutputDebugStringFormatA( "CPropertyHdl: LoadProperties\n" );
PROPVARIANT propvarValues;
for ( UINT i = 0; i < (UINT)gPropertyMapTableSize; ++i )
@@ -264,37 +264,37 @@ HRESULT CPropertyHdl::GetItemData( CMetaInfoReader *pMetaInfoReader, UINT nIndex
case 0: {
pVarData->vt = VT_BSTR;
pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_TITLE ).c_str() );
- OutputDebugStringFormat( "CPropertyHdl::GetItemData: Title=%S.\n", pMetaInfoReader->getTagData( META_INFO_TITLE ).c_str() );
+ OutputDebugStringFormatA( "CPropertyHdl::GetItemData: Title=%S.\n", pMetaInfoReader->getTagData( META_INFO_TITLE ).c_str() );
return S_OK;
}
case 1: {
pVarData->vt = VT_BSTR;
pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_AUTHOR ).c_str() );
- OutputDebugStringFormat( "CPropertyHdl::GetItemData: Author=%S.\n", pMetaInfoReader->getTagData( META_INFO_AUTHOR ).c_str() );
+ OutputDebugStringFormatA( "CPropertyHdl::GetItemData: Author=%S.\n", pMetaInfoReader->getTagData( META_INFO_AUTHOR ).c_str() );
return S_OK;
}
case 2: {
pVarData->vt = VT_BSTR;
pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_SUBJECT ).c_str() );
- OutputDebugStringFormat( "CPropertyHdl::GetItemData: Subject=%S.\n", pMetaInfoReader->getTagData( META_INFO_SUBJECT ).c_str() );
+ OutputDebugStringFormatA( "CPropertyHdl::GetItemData: Subject=%S.\n", pMetaInfoReader->getTagData( META_INFO_SUBJECT ).c_str() );
return S_OK;
}
case 3: {
pVarData->vt = VT_BSTR;
pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_KEYWORDS ).c_str() );
- OutputDebugStringFormat( "CPropertyHdl::GetItemData: Keywords=%S.\n", pMetaInfoReader->getTagData( META_INFO_KEYWORDS ).c_str() );
+ OutputDebugStringFormatA( "CPropertyHdl::GetItemData: Keywords=%S.\n", pMetaInfoReader->getTagData( META_INFO_KEYWORDS ).c_str() );
return S_OK;
}
case 4: {
pVarData->vt = VT_BSTR;
pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_DESCRIPTION ).c_str() );
- OutputDebugStringFormat( "CPropertyHdl::GetItemData: Description=%S.\n", pMetaInfoReader->getTagData( META_INFO_DESCRIPTION ).c_str() );
+ OutputDebugStringFormatA( "CPropertyHdl::GetItemData: Description=%S.\n", pMetaInfoReader->getTagData( META_INFO_DESCRIPTION ).c_str() );
return S_OK;
}
case 5: {
pVarData->vt = VT_BSTR;
pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagAttribute( META_INFO_DOCUMENT_STATISTIC, META_INFO_PAGES ).c_str() );
- OutputDebugStringFormat( "CPropertyHdl::GetItemData: Pages=%S.\n", pMetaInfoReader->getTagAttribute( META_INFO_DOCUMENT_STATISTIC, META_INFO_PAGES ).c_str() );
+ OutputDebugStringFormatA( "CPropertyHdl::GetItemData: Pages=%S.\n", pMetaInfoReader->getTagAttribute( META_INFO_DOCUMENT_STATISTIC, META_INFO_PAGES ).c_str() );
return S_OK;
}
}
@@ -406,7 +406,7 @@ bool CClassFactory::IsLocked()
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
{
- OutputDebugStringFormat( "DllGetClassObject.\n" );
+ OutputDebugStringFormatA( "DllGetClassObject.\n" );
*ppv = 0;
if ( rclsid != CLSID_PROPERTY_HANDLER )
@@ -423,7 +423,7 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
STDAPI DllCanUnloadNow()
{
- OutputDebugStringFormat( "DllCanUnloadNow.\n" );
+ OutputDebugStringFormatA( "DllCanUnloadNow.\n" );
if (CClassFactory::IsLocked() || g_DllRefCnt > 0)
return S_FALSE;
@@ -433,7 +433,7 @@ STDAPI DllCanUnloadNow()
BOOL WINAPI DllMain( HINSTANCE hInst, ULONG /*ul_reason_for_call*/, LPVOID /*lpReserved*/ )
{
- OutputDebugStringFormat( "DllMain.\n" );
+ OutputDebugStringFormatA( "DllMain.\n" );
g_hModule = hInst;
return TRUE;
}
diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
index af5b21401b11..8b4d201dd9c9 100644
--- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
@@ -56,14 +56,14 @@
CPropertySheet::CPropertySheet(long RefCnt) :
m_RefCnt(RefCnt)
{
- OutputDebugStringFormat("CPropertySheet::CTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
+ OutputDebugStringFormatA("CPropertySheet::CTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
InterlockedIncrement(&g_DllRefCnt);
}
CPropertySheet::~CPropertySheet()
{
- OutputDebugStringFormat("CPropertySheet::DTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
+ OutputDebugStringFormatA("CPropertySheet::DTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
InterlockedDecrement(&g_DllRefCnt);
}
@@ -98,14 +98,14 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::QueryInterface(
ULONG STDMETHODCALLTYPE CPropertySheet::AddRef()
{
- OutputDebugStringFormat("CPropertySheet::AddRef [%d]", m_RefCnt );
+ OutputDebugStringFormatA("CPropertySheet::AddRef [%d]", m_RefCnt );
return InterlockedIncrement(&m_RefCnt);
}
ULONG STDMETHODCALLTYPE CPropertySheet::Release()
{
- OutputDebugStringFormat("CPropertySheet::Release [%d]", m_RefCnt );
+ OutputDebugStringFormatA("CPropertySheet::Release [%d]", m_RefCnt );
long refcnt = InterlockedDecrement(&m_RefCnt);
if (0 == refcnt)
@@ -136,12 +136,12 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::Initialize(
NULL,
0)))
{
- UINT size = DragQueryFile( reinterpret_cast<HDROP>(medium.hGlobal), 0, 0, 0 );
+ UINT size = DragQueryFileW( reinterpret_cast<HDROP>(medium.hGlobal), 0, 0, 0 );
if ( size != 0 )
{
- TCHAR * buffer = new TCHAR[ size + 1 ];
- UINT result_size = DragQueryFile( reinterpret_cast<HDROP>(medium.hGlobal),
- 0, buffer, size + 1 );
+ WCHAR * buffer = new WCHAR[ size + 1 ];
+ UINT result_size = DragQueryFileW( reinterpret_cast<HDROP>(medium.hGlobal),
+ 0, buffer, size + 1 );
if ( result_size != 0 )
{
std::wstring fname = getShortPathName( buffer );
@@ -192,7 +192,7 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddP
// add the summary property page
psp.dwSize = sizeof(PROPSHEETPAGE);
psp.dwFlags = PSP_DEFAULT | PSP_USETITLE | PSP_USECALLBACK;
- psp.hInstance = GetModuleHandle(MODULE_NAME);
+ psp.hInstance = GetModuleHandleW(MODULE_NAME);
psp.lParam = reinterpret_cast<LPARAM>(this);
psp.pfnCallback = reinterpret_cast<LPFNPSPCALLBACK>(CPropertySheet::PropPageSummaryCallback);
diff --git a/shell/source/win32/shlxthandler/shlxthdl.cxx b/shell/source/win32/shlxthandler/shlxthdl.cxx
index e168618dba98..1463c6695ea4 100644
--- a/shell/source/win32/shlxthandler/shlxthdl.cxx
+++ b/shell/source/win32/shlxthandler/shlxthdl.cxx
@@ -300,12 +300,12 @@ namespace /* private */
STDAPI DllRegisterServer()
{
- TCHAR ModuleFileName[MAX_PATH];
+ WCHAR ModuleFileName[MAX_PATH];
- GetModuleFileName(
- GetModuleHandle(MODULE_NAME),
+ GetModuleFileNameW(
+ GetModuleHandleW(MODULE_NAME),
ModuleFileName,
- sizeof(ModuleFileName));
+ sizeof(ModuleFileName)/sizeof(ModuleFileName[0]));
std::string module_path = WStringToString(ModuleFileName);
HRESULT hr = S_OK;
@@ -380,13 +380,13 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
return E_NOINTERFACE;
if ( rclsid == CLSID_INFOTIP_HANDLER )
- OutputDebugStringFormat( "DllGetClassObject: Create CLSID_INFOTIP_HANDLER\n" );
+ OutputDebugStringFormatA( "DllGetClassObject: Create CLSID_INFOTIP_HANDLER\n" );
else if ( rclsid == CLSID_COLUMN_HANDLER )
- OutputDebugStringFormat( "DllGetClassObject: Create CLSID_COLUMN_HANDLER\n" );
+ OutputDebugStringFormatA( "DllGetClassObject: Create CLSID_COLUMN_HANDLER\n" );
else if ( rclsid == CLSID_PROPERTYSHEET_HANDLER )
- OutputDebugStringFormat( "DllGetClassObject: Create CLSID_PROPERTYSHEET_HANDLER\n" );
+ OutputDebugStringFormatA( "DllGetClassObject: Create CLSID_PROPERTYSHEET_HANDLER\n" );
else if ( rclsid == CLSID_THUMBVIEWER_HANDLER )
- OutputDebugStringFormat( "DllGetClassObject: Create CLSID_THUMBVIEWER_HANDLER\n" );
+ OutputDebugStringFormatA( "DllGetClassObject: Create CLSID_THUMBVIEWER_HANDLER\n" );
IUnknown* pUnk = new CClassFactory(rclsid);
*ppv = pUnk;
diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
index 63f1eec74c5a..20909bf82f66 100644
--- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
+++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
@@ -57,7 +57,7 @@ namespace internal
id is 2000 */
void LoadSignetImageFromResource(ZipFile::ZipContentBuffer_t& buffer)
{
- HRSRC hrc = FindResource(g_hModule, TEXT("#2000"), RT_RCDATA);
+ HRSRC hrc = FindResourceW(g_hModule, L"#2000", RT_RCDATA);
DWORD size = SizeofResource(g_hModule, hrc);
HGLOBAL hglob = LoadResource(g_hModule, hrc);
char* data = reinterpret_cast<char*>(LockResource(hglob));
@@ -464,7 +464,7 @@ HRESULT STDMETHODCALLTYPE CThumbviewer::Extract(HBITMAP *phBmpImage)
}
catch(std::exception&)
{
- OutputDebugStringFormat( "CThumbviewer Extract ERROR!\n" );
+ OutputDebugStringFormatA( "CThumbviewer Extract ERROR!\n" );
hr = E_FAIL;
}
return hr;
diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx
index c372db495396..574c419b3d21 100644
--- a/shell/source/win32/shlxthandler/util/utilities.cxx
+++ b/shell/source/win32/shlxthandler/util/utilities.cxx
@@ -28,7 +28,7 @@
const size_t MAX_RES_STRING = 1024;
-const wchar_t SPACE_CHAR = _T(' ');
+const wchar_t SPACE_CHAR = L' ';
static std::wstring StringToWString(const std::string& String, int codepage)
{
@@ -91,7 +91,7 @@ std::wstring GetResString(int ResId)
int rc = LoadStringW( GetModuleHandleW(MODULE_NAME), ResId, szResStr, sizeof(szResStr) );
- OutputDebugStringFormat( "GetResString: read %d chars\n", rc );
+ OutputDebugStringFormatA( "GetResString: read %d chars\n", rc );
// OSL_ENSURE(rc, "String resource not found");
return std::wstring(szResStr);
@@ -153,12 +153,12 @@ bool HasOnlySpaces(const std::wstring& String)
std::wstring getShortPathName( const std::wstring& aLongName )
{
std::wstring shortName = aLongName;
- long length = GetShortPathName( aLongName.c_str(), NULL, 0 );
+ long length = GetShortPathNameW( aLongName.c_str(), NULL, 0 );
if ( length != 0 )
{
- TCHAR* buffer = new TCHAR[ length+1 ];
- length = GetShortPathName( aLongName.c_str(), buffer, length );
+ WCHAR* buffer = new WCHAR[ length+1 ];
+ length = GetShortPathNameW( aLongName.c_str(), buffer, length );
if ( length != 0 )
shortName = std::wstring( buffer );
delete [] buffer;
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 6c0b14e7117d..0abea3d6ce63 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -189,7 +189,7 @@ const size_t nKnownParameter = SAL_N_ELEMENTS(KnownParameter);
bool isKnownParameter(const char* aParameterName)
{
for (size_t i = 0; i < nKnownParameter; i++)
- if (_tcsicmp(aParameterName, KnownParameter[i]) == 0)
+ if (_stricmp(aParameterName, KnownParameter[i]) == 0)
return true;
return false;
@@ -206,29 +206,29 @@ void initParameter(int argc, char* argv[])
continue;
}
- if ((_tcsicmp(argv[i], TEXT("--mapi-dialog")) == 0))
+ if ((_stricmp(argv[i], "--mapi-dialog") == 0))
{
gMapiFlags |= MAPI_DIALOG;
}
- else if ((_tcsicmp(argv[i], TEXT("--mapi-logon-ui")) == 0))
+ else if ((_stricmp(argv[i], "--mapi-logon-ui") == 0))
{
gMapiFlags |= MAPI_LOGON_UI;
}
else if ((i+1) < argc) // is the value of a parameter available too?
{
- if (_tcsicmp(argv[i], TEXT("--to")) == 0)
+ if (_stricmp(argv[i], "--to") == 0)
gTo.push_back(prefixEmailAddress(argv[i+1]));
- else if (_tcsicmp(argv[i], TEXT("--cc")) == 0)
+ else if (_stricmp(argv[i], "--cc") == 0)
gCc.push_back(prefixEmailAddress(argv[i+1]));
- else if (_tcsicmp(argv[i], TEXT("--bcc")) == 0)
+ else if (_stricmp(argv[i], "--bcc") == 0)
gBcc.push_back(prefixEmailAddress(argv[i+1]));
- else if (_tcsicmp(argv[i], TEXT("--from")) == 0)
+ else if (_stricmp(argv[i], "--from") == 0)
gFrom = prefixEmailAddress(argv[i+1]);
- else if (_tcsicmp(argv[i], TEXT("--subject")) == 0)
+ else if (_stricmp(argv[i], "--subject") == 0)
gSubject = argv[i+1];
- else if (_tcsicmp(argv[i], TEXT("--body")) == 0)
+ else if (_stricmp(argv[i], "--body") == 0)
gBody = argv[i+1];
- else if ((_tcsicmp(argv[i], TEXT("--attach")) == 0))
+ else if ((_stricmp(argv[i], "--attach") == 0))
gAttachments.push_back(argv[i+1]);
i++;
diff --git a/shell/source/win32/simplemail/simplemapi.cxx b/shell/source/win32/simplemail/simplemapi.cxx
index eb5dcff52d92..71c5e6e320b8 100644
--- a/shell/source/win32/simplemail/simplemapi.cxx
+++ b/shell/source/win32/simplemail/simplemapi.cxx
@@ -51,8 +51,8 @@ CSimpleMapi::~CSimpleMapi()
ULONG CSimpleMapi::MAPILogon(
ULONG ulUIParam,
- LPTSTR lpszProfileName,
- LPTSTR lpszPassword,
+ LPSTR lpszProfileName,
+ LPSTR lpszPassword,
FLAGS flFlags,
ULONG ulReserved,
LPLHANDLE lplhSession )
diff --git a/shell/source/win32/simplemail/simplemapi.hxx b/shell/source/win32/simplemail/simplemapi.hxx
index 955aa5abc0d9..e1de5e5c3cab 100644
--- a/shell/source/win32/simplemail/simplemapi.hxx
+++ b/shell/source/win32/simplemail/simplemapi.hxx
@@ -44,8 +44,8 @@ public:
ULONG MAPILogon(
ULONG ulUIParam,
- LPTSTR lpszProfileName,
- LPTSTR lpszPassword,
+ LPSTR lpszProfileName,
+ LPSTR lpszPassword,
FLAGS flFlags,
ULONG ulReserved,
LPLHANDLE lplhSession );
diff --git a/shell/source/win32/zipfile/zipexcptn.cxx b/shell/source/win32/zipfile/zipexcptn.cxx
index 23e90e6c38de..c30d38907bdc 100644
--- a/shell/source/win32/zipfile/zipexcptn.cxx
+++ b/shell/source/win32/zipfile/zipexcptn.cxx
@@ -82,14 +82,14 @@ Win32Exception::~Win32Exception() throw()
*/
const char* Win32Exception::what() const throw()
{
- FormatMessage(
+ FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetErrorCode(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR) &m_MsgBuff,
+ (LPSTR) &m_MsgBuff,
0,
NULL);