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. C / C++ / MFC
  4. error C2027: use of undefined type 'IActiveDesktop'

error C2027: use of undefined type 'IActiveDesktop'

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
5 Posts 4 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.
  • N Offline
    N Offline
    neha agarwal27
    wrote on last edited by
    #1

    Hi all, I am trying to use IActiveDesktop interface in my code. I have included

    #include "shlobj.h"

    and defined this in stdafx.h

    #import "shell32.dll"

    but it is giving error error C2027: use of undefined type 'IActiveDesktop' how to resolve this Can anybody help me in this thanks in advance

    S H D 3 Replies Last reply
    0
    • N neha agarwal27

      Hi all, I am trying to use IActiveDesktop interface in my code. I have included

      #include "shlobj.h"

      and defined this in stdafx.h

      #import "shell32.dll"

      but it is giving error error C2027: use of undefined type 'IActiveDesktop' how to resolve this Can anybody help me in this thanks in advance

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      You could try #include <wininet.h> #include <shlobj.h> as I believe there are things in shlobj.h that rely on wininet.h being included first. After that, you might also consider that by default, #import generates definitions inside a namespace, so if that was where IActiveDesktop was being defined, it wouldn't be in the global namespace. You can look at the generated tli/tlh files to see what the namespace is called.

      Steve S Developer for hire

      1 Reply Last reply
      0
      • N neha agarwal27

        Hi all, I am trying to use IActiveDesktop interface in my code. I have included

        #include "shlobj.h"

        and defined this in stdafx.h

        #import "shell32.dll"

        but it is giving error error C2027: use of undefined type 'IActiveDesktop' how to resolve this Can anybody help me in this thanks in advance

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        See Introduction to COM - What It Is and How to Use It. [^] on that article Michael used of IActiveDesktop.


        WhiteSky


        1 Reply Last reply
        0
        • N neha agarwal27

          Hi all, I am trying to use IActiveDesktop interface in my code. I have included

          #include "shlobj.h"

          and defined this in stdafx.h

          #import "shell32.dll"

          but it is giving error error C2027: use of undefined type 'IActiveDesktop' how to resolve this Can anybody help me in this thanks in advance

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          See here.


          "A good athlete is the result of a good and worthy opponent." - David Crow

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          N 1 Reply Last reply
          0
          • D David Crow

            See here.


            "A good athlete is the result of a good and worthy opponent." - David Crow

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            N Offline
            N Offline
            neha agarwal27
            wrote on last edited by
            #5

            thanku all, it solved my problem....

            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