CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Shell Extensions

    Hi, I'm trying to write an ATL Shell Extension using VC5. I've cut the code but I can't get the IDL to link. My object has to support IShellExtInit, so I have placed it in the IDL file. However, I get an unresolved external on IShellExtInit. I am importing objidl.h.

    Do I need to do anything special for shell extensions ? e.g. an SDK ?

    thanks in advance for any help.



  2. #2
    Join Date
    May 1999
    Posts
    6

    Re: Shell Extensions

    Hi,

    You don't have to specify IShellExtInit in your IDL file. You must implement it. So, inherit your coclass from IShellExtInit and add COM_INTERFACE macros in the COM_MAP, like this:

    class ATL_NO_VTABLE CDDD :
    public CComObjectRootEx<CComSingleThreadModel>,
    public CComCoClass<CDDD, &CLSID_DDD>,
    IShellExtInit,
    IShellPropSheetExt
    {
    ...

    BEGIN_COM_MAP(CDDD)
    COM_INTERFACE_ENTRY_IID(IID_IShellExtInit,IShellExtInit)
    COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt,IShellPropSheetExt)
    END_COM_MAP()

    Also include shlguid.h and shlobj.h.
    If you need more, let me know.

    Cosmin


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured