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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. How to convet GetIDispatch(FALSE) to atl

How to convet GetIDispatch(FALSE) to atl

Scheduled Pinned Locked Moved ATL / WTL / STL
c++linuxtutorialannouncement
1 Posts 1 Posters 1 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.
  • S Offline
    S Offline
    saravananvv
    wrote on last edited by
    #1

    Hi, I need to convert the mfc code to atl for connecting to the windows shell. Please provide me some ideas or sample coding regarding this. I've enclosed the MFC coding below. LPCONNECTIONPOINTCONTAINER pContainer; LPCONNECTIONPOINT pXConnection = NULL; DWORD dwCookie = 0; CoInitialize(NULL); if(m_pInterface == 0) { if(m_pInterface.CreateInstance(__uuidof(SHDocVw::ShellWindows)) == S_OK) { if ((m_pInterface != NULL) && SUCCEEDED(m_pInterface->QueryInterface (IID_IConnectionPointContainer,(LPVOID*)&pContainer))) { if (SUCCEEDED( pContainer->FindConnectionPoint (__uuidof(SHDocVw::DShellWindowsEvents, &pXConnection))) { ASSERT(pXConnection != NULL); pXConnection->Advise( GetIDispatch(FALSE), &dwCookie); pXConnection->Release(); } pContainer->Release(); } } } Regards saravanan

    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