First steps to support sending of pgp/mime messages in outlook: outlook_mime_support
authorMarkus Schaber <markus@pep-security.net>
Sun, 21 Aug 2016 02:05:16 +0200
branchoutlook_mime_support
changeset 115636665ac6c15f
parent 1155 06f616746917
child 1221 b1ba14dd5b9d
First steps to support sending of pgp/mime messages in outlook:
- Add a native helper assembly (mixed mode / C++/CLI) to call MAPI functions.
- Use the new overload to actually get pgp/mime messages (currently hardcoded,
its early debug code)

Using a branch, as the changes need to be analyzed whether they're correct and
really applicable.

We currently need the "Office 2010 Developer Resources" installed in C:\
(top level). I'll see later whether the normal mapi.h is enough, but it gives
some compile errors for now, so we use what works for others for now.
.hgignore
MsgProcessor.cs
pEpForOutlook.csproj
pEpForOutlookNativeHelper/AssemblyInfo.cpp
pEpForOutlookNativeHelper/ReadMe.txt
pEpForOutlookNativeHelper/Stdafx.cpp
pEpForOutlookNativeHelper/Stdafx.h
pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.cpp
pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.h
pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.vcxproj
pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.vcxproj.filters
pEpForOutlookNativeHelper/resource.h
     1.1 --- a/.hgignore	Fri Aug 19 20:11:05 2016 +0200
     1.2 +++ b/.hgignore	Sun Aug 21 02:05:16 2016 +0200
     1.3 @@ -7,3 +7,5 @@
     1.4  Thumbs.db
     1.5  *.user
     1.6  
     1.7 +pEpForOutlookNativeHelper/Debug
     1.8 +pEpForOutlookNativeHelper/x64
     2.1 --- a/MsgProcessor.cs	Fri Aug 19 20:11:05 2016 +0200
     2.2 +++ b/MsgProcessor.cs	Sun Aug 21 02:05:16 2016 +0200
     2.3 @@ -10,6 +10,8 @@
     2.4      /// </summary>
     2.5      internal class MsgProcessor
     2.6      {
     2.7 +        public static _pEp_enc_format EncryptionFormat = _pEp_enc_format.pEp_enc_PGP_MIME;
     2.8 +
     2.9          /// <summary>
    2.10          /// Processes the given PEP message mail item before sending.
    2.11          /// This will handle things like distribution lists, encryption, BCC, etc.
    2.12 @@ -625,7 +627,7 @@
    2.13                  try
    2.14                  {
    2.15                      src = sourceMessage.ToCOMType();
    2.16 -                    ThisAddIn.PEPEngine.encrypt_message(src, out dst, extraKeys);
    2.17 +                    ThisAddIn.PEPEngine.encrypt_message_ex(src, out dst, extraKeys, EncryptionFormat);
    2.18                      success = true;
    2.19                  }
    2.20                  catch (COMException ex)
     3.1 --- a/pEpForOutlook.csproj	Fri Aug 19 20:11:05 2016 +0200
     3.2 +++ b/pEpForOutlook.csproj	Sun Aug 21 02:05:16 2016 +0200
     3.3 @@ -538,6 +538,13 @@
     3.4        <Generator>MSBuild:Compile</Generator>
     3.5      </Page>
     3.6    </ItemGroup>
     3.7 +  <ItemGroup>
     3.8 +    <ProjectReference Include="pEpForOutlookNativeHelper\pEpForOutlookNativeHelper.vcxproj">
     3.9 +      <Project>{b59677ee-a219-44ba-a952-64988945ab9e}</Project>
    3.10 +      <Name>pEpForOutlookNativeHelper</Name>
    3.11 +      <Private>True</Private>
    3.12 +    </ProjectReference>
    3.13 +  </ItemGroup>
    3.14    <!-- Include the build rules for a C# project. -->
    3.15    <PropertyGroup>
    3.16      <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    3.17 @@ -550,7 +557,7 @@
    3.18    <ProjectExtensions>
    3.19      <VisualStudio>
    3.20        <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
    3.21 -        <ProjectProperties HostName="Outlook" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="Outlook" Language="cs" TemplatesPath="VSTOTemplates" DebugInfoExeName="#Software\Microsoft\Office\15.0\Outlook\InstallRoot\Path#outlook.exe" AddItemTemplatesGuid="{A58A78EB-1C92-4DDD-80CF-E8BD872ABFC4}" />
    3.22 +        <ProjectProperties HostName="Outlook" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="14.0" VstxVersion="4.0" ApplicationType="Outlook" Language="cs" TemplatesPath="VSTOTemplates" DebugInfoExeName="#Software\Microsoft\Office\14.0\Outlook\InstallRoot\Path#outlook.exe" AddItemTemplatesGuid="{A58A78EB-1C92-4DDD-80CF-E8BD872ABFC4}" />
    3.23          <Host Name="Outlook" GeneratedCodeNamespace="pEp" PublishedHash="69C324AB27932AA2FBF2B7EA72250886FF164DE6" IconIndex="0">
    3.24            <HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" PublishedHash="0FBE11FE0E084B3A3A2542A0D3FA7161F113BEA5" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
    3.25          </Host>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/pEpForOutlookNativeHelper/AssemblyInfo.cpp	Sun Aug 21 02:05:16 2016 +0200
     4.3 @@ -0,0 +1,40 @@
     4.4 +#include "stdafx.h"
     4.5 +
     4.6 +using namespace System;
     4.7 +using namespace System::Reflection;
     4.8 +using namespace System::Runtime::CompilerServices;
     4.9 +using namespace System::Runtime::InteropServices;
    4.10 +using namespace System::Security::Permissions;
    4.11 +
    4.12 +//
    4.13 +// General Information about an assembly is controlled through the following
    4.14 +// set of attributes. Change these attribute values to modify the information
    4.15 +// associated with an assembly.
    4.16 +//
    4.17 +[assembly:AssemblyTitleAttribute(L"p≡p for Outlook native helper")];
    4.18 +[assembly:AssemblyDescriptionAttribute(L"p≡p for Outlook native helper")];
    4.19 +[assembly:AssemblyConfigurationAttribute(L"")];
    4.20 +[assembly:AssemblyCompanyAttribute(L"p≡p Security SA")];
    4.21 +[assembly:AssemblyProductAttribute(L"p≡p")];
    4.22 +[assembly:AssemblyCopyrightAttribute(L"Copyright © 2016 p≡p Security SA")];
    4.23 +[assembly:AssemblyTrademarkAttribute(L"")];
    4.24 +[assembly:AssemblyCultureAttribute(L"")];
    4.25 +
    4.26 +//
    4.27 +// Version information for an assembly consists of the following four values:
    4.28 +//
    4.29 +//      Major Version
    4.30 +//      Minor Version
    4.31 +//      Build Number
    4.32 +//      Revision
    4.33 +//
    4.34 +// You can specify all the value or you can default the Revision and Build Numbers
    4.35 +// by using the '*' as shown below:
    4.36 +
    4.37 +[assembly:AssemblyVersionAttribute("1.1.3.0")];
    4.38 +
    4.39 +[assembly:GuidAttribute("47CDF5B0-FABD-495C-B8AB-1D617F8ED280")];
    4.40 +
    4.41 +[assembly:ComVisible(false)];
    4.42 +
    4.43 +[assembly:CLSCompliantAttribute(true)];
    4.44 \ No newline at end of file
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/pEpForOutlookNativeHelper/ReadMe.txt	Sun Aug 21 02:05:16 2016 +0200
     5.3 @@ -0,0 +1,38 @@
     5.4 +========================================================================
     5.5 +    DYNAMIC LINK LIBRARY : pEpForOutlookNativeHelper Project Overview
     5.6 +========================================================================
     5.7 +
     5.8 +AppWizard has created this pEpForOutlookNativeHelper DLL for you.  
     5.9 +
    5.10 +This file contains a summary of what you will find in each of the files that
    5.11 +make up your pEpForOutlookNativeHelper application.
    5.12 +
    5.13 +pEpForOutlookNativeHelper.vcxproj
    5.14 +    This is the main project file for VC++ projects generated using an Application Wizard. 
    5.15 +    It contains information about the version of Visual C++ that generated the file, and 
    5.16 +    information about the platforms, configurations, and project features selected with the
    5.17 +    Application Wizard.
    5.18 +
    5.19 +pEpForOutlookNativeHelper.vcxproj.filters
    5.20 +    This is the filters file for VC++ projects generated using an Application Wizard. 
    5.21 +    It contains information about the association between the files in your project 
    5.22 +    and the filters. This association is used in the IDE to show grouping of files with
    5.23 +    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
    5.24 +    "Source Files" filter).
    5.25 +
    5.26 +pEpForOutlookNativeHelper.cpp
    5.27 +    This is the main DLL source file.
    5.28 +
    5.29 +pEpForOutlookNativeHelper.h
    5.30 +    This file contains a class declaration.
    5.31 +
    5.32 +AssemblyInfo.cpp
    5.33 +	Contains custom attributes for modifying assembly metadata.
    5.34 +
    5.35 +/////////////////////////////////////////////////////////////////////////////
    5.36 +Other notes:
    5.37 +
    5.38 +AppWizard uses "TODO:" to indicate parts of the source code you
    5.39 +should add to or customize.
    5.40 +
    5.41 +/////////////////////////////////////////////////////////////////////////////
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/pEpForOutlookNativeHelper/Stdafx.cpp	Sun Aug 21 02:05:16 2016 +0200
     6.3 @@ -0,0 +1,5 @@
     6.4 +// stdafx.cpp : source file that includes just the standard includes
     6.5 +// pEpForOutlookNativeHelper.pch will be the pre-compiled header
     6.6 +// stdafx.obj will contain the pre-compiled type information
     6.7 +
     6.8 +#include "stdafx.h"
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/pEpForOutlookNativeHelper/Stdafx.h	Sun Aug 21 02:05:16 2016 +0200
     7.3 @@ -0,0 +1,23 @@
     7.4 +// stdafx.h : include file for standard system include files,
     7.5 +// or project specific include files that are used frequently,
     7.6 +// but are changed infrequently
     7.7 +
     7.8 +#pragma once
     7.9 +
    7.10 +#define INITGUID
    7.11 +#define USES_IID_IMAPIProp
    7.12 +#define USES_IID_IMessage
    7.13 +#define USES_IID_IMAPISession
    7.14 +#define USES_IID_IProfSect
    7.15 +
    7.16 +#define MAPI_FORCE_ACCESS 0x00080000
    7.17 +#define MAPI_READ 0x00000002
    7.18 +#define GLOBAL_PROFILE_SECTION_MAPIUID "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A"
    7.19 +
    7.20 +#include <MAPIX.h>
    7.21 +#include <MapiUtil.h>
    7.22 +#include <MAPIGuid.h>
    7.23 +#include <MAPITags.h>
    7.24 +
    7.25 +
    7.26 +
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.cpp	Sun Aug 21 02:05:16 2016 +0200
     8.3 @@ -0,0 +1,101 @@
     8.4 +// This is the main DLL file.
     8.5 +
     8.6 +#include "stdafx.h"
     8.7 +
     8.8 +#include "pEpForOutlookNativeHelper.h"
     8.9 +
    8.10 +using namespace System;
    8.11 +using namespace System::Runtime::InteropServices;
    8.12 +using namespace Microsoft::Win32;
    8.13 +
    8.14 +void pEp::OutlookNativeHelper::NativeHelper::Hello()
    8.15 +{
    8.16 +	Hello("Huh?");
    8.17 +}
    8.18 +
    8.19 +void pEp::OutlookNativeHelper::NativeHelper::Hello(String^ message)
    8.20 +{
    8.21 +	System::Windows::Forms::MessageBox::Show(message);	
    8.22 +}
    8.23 +
    8.24 +String ^ pEp::OutlookNativeHelper::NativeHelper::ReadMessageHeaders(Object^ messageMapiObject)
    8.25 +{
    8.26 +	// if we have no MAPIObject everything is senseless...
    8.27 +	if (messageMapiObject == nullptr) 
    8.28 +		throw gcnew System::ArgumentNullException("messageMapiObject", "We need a valid MAPI object!");
    8.29 +
    8.30 +	// Pointers to the interfaces we need.
    8.31 +	IUnknown* pUnknown = 0;
    8.32 +	IMessage* pMessage = 0;
    8.33 +	IMAPIProp* pMAPIProp = 0;
    8.34 +	LPSPropValue lpSPropValue = 0;
    8.35 +	
    8.36 +	try
    8.37 +	{
    8.38 +
    8.39 +		// retrive the IUnknon Interface from our MAPIObject comming from Outlook.
    8.40 +		pUnknown = (IUnknown*)Marshal::GetIUnknownForObject(messageMapiObject).ToPointer();
    8.41 +
    8.42 +		// try to retrieve the IMessage interface, if we don't get it, everything else is sensless.
    8.43 +		if (pUnknown->QueryInterface(IID_IMessage, (void**)&pMessage) != S_OK)
    8.44 +			throw gcnew Exception("QueryInterface failed on IUnknown for IID_Message");
    8.45 +
    8.46 +		// try to retrieve the IMAPIProp interface from IMessage Interface, everything else is sensless.
    8.47 +		if (pMessage->QueryInterface(IID_IMAPIProp, (void**)&pMAPIProp) != S_OK)
    8.48 +			throw gcnew Exception("QueryInterface failed on IMessage for IID_IMAPIProp");
    8.49 +
    8.50 +		// double check, if we wave no pointer, exit...
    8.51 +		if (pMAPIProp == 0) throw gcnew Exception("Unknown Error on receiving the Pointer to MAPI Properties.");
    8.52 +
    8.53 +		// use the HrGetOneProp method to retrieve the profile name property
    8.54 +		// the lpPropValue pointer points to the result value 
    8.55 +		if (HrGetOneProp(pMAPIProp, PR_TRANSPORT_MESSAGE_HEADERS, &lpSPropValue) != S_OK)
    8.56 +			throw gcnew Exception("HrGetOneProp failed for named property !");
    8.57 +
    8.58 +		// create a managed string from the unmanaged string.
    8.59 +		return gcnew String(lpSPropValue->Value.lpszW);
    8.60 +
    8.61 +	}
    8.62 +	catch (Exception^ ex)
    8.63 +	{
    8.64 +		// if an error occures get the MAPI error code
    8.65 +		DWORD dw = GetLastError();
    8.66 +
    8.67 +		// if dw = 0 then there are no Headers for this message
    8.68 +		if (dw == 0) return String::Empty;
    8.69 +
    8.70 +		// and translate it into a human readable message
    8.71 +		ThrowErrorException(dw, ex);
    8.72 +	}
    8.73 +	finally
    8.74 +	{
    8.75 +		// Free Buffer allocated from MAPI
    8.76 +		if (lpSPropValue != 0) MAPIFreeBuffer(lpSPropValue);
    8.77 +
    8.78 +		// cleanup all references to COM Objects
    8.79 +		if (pMAPIProp != 0) pMAPIProp->Release();
    8.80 +		if (pMessage != 0) pMessage->Release();
    8.81 +		if (pUnknown != 0) pUnknown->Release();
    8.82 +	}
    8.83 +}
    8.84 +
    8.85 +String ^ pEp::OutlookNativeHelper::NativeHelper::ReadMessageHeaders(Microsoft::Office::Interop::Outlook::MailItem^ mailItem)
    8.86 +{
    8.87 +	return ReadMessageHeaders(mailItem->MAPIOBJECT);
    8.88 +}
    8.89 +
    8.90 +void pEp::OutlookNativeHelper::NativeHelper::ThrowErrorException(DWORD errorcode, Exception ^ inner)
    8.91 +{
    8.92 +	throw gcnew Exception(GetErrorMessage(errorcode), inner);
    8.93 +}
    8.94 +
    8.95 +Exception ^ pEp::OutlookNativeHelper::NativeHelper::GetErrorException(DWORD errorcode)
    8.96 +{
    8.97 +	auto exception = gcnew System::ComponentModel::Win32Exception(errorcode);
    8.98 +	return exception;
    8.99 +}
   8.100 +
   8.101 +String ^ pEp::OutlookNativeHelper::NativeHelper::GetErrorMessage(DWORD errorcode)
   8.102 +{
   8.103 +	return GetErrorException(errorcode)->Message;
   8.104 +}
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.h	Sun Aug 21 02:05:16 2016 +0200
     9.3 @@ -0,0 +1,29 @@
     9.4 +// pEpForOutlookNativeHelper.h
     9.5 +
     9.6 +#pragma once
     9.7 +
     9.8 +using namespace System;
     9.9 +
    9.10 +namespace pEp {
    9.11 +	namespace OutlookNativeHelper {
    9.12 +
    9.13 +		public ref class NativeHelper
    9.14 +		{
    9.15 +
    9.16 +		public:
    9.17 +			void Hello();
    9.18 +			void Hello(String^ message);
    9.19 +
    9.20 +			String^ ReadMessageHeaders(Object^ mapiobject);
    9.21 +
    9.22 +			String^ ReadMessageHeaders(Microsoft::Office::Interop::Outlook::MailItem^ mailItem);
    9.23 +
    9.24 +		private:
    9.25 +			void ThrowErrorException(DWORD errorcode, Exception^ inner);
    9.26 +
    9.27 +			Exception^ GetErrorException(DWORD errorcode);
    9.28 +
    9.29 +			String^ GetErrorMessage(DWORD errorcode);
    9.30 +		};
    9.31 +	};
    9.32 +}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.vcxproj	Sun Aug 21 02:05:16 2016 +0200
    10.3 @@ -0,0 +1,163 @@
    10.4 +<?xml version="1.0" encoding="utf-8"?>
    10.5 +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    10.6 +  <ItemGroup Label="ProjectConfigurations">
    10.7 +    <ProjectConfiguration Include="Debug|Win32">
    10.8 +      <Configuration>Debug</Configuration>
    10.9 +      <Platform>Win32</Platform>
   10.10 +    </ProjectConfiguration>
   10.11 +    <ProjectConfiguration Include="Release|Win32">
   10.12 +      <Configuration>Release</Configuration>
   10.13 +      <Platform>Win32</Platform>
   10.14 +    </ProjectConfiguration>
   10.15 +    <ProjectConfiguration Include="Debug|x64">
   10.16 +      <Configuration>Debug</Configuration>
   10.17 +      <Platform>x64</Platform>
   10.18 +    </ProjectConfiguration>
   10.19 +    <ProjectConfiguration Include="Release|x64">
   10.20 +      <Configuration>Release</Configuration>
   10.21 +      <Platform>x64</Platform>
   10.22 +    </ProjectConfiguration>
   10.23 +  </ItemGroup>
   10.24 +  <PropertyGroup Label="Globals">
   10.25 +    <ProjectGuid>{B59677EE-A219-44BA-A952-64988945AB9E}</ProjectGuid>
   10.26 +    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
   10.27 +    <Keyword>ManagedCProj</Keyword>
   10.28 +    <RootNamespace>pEpForOutlookNativeHelper</RootNamespace>
   10.29 +    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   10.30 +  </PropertyGroup>
   10.31 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   10.32 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
   10.33 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   10.34 +    <UseDebugLibraries>true</UseDebugLibraries>
   10.35 +    <PlatformToolset>v140</PlatformToolset>
   10.36 +    <CLRSupport>true</CLRSupport>
   10.37 +    <CharacterSet>Unicode</CharacterSet>
   10.38 +  </PropertyGroup>
   10.39 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
   10.40 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   10.41 +    <UseDebugLibraries>false</UseDebugLibraries>
   10.42 +    <PlatformToolset>v140</PlatformToolset>
   10.43 +    <CLRSupport>true</CLRSupport>
   10.44 +    <CharacterSet>Unicode</CharacterSet>
   10.45 +  </PropertyGroup>
   10.46 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
   10.47 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   10.48 +    <UseDebugLibraries>true</UseDebugLibraries>
   10.49 +    <PlatformToolset>v140</PlatformToolset>
   10.50 +    <CLRSupport>true</CLRSupport>
   10.51 +    <CharacterSet>Unicode</CharacterSet>
   10.52 +  </PropertyGroup>
   10.53 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
   10.54 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   10.55 +    <UseDebugLibraries>false</UseDebugLibraries>
   10.56 +    <PlatformToolset>v140</PlatformToolset>
   10.57 +    <CLRSupport>true</CLRSupport>
   10.58 +    <CharacterSet>Unicode</CharacterSet>
   10.59 +  </PropertyGroup>
   10.60 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   10.61 +  <ImportGroup Label="ExtensionSettings">
   10.62 +  </ImportGroup>
   10.63 +  <ImportGroup Label="Shared">
   10.64 +  </ImportGroup>
   10.65 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   10.66 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   10.67 +  </ImportGroup>
   10.68 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   10.69 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   10.70 +  </ImportGroup>
   10.71 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
   10.72 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   10.73 +  </ImportGroup>
   10.74 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
   10.75 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   10.76 +  </ImportGroup>
   10.77 +  <PropertyGroup Label="UserMacros" />
   10.78 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   10.79 +    <LinkIncremental>true</LinkIncremental>
   10.80 +    <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
   10.81 +  </PropertyGroup>
   10.82 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
   10.83 +    <LinkIncremental>true</LinkIncremental>
   10.84 +    <IncludePath>C:\Office 2010 Developer Resources\Outlook 2010 MAPI Headers;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
   10.85 +  </PropertyGroup>
   10.86 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   10.87 +    <LinkIncremental>false</LinkIncremental>
   10.88 +  </PropertyGroup>
   10.89 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
   10.90 +    <LinkIncremental>false</LinkIncremental>
   10.91 +  </PropertyGroup>
   10.92 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   10.93 +    <ClCompile>
   10.94 +      <WarningLevel>Level3</WarningLevel>
   10.95 +      <Optimization>Disabled</Optimization>
   10.96 +      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   10.97 +      <PrecompiledHeader>Use</PrecompiledHeader>
   10.98 +    </ClCompile>
   10.99 +    <Link>
  10.100 +      <AdditionalDependencies />
  10.101 +    </Link>
  10.102 +  </ItemDefinitionGroup>
  10.103 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
  10.104 +    <ClCompile>
  10.105 +      <WarningLevel>Level3</WarningLevel>
  10.106 +      <Optimization>Disabled</Optimization>
  10.107 +      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  10.108 +      <PrecompiledHeader>Create</PrecompiledHeader>
  10.109 +      <MinimalRebuild>
  10.110 +      </MinimalRebuild>
  10.111 +    </ClCompile>
  10.112 +    <Link>
  10.113 +      <AdditionalDependencies>mapi32.lib;comsuppwd.lib;%(AdditionalDependencies)</AdditionalDependencies>
  10.114 +    </Link>
  10.115 +  </ItemDefinitionGroup>
  10.116 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  10.117 +    <ClCompile>
  10.118 +      <WarningLevel>Level3</WarningLevel>
  10.119 +      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  10.120 +      <PrecompiledHeader>Use</PrecompiledHeader>
  10.121 +    </ClCompile>
  10.122 +    <Link>
  10.123 +      <AdditionalDependencies />
  10.124 +    </Link>
  10.125 +  </ItemDefinitionGroup>
  10.126 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
  10.127 +    <ClCompile>
  10.128 +      <WarningLevel>Level3</WarningLevel>
  10.129 +      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  10.130 +      <PrecompiledHeader>Use</PrecompiledHeader>
  10.131 +      <MinimalRebuild>false</MinimalRebuild>
  10.132 +    </ClCompile>
  10.133 +    <Link>
  10.134 +      <AdditionalDependencies>mapi32.lib;comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
  10.135 +    </Link>
  10.136 +  </ItemDefinitionGroup>
  10.137 +  <ItemGroup>
  10.138 +    <Reference Include="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
  10.139 +    <Reference Include="System" />
  10.140 +    <Reference Include="System.Data" />
  10.141 +    <Reference Include="System.Windows.Forms" />
  10.142 +    <Reference Include="System.Xml" />
  10.143 +  </ItemGroup>
  10.144 +  <ItemGroup>
  10.145 +    <ClInclude Include="pEpForOutlookNativeHelper.h" />
  10.146 +    <ClInclude Include="resource.h" />
  10.147 +    <ClInclude Include="Stdafx.h" />
  10.148 +  </ItemGroup>
  10.149 +  <ItemGroup>
  10.150 +    <ClCompile Include="AssemblyInfo.cpp" />
  10.151 +    <ClCompile Include="pEpForOutlookNativeHelper.cpp" />
  10.152 +    <ClCompile Include="Stdafx.cpp">
  10.153 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
  10.154 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
  10.155 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
  10.156 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
  10.157 +      <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsManaged>
  10.158 +    </ClCompile>
  10.159 +  </ItemGroup>
  10.160 +  <ItemGroup>
  10.161 +    <Text Include="ReadMe.txt" />
  10.162 +  </ItemGroup>
  10.163 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  10.164 +  <ImportGroup Label="ExtensionTargets">
  10.165 +  </ImportGroup>
  10.166 +</Project>
  10.167 \ No newline at end of file
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/pEpForOutlookNativeHelper/pEpForOutlookNativeHelper.vcxproj.filters	Sun Aug 21 02:05:16 2016 +0200
    11.3 @@ -0,0 +1,42 @@
    11.4 +<?xml version="1.0" encoding="utf-8"?>
    11.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    11.6 +  <ItemGroup>
    11.7 +    <Filter Include="Source Files">
    11.8 +      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
    11.9 +      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
   11.10 +    </Filter>
   11.11 +    <Filter Include="Header Files">
   11.12 +      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
   11.13 +      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
   11.14 +    </Filter>
   11.15 +    <Filter Include="Resource Files">
   11.16 +      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
   11.17 +      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
   11.18 +    </Filter>
   11.19 +  </ItemGroup>
   11.20 +  <ItemGroup>
   11.21 +    <ClInclude Include="pEpForOutlookNativeHelper.h">
   11.22 +      <Filter>Header Files</Filter>
   11.23 +    </ClInclude>
   11.24 +    <ClInclude Include="Stdafx.h">
   11.25 +      <Filter>Header Files</Filter>
   11.26 +    </ClInclude>
   11.27 +    <ClInclude Include="resource.h">
   11.28 +      <Filter>Header Files</Filter>
   11.29 +    </ClInclude>
   11.30 +  </ItemGroup>
   11.31 +  <ItemGroup>
   11.32 +    <ClCompile Include="pEpForOutlookNativeHelper.cpp">
   11.33 +      <Filter>Source Files</Filter>
   11.34 +    </ClCompile>
   11.35 +    <ClCompile Include="AssemblyInfo.cpp">
   11.36 +      <Filter>Source Files</Filter>
   11.37 +    </ClCompile>
   11.38 +    <ClCompile Include="Stdafx.cpp">
   11.39 +      <Filter>Source Files</Filter>
   11.40 +    </ClCompile>
   11.41 +  </ItemGroup>
   11.42 +  <ItemGroup>
   11.43 +    <Text Include="ReadMe.txt" />
   11.44 +  </ItemGroup>
   11.45 +</Project>
   11.46 \ No newline at end of file
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/pEpForOutlookNativeHelper/resource.h	Sun Aug 21 02:05:16 2016 +0200
    12.3 @@ -0,0 +1,3 @@
    12.4 +//{{NO_DEPENDENCIES}}
    12.5 +// Microsoft Visual C++ generated include file.
    12.6 +// Used by app.rc