CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006
    Posts
    645

    C++ outlook 2010 sample add-in build issue

    Hi all,

    I am currently trying to follow the article at:
    http://<br /> http://msdn.microsoft...14).aspx<br />

    The sample code for this application is available at:
    http://<br /> http://code.msdn.micr...0358a023<br />

    Basically, this article shows us how to build an outlook 2010 add-in using ATL, XML, COM, Form Regions. I have followed the steps. Although, the article is for VS 2010 and Outlook 2010, I was able get rid of most of the errors on VS 2008 but a few remained (only 3 infact) and those were asking me to upgrade to VS 2008 sp1. However, it is giving me some errors on VS 2010 that are related to #import directives included in StdAfx.h.

    The following is the code available in StdAfx.h
    Code:
    // stdafx.h : include file for standard system include files,
    // or project specific include files that are used frequently,
    // but are changed infrequently
    
    #pragma once
    
    #ifndef STRICT
    #define STRICT
    #endif
    
    #include "targetver.h"
    
    #define _ATL_APARTMENT_THREADED
    #define _ATL_NO_AUTOMATIC_NAMESPACE
    #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// some CString constructors will be explicit
    #define ATL_NO_ASSERT_ON_DESTROY_NONEXISTENT_WINDOW
    
    #include "resource.h"
    #include <atlbase.h>
    #include <atlcom.h>
    #include <atlctl.h>
    
    #import "libid:AC0714F2-3D04-11D1-AE7D-00A0C90F26F4"\
    auto_rename auto_search raw_interfaces_only rename_namespace("AddinDesign")
    
    // Office type library (i.e., mso.dll).
    #import "libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52"\
        auto_rename auto_search raw_interfaces_only rename_namespace("Office")
    using namespace AddinDesign;
    using namespace Office;
    The errors I am getting are as follows:
    Code:
    	1	IntelliSense: cannot open source file "C:/Bhushan/NativeAddIn/NativeAddIn/Debug/libid:AC0714F2-3D04-11D1-AE7D-00A0C90F26F4.tlh"	c:\bhushan\nativeaddin\nativeaddin\stdafx.h	28	2	NativeAddIn
    	2	IntelliSense: cannot open source file "C:/Bhushan/NativeAddIn/NativeAddIn/Debug/libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52.tlh"	c:\bhushan\nativeaddin\nativeaddin\stdafx.h	32	2	NativeAddIn
    	3	IntelliSense: name must be a namespace name	c:\bhushan\nativeaddin\nativeaddin\stdafx.h	34	18	NativeAddIn
    	4	IntelliSense: name must be a namespace name	c:\bhushan\nativeaddin\nativeaddin\stdafx.h	35	18	NativeAddIn
    I do not have much understanding of how to find out which libs are being refered using libid: prefix. Also, how to search a particular tlb or lib in a path with OLE-COM viewer? Can any one please tell me how to find a tlb using a GUID? Please help me get rid of these errors.

    Thanks,

    Bhushan.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

Tags for this Thread

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