From: David L R. <*@drobinson.com.au> - 2001-09-26 11:37:35
|
Just purchased CodeWarrior 7 for Mac & Windows, unwrapped and installed, started to compile ButtonMessage demo. All source files compile with no problems except for ZDragClip_Win.cpp . Under the Windows version I get the following error: #Start of CodeWarrior Error Message Error : function call 'QueryInterface(const _GUID, ZDragClip_Win_DataObject **)' does not match 'IUnknown::QueryInterface(const _GUID &, void **)' 'IUnknown::QueryInterface<...>(T0 **)' ZDragClip_Win.cpp line 204 T)(inIDataObject->QueryInterface(ZDragClip_Win_DataObject::sIID, &theDataObject)) >= 0) #End of Message Is it finding the wrong QueryInterface? #From ZDragClip_Win.cpp ZTuple ZDragClip_Win_DataObject::sAsTuple(IDataObject* inIDataObject) { ZTuple theTuple; ZDragClip_Win_DataObject* theDataObject; HERE--> if (SUCCEEDED(inIDataObject->QueryInterface (ZDragClip_Win_DataObject::sIID, &theDataObject))) { theTuple = *theDataObject->GetTuple(); theDataObject->Release(); } else { vector<FORMATETC> filteredVector; ::sFilterNonHGLOBAL(inIDataObject, filteredVector); for (size_t currentFormatIndex = 0; currentFormatIndex < filteredVector.size(); ++currentFormatIndex) { bool isString; string thePropertyName; if (ZDragClipManager::sGet()->LookupCLIPFORMAT(filteredVector[currentFormatIndex].cfFormat, thePropertyName, isString)) { ZAssertStop(1, thePropertyName.size() > 0); FORMATETC theFORMATETC = filteredVector[currentFormatIndex]; STGMEDIUM theSTGMEDIUM; HRESULT theHRESULT = inIDataObject->GetData(&theFORMATETC, &theSTGMEDIUM); if (SUCCEEDED(theHRESULT)) { if (theSTGMEDIUM.tymed & TYMED_HGLOBAL) { void* globalPtr = ::GlobalLock(theSTGMEDIUM.hGlobal); // Special case text, to find and ignore the zero terminator, and to store a string. if (theFORMATETC.cfFormat == CF_TEXT) { theTuple.AddString(thePropertyName, string(reinterpret_cast<char*>(globalPtr))); } else { size_t theSize = ::GlobalSize(theSTGMEDIUM.hGlobal); theTuple.AddRaw(thePropertyName, globalPtr, theSize); } ::GlobalUnlock(theSTGMEDIUM.hGlobal); } ::ReleaseStgMedium(&theSTGMEDIUM); } } } } return theTuple; } // ==================================================================================================== #pragma mark - #pragma mark * ZDragClip_Win_Enum -- David L Robinson - me...@dr... - ICQ# 8955819 YahooID: drobinsoncomau - MSN: dro...@ho... - AIM: drobinsoncomau Phone: 1800 222 589 int +61 2 66287472 Mobile: +61 (0)412 458477 Fax: 1800 222 FAX (1800 222 329) int +61 2 66283492 My Web: http://drobinson.com.au UHF CB Radio: SARC63 (Cell Call ID: 63) Ch 7 North Coast NSW Only SnailMail: P.O.Box 550, Lismore, NSW 2480 Me(I Think): Real Geeks never die. Their E-mail addresses just bounce. Send Urgent messages to ur...@dr... The Subject is sent to my Mobile Phone. |