From f68f352dec04d796916dd8c4f5f60e8f62e4edf6 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 4 May 2009 14:12:40 +0200 Subject: prefer macro over stub - Windows Mobile does the same, thus we will not have double definitions or such - COINIT_MULTITHREADED is the default, meaning that 0 usually expands to it. Just be on the safe side and be more precise. Task-number: 237029 Reviewed-by: joerg --- src/corelib/kernel/qfunctions_wince.cpp | 5 ----- src/corelib/kernel/qfunctions_wince.h | 5 +++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/corelib/kernel/qfunctions_wince.cpp b/src/corelib/kernel/qfunctions_wince.cpp index 1c929c7..e0f7687 100644 --- a/src/corelib/kernel/qfunctions_wince.cpp +++ b/src/corelib/kernel/qfunctions_wince.cpp @@ -285,11 +285,6 @@ int qt_wince_SetErrorMode(int newValue) return result; } -HRESULT qt_wince_CoInitialize(void* reserved) -{ - return CoInitializeEx(reserved, 0); -} - bool qt_wince__chmod(const char *file, int mode) { return _wchmod( reinterpret_cast (QString::fromLatin1(file).utf16()), mode); diff --git a/src/corelib/kernel/qfunctions_wince.h b/src/corelib/kernel/qfunctions_wince.h index 123bd23..5f08bb3 100644 --- a/src/corelib/kernel/qfunctions_wince.h +++ b/src/corelib/kernel/qfunctions_wince.h @@ -199,7 +199,9 @@ int qt_wince__fstat( int handle, struct stat *buffer); #define SEM_FAILCRITICALERRORS 0x0001 #define SEM_NOOPENFILEERRORBOX 0x0002 int qt_wince_SetErrorMode(int); -HRESULT qt_wince_CoInitialize(void* reserved); +#ifndef CoInitialize +#define CoInitialize(x) CoInitializeEx(x, COINIT_MULTITHREADED) +#endif bool qt_wince__chmod(const char *file, int mode); bool qt_wince__wchmod(const WCHAR *file, int mode); @@ -376,7 +378,6 @@ typedef DWORD OLE_COLOR; #define _rename(a,b) qt_wince__rename(a,b) #define _remove(a) qt_wince__remove(a) #define SetErrorMode(a) qt_wince_SetErrorMode(a) -#define CoInitialize(a) qt_wince_CoInitialize(a) #define _chmod(a,b) qt_wince__chmod(a,b) #define _wchmod(a,b) qt_wince__wchmod(a,b) #define CreateFileA(a,b,c,d,e,f,g) qt_wince_CreateFileA(a,b,c,d,e,f,g) -- cgit v0.12