X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17b74d79adcc7bbd5cff4ed500e267289c0083a7..ec5d85fbd58bf6ef774e3d93b9e38d9f90b42d40:/src/msw/ole/automtn.cpp diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 4d062412c7..108c2948b0 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -539,7 +539,8 @@ bool ConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) else if (type == "bool") { oleVariant.vt = VT_BOOL; -#ifdef __WATCOMC__ + // 'bool' required for VC++ 4 apparently +#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) oleVariant.bool = variant.GetBool(); #else oleVariant.boolVal = variant.GetBool(); @@ -765,7 +766,11 @@ BasicString::BasicString(const char *sz) { // get the size of required buffer UINT lenAnsi = strlen(sz); + #ifdef __MWERKS__ + UINT lenWide = lenAnsi * 2 ; + #else UINT lenWide = mbstowcs(NULL, sz, lenAnsi); + #endif if ( lenWide > 0 ) { m_wzBuf = new OLECHAR[lenWide + 1];