// ============================================================================
// return true if the iid is in the array
-bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
+WXDLLEXPORT bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
{
for ( size_t i = 0; i < nCount; i++ ) {
if ( riid == *aIids[i] )
oleVariant.vt = VT_I4;
oleVariant.lVal = variant.GetLong() ;
}
+ // Original VC6 came with SDK too old to contain VARIANT::llVal declaration
+ // and there doesn't seem to be any way to test for it as Microsoft simply
+ // added it to the later version of oaidl.h without changing anything else.
+ // So assume it's not present for VC6, even though it might be if an
+ // updated SDK is used. In this case the user would need to disable this
+ // check himself.
+#if wxUSE_LONGLONG && !defined(__VISUALC6__)
+ else if (type == wxT("longlong"))
+ {
+ oleVariant.vt = VT_I8;
+ oleVariant.llVal = variant.GetLongLong().GetValue();
+ }
+#endif
else if (type == wxT("char"))
{
oleVariant.vt=VT_I1; // Signed Char
#endif // wxUSE_DATETIME
break;
+ // See the comment before the __VISUALC6__ test above.
+#if wxUSE_LONGLONG && !defined(__VISUALC6__)
+ case VT_I8:
+ variant = wxLongLong(oleVariant.llVal);
+ break;
+#endif // wxUSE_LONGLONG
+
case VT_I4:
variant = (long) oleVariant.lVal;
break;
#if wxUSE_DATAOBJ
-#if wxDEBUG_LEVEL && ( ( defined(__VISUALC__) && (__VISUALC__ > 1000) ) || defined(__MWERKS__) )
+#if wxDEBUG_LEVEL && (( defined(__VISUALC__) && (__VISUALC__ > 1000) ))
static wxString GetIidName(REFIID riid)
{
// an association between symbolic name and numeric value of an IID
ADD_KNOWN_IID(AdviseSink2),
ADD_KNOWN_IID(BindCtx),
ADD_KNOWN_IID(ClassFactory),
-#if ( !defined( __VISUALC__) || (__VISUALC__!=1010) ) && !defined(__MWERKS__)
+#if ( !defined( __VISUALC__) || (__VISUALC__!=1010) )
ADD_KNOWN_IID(ContinueCallback),
ADD_KNOWN_IID(EnumOleDocumentViews),
ADD_KNOWN_IID(OleCommandTarget),
#endif
}
-void wxLogQueryInterface(const wxChar *szInterface, REFIID riid)
+WXDLLEXPORT void wxLogQueryInterface(const wxChar *szInterface, REFIID riid)
{
wxLogTrace(wxTRACE_OleCalls, wxT("%s::QueryInterface (iid = %s)"),
szInterface, GetIidName(riid).c_str());
}
-void wxLogAddRef(const wxChar *szInterface, ULONG cRef)
+WXDLLEXPORT void wxLogAddRef(const wxChar *szInterface, ULONG cRef)
{
wxLogTrace(wxTRACE_OleCalls, wxT("After %s::AddRef: m_cRef = %d"), szInterface, cRef + 1);
}
-void wxLogRelease(const wxChar *szInterface, ULONG cRef)
+WXDLLEXPORT void wxLogRelease(const wxChar *szInterface, ULONG cRef)
{
wxLogTrace(wxTRACE_OleCalls, wxT("After %s::Release: m_cRef = %d"), szInterface, cRef - 1);
}