Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Bug in atlhost.h

Bug in atlhost.h

Scheduled Pinned Locked Moved ATL / WTL / STL
databasehelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imagiro
    wrote on last edited by
    #1

    I don't know where to report this bug, so may be this is the right place... If you set an IDocHostUIHandlerDispatch-interface the FilterDataObject-Method of CAxHostWindow does NOT query the IDataObject-interface from the returned IUnknown, instead it calls QueryInterface on it self:

    if (m_spIDocHostUIHandlerDispatch != NULL)
    {
    CComPtr spUnk;
    hr = m_spIDocHostUIHandlerDispatch->FilterDataObject(pDO, &spUnk);
    if (spUnk)
    hr = QueryInterface(__uuidof(IDataObject), (void**)ppDORet); // self!!
    if (FAILED(hr) || *ppDORet == NULL)
    hr = S_FALSE;
    }

    So the line

    hr = QueryInterface(__uuidof(IDataObject), (void**)ppDORet);

    should be more like:

    hr = **spUnk->**QueryInterface(__uuidof(IDataObject), (void**)ppDORet);

    Does anyone know where to report this bug? Greetings, imagiro

    M 1 Reply Last reply
    0
    • I imagiro

      I don't know where to report this bug, so may be this is the right place... If you set an IDocHostUIHandlerDispatch-interface the FilterDataObject-Method of CAxHostWindow does NOT query the IDataObject-interface from the returned IUnknown, instead it calls QueryInterface on it self:

      if (m_spIDocHostUIHandlerDispatch != NULL)
      {
      CComPtr spUnk;
      hr = m_spIDocHostUIHandlerDispatch->FilterDataObject(pDO, &spUnk);
      if (spUnk)
      hr = QueryInterface(__uuidof(IDataObject), (void**)ppDORet); // self!!
      if (FAILED(hr) || *ppDORet == NULL)
      hr = S_FALSE;
      }

      So the line

      hr = QueryInterface(__uuidof(IDataObject), (void**)ppDORet);

      should be more like:

      hr = **spUnk->**QueryInterface(__uuidof(IDataObject), (void**)ppDORet);

      Does anyone know where to report this bug? Greetings, imagiro

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      connect.microsoft.com[^] is the place to report bugs, or post in a MS support forum.

      --Mike-- Visual C++ MVP :cool: LINKS~! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen

      I 1 Reply Last reply
      0
      • M Michael Dunn

        connect.microsoft.com[^] is the place to report bugs, or post in a MS support forum.

        --Mike-- Visual C++ MVP :cool: LINKS~! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen

        I Offline
        I Offline
        imagiro
        wrote on last edited by
        #3

        Thanks Mike. Looks like reporting bugs is sometimes harder than finding them ;)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups