From: SourceForge.net <no...@so...> - 2005-04-04 12:44:39
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3082086 By: siger I was trying to write simple aplication with drag and drop but i have i little problem with compilation I define virtual function HRESULT MyIDropTarget::QueryInterface(REFIID iid,void** ppNew) { if(IsEqualIID(iid,&IID_IUnknown)) { *ppNew= this; this->AddRef(); return S_OK; } if(IsEqualIID(iid,&IID_IDropTarget)) { *ppNew= this; this->AddRef(); return S_OK; } return E_NOINTERFACE; } In m$ compiler this code is ok(taken from source). in MinGW I get droptarget.cpp: In member function `virtual HRESULT MyIDropTarget::QueryInterface(const IID&, void**)': droptarget.cpp:5: error: invalid initialization of reference of type 'const GUID&' from expression of type 'const IID*' C:\MinGWStudio\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\objbase.h:78: error: in passing argument 2 of `BOOL IsEqualGUID(const GUID&, const GUID&)' droptarget.cpp:11: error: invalid initialization of reference of type 'const GUID&' from expression of type 'const IID*' C:\MinGWStudio\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\objbase.h:78: error: in passing argument 2 of `BOOL IsEqualGUID(const GUID&, const GUID&)' If remove & i must link uuid. The program compiles. But when I try RegisterDragDrop(,) it returns E_OUTOFMEMORY I checked in msdn there is note that I must run OleInitialize(NULL). I add this to my program. It compiled. But when I run it, it hangs. ("There was a problem.... Send to microsoft). If I compile without OleInitialize ther no drag and drop support. Thanks for help. PS. Sorry for my english ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=286641 |