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. COM
  4. COM compiler errors

COM compiler errors

Scheduled Pinned Locked Moved COM
c++helpcsharpvisual-studiocom
7 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.
  • M Offline
    M Offline
    melwyn
    wrote on last edited by
    #1

    Hi, I'm working in VC++ 6.0 and am trying to compile the sample application at http://msdn.microsoft.com/msdnmag/issues/05/06/CAtWork/default.aspx[^] It's a MFC wrapper class for the SHBrowseForFolder API. I'm having trouble resolving some of the compiler errors. I created a .dsw project file from the .sln and .vcproj files using http://www.codeproject.com/tools/prjconverter.asp[^] Some of the compiler errors are below:- D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlbase.h(566) : error C2787: 'IShellFolder' : no GUID has been associated with this object D:\temp\FolderPick\FolderDlg.h(133) : error C2504: 'IFolderFilter' : base class undefined D:\temp\FolderPick\FolderDlg.cpp(101) : error C2065: 'StrRetToBuf' : undeclared identifier D:\temp\FolderPick\FolderDlg.cpp(145) : error C2065: 'BFFM_IUNKNOWN' : undeclared identifier D:\temp\FolderPick\FolderDlg.cpp(145) : error C2051: case expression not constant D:\temp\FolderPick\FolderDlg.cpp(175) : error C2065: 'IFolderFilterSite' : undeclared identifier D:\temp\FolderPick\FolderDlg.cpp(175) : error C2955: 'CComQIPtr' : use of class template requires template argument list D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlbase.h(715) : see declaration of 'CComQIPtr' Where would the GUID of IShellFolder be? Would appreciate any help. Thanks, Mel

    S 1 Reply Last reply
    0
    • M melwyn

      Hi, I'm working in VC++ 6.0 and am trying to compile the sample application at http://msdn.microsoft.com/msdnmag/issues/05/06/CAtWork/default.aspx[^] It's a MFC wrapper class for the SHBrowseForFolder API. I'm having trouble resolving some of the compiler errors. I created a .dsw project file from the .sln and .vcproj files using http://www.codeproject.com/tools/prjconverter.asp[^] Some of the compiler errors are below:- D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlbase.h(566) : error C2787: 'IShellFolder' : no GUID has been associated with this object D:\temp\FolderPick\FolderDlg.h(133) : error C2504: 'IFolderFilter' : base class undefined D:\temp\FolderPick\FolderDlg.cpp(101) : error C2065: 'StrRetToBuf' : undeclared identifier D:\temp\FolderPick\FolderDlg.cpp(145) : error C2065: 'BFFM_IUNKNOWN' : undeclared identifier D:\temp\FolderPick\FolderDlg.cpp(145) : error C2051: case expression not constant D:\temp\FolderPick\FolderDlg.cpp(175) : error C2065: 'IFolderFilterSite' : undeclared identifier D:\temp\FolderPick\FolderDlg.cpp(175) : error C2955: 'CComQIPtr' : use of class template requires template argument list D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlbase.h(715) : see declaration of 'CComQIPtr' Where would the GUID of IShellFolder be? Would appreciate any help. Thanks, Mel

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

      melwyn wrote:

      Where would the GUID of IShellFolder be?

      Should be in comdef.h, so you might need to include that before including atlbase.h; Out of interest, have you downloaded and installed the Feb2003 PSDK? Steve S Developer for hire

      M 1 Reply Last reply
      0
      • S Steve S

        melwyn wrote:

        Where would the GUID of IShellFolder be?

        Should be in comdef.h, so you might need to include that before including atlbase.h; Out of interest, have you downloaded and installed the Feb2003 PSDK? Steve S Developer for hire

        M Offline
        M Offline
        melwyn
        wrote on last edited by
        #3

        Thanks for your reply. Found IShellFolder in that file, but now it can't find CComQIPtr and IFolderFilter. (By the way, nowhere in the project is atlbase.h explicitly included, probably comes indirectly through some other header file. So, I included comdef.h in Stdafx.h) Yes I have Feb 2003 PSDK installed. Does that have some issue? Thanks, Mel

        S 1 Reply Last reply
        0
        • M melwyn

          Thanks for your reply. Found IShellFolder in that file, but now it can't find CComQIPtr and IFolderFilter. (By the way, nowhere in the project is atlbase.h explicitly included, probably comes indirectly through some other header file. So, I included comdef.h in Stdafx.h) Yes I have Feb 2003 PSDK installed. Does that have some issue? Thanks, Mel

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

          melwyn wrote:

          Found IShellFolder in that file, but now it can't find CComQIPtr and IFolderFilter. (By the way, nowhere in the project is atlbase.h explicitly included, probably comes indirectly through some other header file. So, I included comdef.h in Stdafx.h)

          Erm, most of my ATL stuff has the include for atlbase.h in stdafx.h, followed by a module definition, then the rest of the ATL headers I'm using.

          melwyn wrote:

          Yes I have Feb 2003 PSDK installed. Does that have some issue?

          Yes. It includes later header files and libs, as well as a later version of the MIDL compiler. It also happens to be the last version supporting VC6, if that's important. Steve S Developer for hire

          S 1 Reply Last reply
          0
          • S Steve S

            melwyn wrote:

            Found IShellFolder in that file, but now it can't find CComQIPtr and IFolderFilter. (By the way, nowhere in the project is atlbase.h explicitly included, probably comes indirectly through some other header file. So, I included comdef.h in Stdafx.h)

            Erm, most of my ATL stuff has the include for atlbase.h in stdafx.h, followed by a module definition, then the rest of the ATL headers I'm using.

            melwyn wrote:

            Yes I have Feb 2003 PSDK installed. Does that have some issue?

            Yes. It includes later header files and libs, as well as a later version of the MIDL compiler. It also happens to be the last version supporting VC6, if that's important. Steve S Developer for hire

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

            Doh! Having re-read the thread, you aren't using ATL, so "OOPS". However, the IFolderFilter is defined in SHOBJIDL.H, and CComQIPtr is defined in ATLBASE.H too. It might be causing a problem if IFolderFilter isn't defined first, so try shobjidl.h comdef.h atlbase.h in your stdafx.h It works here. Steve S Developer for hire

            M 1 Reply Last reply
            0
            • S Steve S

              Doh! Having re-read the thread, you aren't using ATL, so "OOPS". However, the IFolderFilter is defined in SHOBJIDL.H, and CComQIPtr is defined in ATLBASE.H too. It might be causing a problem if IFolderFilter isn't defined first, so try shobjidl.h comdef.h atlbase.h in your stdafx.h It works here. Steve S Developer for hire

              M Offline
              M Offline
              melwyn
              wrote on last edited by
              #6

              Including atlbase.h took care of CComQIPtr. However I don't have shobjidl.h anywhere on my machine. Is that something that would come only with VC 7, looks that way atleast. (On a different note, I don't have "comdefsp.h" either...i think these are VC 7 files). I tried including shlobj.h but didn't help.

              S 1 Reply Last reply
              0
              • M melwyn

                Including atlbase.h took care of CComQIPtr. However I don't have shobjidl.h anywhere on my machine. Is that something that would come only with VC 7, looks that way atleast. (On a different note, I don't have "comdefsp.h" either...i think these are VC 7 files). I tried including shlobj.h but didn't help.

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

                You should have SHOBJIDL.H and SHOBJIDL.IDL in the platform SDK include directory. Of course, you need to make sure that VC6 is looking in there before it's own directories, and the same for the LIB files (although you may not need them in this project). Steve S Developer for hire

                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