minor cleanups
authorWerner Koch <wk@gnupg.org>
Tue, 30 Aug 2005 10:38:35 +0000 (10:38 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 30 Aug 2005 10:38:35 +0000 (10:38 +0000)
30 files changed:
README
olflange/Banner_08.BMP [deleted file]
olflange/ChangeLog [deleted file]
olflange/GPGExch.aps [deleted file]
olflange/GPGExch.clw [deleted file]
olflange/GPGExch.cpp [deleted file]
olflange/GPGExch.def [deleted file]
olflange/GPGExch.dsp [deleted file]
olflange/GPGExch.dsw [deleted file]
olflange/GPGExch.h [deleted file]
olflange/GPGExch.plg [deleted file]
olflange/GPGExchange.h [deleted file]
olflange/GPGOptions.cpp [deleted file]
olflange/GPGOptionsDlg.cpp [deleted file]
olflange/Makefile.am [deleted file]
olflange/StdAfx.cpp [deleted file]
olflange/StdAfx.h [deleted file]
olflange/TODO.txt [deleted file]
olflange/bin/INSTALL [deleted file]
olflange/bin/olgpgmain.dll.bz2 [deleted file]
olflange/bitmap1.bmp [deleted file]
olflange/decrypt.bmp [deleted file]
olflange/encrypt.bmp [deleted file]
olflange/key_mana.bmp [deleted file]
olflange/olgpgmaindlgs.rc [deleted file]
olflange/resource.h [deleted file]
olflange/sign.bmp [deleted file]
src/ChangeLog
src/olflange-dlgs.cpp
src/olflange.cpp

diff --git a/README b/README
index f3eef2f..5066bc7 100644 (file)
--- a/README
+++ b/README
@@ -1,26 +1,41 @@
 Package: outlgpg
-Contact: outl@g10code.com
+Contact: outlgpg@g10code.com
+Bugs:    bug-outlgpg@g10code.com
 
-This is a plugin for MS Outlook, formerly known as the G-DATA plugin.
-There has been no development on this tool for a couple of years and
-thus we started to rewrite it from scratch.
+This is a GPG plugin for MS Outlook, formerly known as the G-DATA
+plugin.  There has been no development on this tool for a couple of
+years and thus we started to rewrite it from scratch.
 
 
 .          Top directory with build scripts and information files.
 
 src/       Code to build the actual core of the plugin.  The resulting
-           DLL will be named "outlgpg.dll".  It is to build using
+           DLL will be named "outlgpg.dll".  It is to be build using
            the Mingw toolchain.
 
-bin/       Precompiled binaries.
+To install this plugin, copy it some directory (e.g. where gpg lives),
+make sure that the libgpg-error.dll and gpgme.dll are available in a
+directory where Windows searches for DLLs (e.g. c:\winnt\system32),
+stop Outlook, run the command "revsvr32 outlgpg.dll" and start
+outlook. You should then find a new tab named "GnuPG" in Outlook's
+option menu.
 
-
-
-Note: For building in src/ you need to throw an orginal mapi32.dll
-into this directory.  This is due to a bug in the binutiuls: ld is not
-able to properly read an DEF file but will happily use the same
+Note: For building in src/ you need to throw an original mapi32.dll
+into this directory.  This is due to a bug in the binutils: ld is not
+able to properly read a DEF file but will happily use the same
 information from an actual DLL.  The problem is that symbols like
 HrSetOneProp@8 are actually written without the "@8" into the import
 table when used with a DEF file and generated import lib.  Needs more
 debugging - any BFD cracks who can lend me a helping hand?  (wk).
 
+Bug reporting: First click on the logo on the GnuPG options tab to
+check whether a neer version has been released - try this first.  If
+this does not help, check out the mailing lists and also the bug
+archive at http://bugs.gnupg.org (use username and password "guest",
+select "query" and there category "outlgpg") if you did not found any
+information there please send a report, including all relevant version
+numbers to the bug email address as given on top of this file.
+
+
+
+
diff --git a/olflange/Banner_08.BMP b/olflange/Banner_08.BMP
deleted file mode 100644 (file)
index d23429c..0000000
Binary files a/olflange/Banner_08.BMP and /dev/null differ
diff --git a/olflange/ChangeLog b/olflange/ChangeLog
deleted file mode 100644 (file)
index 2b853e0..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-2005-08-12  Timo Schulz  <ts@g10code.com>
-
-       * GPGExch.cpp (DllRegisterServer): Also create the OutlGPG
-       registry folder.
-
-2005-08-11  Werner Koch  <wk@g10code.com>
-
-       * GPGExch.cpp (ExchLogInfo): Changed to make use of
-       MapiGPGME->logDebug.
-
-2005-08-09  Timo Schulz  <ts@g10code.com>
-
-       * GPGOptionsDlg.cpp: Include MapiGPGME.h and
-       HashTable.h from ../src. This fixes the unresolved
-       object problem.
-
-2005-08-09  Werner Koch  <wk@g10code.com>
-
-       * GPGExch.cpp: Removed HashTable.h.  Include MapiGPGME.h from
-       ../src.
-       (CGPGExchExt): Use factory method instead of new to create the
-       gpgme object.
-
-2005-07-18  Timo Schulz  <twoaday@g10code.com>
-
-       * GPGExch.cpp (GetPages): Native language support.
-       * GPGExch.rc: New dialog in German.
-
-2005-07-05  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGOptionsDlg.cpp (GPGOptionsDlgProc): Support
-       for 'sign attachment' flag.
-
-2005-06-16  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGOptionsDlg.cpp (GPGOptionsDlgProc#PSN_ACTIVE):
-       Reset the bool value if no default key value was set.
-
-2005-06-14  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGExch.cpp (Help): Use appropriate array boundaries.
-       (OnWriteComplete): Removed unused code.
-       (CGPGExchExt): There is no need to initialize the COM
-       library any longer.
-       (~CGPGExchExt): Likewise, but we don't need to unload it.
-       * GPGOptionsDlg.cpp (GPGOptionsDlgProc): Support to
-       store also the default 'encrypt-to' ID.
-
-2005-05-03  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGExch.cpp: Remove 'Add standard key' items.
-       Use symbolic names for constants and not Command1, 2...
-
-2005-05-02  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGExch.cpp (OnWriteComplete): Replaced old gdgpg
-       code with the new gpgmedlgs code.
-
-2005-02-15  Timo Schulz  <twoaday@g10code.de>
-
-       * GPG.cpp: Fixed indent level and minor tweaks.
-       * GPGExch.cpp (OnRead): Do not allow to modify the object
-       unless it has encrypted attachments. This propably fixes the
-       problem that mails are sometimes stored in plaintext.
-
-2005-02-14  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGExch.cpp (OnRead): Check return value. Noted by Dennis Martin.
-       Free all buffers and be stricter with return codes.
-       * GPGMessage.cpp (isUnset): Likewise.
-       * GPG.cpp (ProcessAttachments): If we only sign without encryption,
-       add .sig and not .pgp. Also noted by Dennis Martin.
-               
-2005-01-18  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGExch.cpp (ExchLogInfo): New.
-       (OnRead): Log all errors.
-
-2004-11-17  Timo Schulz  <twoaday@g10code.de>
-
-       * GPG.cpp (ReadGPGOptions): Initialize m_LogFile to NULL.
-       (DecryptMessage): Delete temp file left over from a possible
-       cleartext verification. Noted by Achim.
-
-2004-10-27  Timo Schulz  <twoaday@g10code.de>
-
-       * GPG.cpp (ProcessAttachments): Set default extension to
-       PGP since this will enhance the PGP compatibility.
-       * GPGExch.cpp (OnRead): Supress the question if we the
-       mail is application/pgp.
-
-2004-10-25  Timo Schulz  <twoaday@g10code.de>
-
-       * GPG.cpp (CheckPGPMime): Generic function to figure out the
-       MIME type and to provide an interface for upcoming PGP/MIME
-       support.
-       (ConvertOldPGP): Convert application/pgp message to
-       inline-PGP messages readable by Outlook.
-       (MsgFromFile): New. Factored out some common code.
-       * GPGExch.cpp (OnRead): Use the new code.
-
-2004-10-06  Timo Schulz  <twoaday@g10code.de>
-
-       * GPGExch.cpp (OnRead): Show the original message
-       if the decryption was canceled.
-       
-       Ask if the user also wants to decrypt the attachments.
-
-2004-09-08  Timo Schulz  <twoaday@g10code.de>
-
-       * GPG.cpp (~CGPG): New. Destructor to free
-       memory which was internally used.
-       (SetLogFile): Use char* instead of BSTR.
-       (GetLogFile): Likewise.
-       (GPGOptionsDlgProc): Changed all callers.
-       (Init): Enable logginf if requested.
-
-2004-09-06  Timo Schulz  <twoaday@g10code.de>
-
-       * GDGPGWrapper.cpp (SetLogLevel): New.
-       (SetLogFile): New.
-       * GPGOptionsDlg.cpp (GPGOptionsDlgProc): Implement logging field.
-       * GPG.cpp (ReadGPGOptions): Likewise.
-       (WriteGPGOptions): Likewise.
-
-2004-08-23  Timo Schulz  <twoaday@freakmail.de>
-
-       * GPG.cpp (EncryptAndSignMessage): Kludge to
-       set the message. After the new GPG I/O subsystem,
-       the old code does not work any longer.
-
-       * GPGExch.cpp (OnRead): Support for PGP keys. Do
-       not process unsent messages.
-
-2004-08-01  Timo Schulz  <twoaday@freakmail.de>
-
-       * GPG.cpp (QuotedPrintEncode): New.
-
-2004-07-31  Timo Schulz  <twoaday@freakmail.de>
-
-       * GDGPGWrapper.cpp (VerifyDetachedSignature): New.
-       * GPG.cpp (VerifyDetachedSignature): New.
-
-2004-07-27  Timo Schulz  <twoaday@freakmail.de>
-
-       * GPG.cpp (CheckPGPMime): New.
-       (ProcessPGPMime): New.
-
-2004-07-24  Timo Schulz  <twoaday@freakmail.de>
-
-       * GPGExch.cpp (OnRead): Use the internal GPG object to
-       use passphrase caching. Do not modify the message in
-       case of an error.
-
-       Output GPG messages as the message body.
-
-       * GPG.cpp (DecryptFile): New. Internal function.
-       (CGPG): Initialize m_gpgStderr and m_gpgInfo to zero.
-       (GetGPGOutput): New.
-       (GetGPGInfo): New.
-
-       * GDGPGWrapper.cpp (GetGPGOutput): New.
-
-
-2004-07-20  Timo Schulz  <twoaday@freakmail.de>
-
-       * GPGExch.cpp (OnRead): Implemented the decryption of
-       messages to answer the plaintext.
-
-       * GPGOptionsDlg.cpp (GPGOptionsDlgProc): Added all involved
-       parties in the 'About Info'.
-
diff --git a/olflange/GPGExch.aps b/olflange/GPGExch.aps
deleted file mode 100644 (file)
index f15c5fe..0000000
Binary files a/olflange/GPGExch.aps and /dev/null differ
diff --git a/olflange/GPGExch.clw b/olflange/GPGExch.clw
deleted file mode 100644 (file)
index 1de4dfe..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-; CLW file contains information for the MFC ClassWizard\r
-\r
-[General Info]\r
-Version=1\r
-ClassCount=1\r
-Class1=CGPGExchApp\r
-LastClass=CGPGExchApp\r
-NewFileInclude2=#include "GPGExch.h"\r
-ResourceCount=1\r
-NewFileInclude1=#include "stdafx.h"\r
-Resource1=IDD_GPG_OPTIONS\r
-\r
-[CLS:CGPGExchApp]\r
-Type=0\r
-HeaderFile=GPGExch.h\r
-ImplementationFile=GPGExch.cpp\r
-Filter=N\r
-LastObject=CGPGExchApp\r
-\r
-[DLG:IDD_GPG_OPTIONS]\r
-Type=1\r
-Class=?\r
-ControlCount=16\r
-Control1=IDC_STATIC,button,1342177287\r
-Control2=IDC_ENCRYPT_DEFAULT,button,1342242819\r
-Control3=IDC_SIGN_DEFAULT,button,1342242819\r
-Control4=IDC_ENCRYPT_WITH_STANDARD_KEY,button,1342242819\r
-Control5=IDC_SAVE_DECRYPTED,button,1342242819\r
-Control6=IDC_STATIC,button,1342177287\r
-Control7=IDC_STATIC,static,1342308352\r
-Control8=IDC_TIME_PHRASES,edit,1350631552\r
-Control9=IDC_STATIC,static,1342308352\r
-Control10=IDC_STATIC,button,1342177287\r
-Control11=IDC_STATIC,static,1342308352\r
-Control12=IDC_DEBUG_LOGFILE,edit,1350631552\r
-Control13=IDC_GPG_OPTIONS,button,1342242816\r
-Control14=IDC_STATIC,static,1342308352\r
-Control15=IDC_BITMAP,static,1342179342\r
-Control16=IDC_VERSION_INFO,static,1342308352\r
-\r
diff --git a/olflange/GPGExch.cpp b/olflange/GPGExch.cpp
deleted file mode 100644 (file)
index 46eada5..0000000
+++ /dev/null
@@ -1,946 +0,0 @@
-/* GPGExch.cpp - exchange extension classes
- *     Copyright (C) 2001 G Data Software AG, http://www.gdata.de
- *     Copyright (C) 2004, 2005 g10 Code GmbH
- * 
- * This file is part of the G DATA Outlook Plugin for GnuPG.
- * 
- * This plugin is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * 
- * This plugin is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General
- * Public License along with this plugin; if not, write to the 
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <windows.h>
-
-
-#ifndef INITGUID
-#define INITGUID
-#endif
-#include <initguid.h>
-// #include <mapiguid.h>
-#include "../src/mymapi.h"
-#include "../src/mymapitags.h"
-#include "myexchext.h"
-
-#include "GPGExchange.h"
-#include "GPGExch.h"
-#include "../src/MapiGPGME.h"
-
-
-/* The instance of this module. */
-static HINSTANCE m_hInstance;
-
-
-BOOL g_bInitDll = FALSE;
-MapiGPGME *m_gpg = NULL;
-
-
-/* DLL entry point. */
-EXTERN_C int WINAPI
-DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
-{
-  fprintf (stderr, "entering dllmain.  reason=%d\n", reason);
-  
-  if (reason == DLL_PROCESS_ATTACH )
-    {
-      m_hInstance = hinst;
-      fprintf (stderr, "hinst = %p\n", hinst);
-      
-    }
-
-  return TRUE;
-}
-
-static void 
-ExchLogInfo (const char * fmt, ...)
-{
-    if (m_gpg) {
-        va_list a;
-  
-        va_start (a, fmt);
-        m_gpg->logDebug (fmt, a);
-        va_end (a);
-    }
-}
-
-
-
-
-/* DllRegisterServer
- Registers this object as exchange extension. Sets the contextes which are 
- implemented by this object. */
-STDAPI 
-DllRegisterServer (void)
-{    
-    HKEY hkey;
-    CHAR szKeyBuf[1024];
-    CHAR szEntry[512];
-    TCHAR szModuleFileName[MAX_PATH];
-    DWORD dwTemp = 0;
-    long ec;
-
-    /* get server location */
-    if (!GetModuleFileName(m_hInstance, szModuleFileName, MAX_PATH))
-        return E_FAIL;
-
-    lstrcpy (szKeyBuf, "Software\\Microsoft\\Exchange\\Client\\Extensions");
-    lstrcpy (szEntry, "4.0;");
-    lstrcat (szEntry, szModuleFileName);
-    lstrcat (szEntry, ";1;11000111111100");  /* context information */
-    ec = RegCreateKeyEx (HKEY_LOCAL_MACHINE, szKeyBuf, 0, NULL, 
-                                  REG_OPTION_NON_VOLATILE,
-                                  KEY_ALL_ACCESS, NULL, &hkey, NULL);
-    if (ec != ERROR_SUCCESS) {
-       ExchLogInfo ("DllRegisterServer failed\n");
-       return E_ACCESSDENIED;
-    }
-    
-    dwTemp = lstrlen (szEntry) + 1;
-    RegSetValueEx (hkey, "OutlGPG", 0, REG_SZ, (BYTE*) szEntry, dwTemp);
-
-    /* set outlook update flag */
-    strcpy (szEntry, "4.0;Outxxx.dll;7;000000000000000;0000000000;OutXXX");
-    dwTemp = lstrlen (szEntry) + 1;
-    RegSetValueEx (hkey, "Outlook Setup Extension", 0, REG_SZ, (BYTE*) szEntry, dwTemp);
-    RegCloseKey (hkey);
-    
-    hkey = NULL;
-    lstrcpy (szKeyBuf, "Software\\GNU\\OutlGPG");
-    RegCreateKeyEx (HKEY_CURRENT_USER, szKeyBuf, 0, NULL,
-                   REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL);
-    if (hkey != NULL)
-       RegCloseKey (hkey);
-
-    ExchLogInfo ("DllRegisterServer succeeded\n");
-    return S_OK;
-}
-
-
-/* DllUnregisterServer - Unregisters this object in the exchange extension list. */
-STDAPI 
-DllUnregisterServer (void)
-{
-    HKEY hkey;
-    CHAR szKeyBuf[1024];
-
-    lstrcpy(szKeyBuf, "Software\\Microsoft\\Exchange\\Client\\Extensions");
-    /* create and open key and subkey */
-    long lResult = RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKeyBuf, 0, NULL, 
-                                   REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 
-                                   NULL, &hkey, NULL);
-    if (lResult != ERROR_SUCCESS) {
-       ExchLogInfo ("DllUnregisterServer: access denied.\n");
-       return E_ACCESSDENIED;
-    }
-    RegDeleteValue (hkey, "OutlGPG");
-    /* set outlook update flag */
-    CHAR szEntry[512];
-    strcpy (szEntry, "4.0;Outxxx.dll;7;000000000000000;0000000000;OutXXX");
-    DWORD dwTemp = lstrlen (szEntry) + 1;
-    RegSetValueEx (hkey, "Outlook Setup Extension", 0, REG_SZ, (BYTE*) szEntry, dwTemp);
-    RegCloseKey (hkey);
-
-    return S_OK;
-}
-
-
-
-
-
-/* ExchEntryPoint -
- The entry point which Exchange calls.
- This is called for each context entry. Creates a new CAvkExchExt object
- every time so each context will get its own CAvkExchExt interface.
- Return value: Pointer to Exchange Extension Object */
-EXTERN_C LPEXCHEXT __stdcall
-ExchEntryPoint (void)
-{
-    ExchLogInfo ("extension entry point...\n");
-    return new CGPGExchExt;
-}
-
-
-/* constructor of CGPGExchExt
- Initializes members and creates the interface objects for the new context.
- Does the dll initialization if it was not done before. */
-CGPGExchExt::CGPGExchExt (void)
-{ 
-    m_lRef = 1;
-    m_lContext = 0;
-    m_hWndExchange = 0;
-    m_gpgEncrypt = FALSE;
-    m_gpgSign = FALSE;
-    m_pExchExtMessageEvents = new CGPGExchExtMessageEvents (this);
-    m_pExchExtCommands = new CGPGExchExtCommands (this);
-    m_pExchExtPropertySheets = new CGPGExchExtPropertySheets (this);
-    if (!g_bInitDll) {
-       if (m_gpg == NULL) {
-           m_gpg = CreateMapiGPGME (NULL);
-           m_gpg->readOptions ();
-       }
-       g_bInitDll = TRUE;
-       ExchLogInfo("CGPGExchExt load\n");
-    }
-    else
-       ExchLogInfo("CGPGExchExt exists\n");
-}
-
-
-/* constructor of CGPGExchExt - Uninitializes the dll in the dession context. */
-CGPGExchExt::~CGPGExchExt (void) 
-{
-    if (m_lContext == EECONTEXT_SESSION) {
-       if (g_bInitDll) {
-           if (m_gpg != NULL) {
-               m_gpg->writeOptions ();
-               delete m_gpg;
-               m_gpg = NULL;
-           }
-           g_bInitDll = FALSE;
-       }       
-    }
-}
-
-
-/* CGPGExchExt::QueryInterface
- Called by Exchage to request for interfaces.
-
- Return value: S_OK if the interface is supported, otherwise E_NOINTERFACE: */
-STDMETHODIMP 
-CGPGExchExt::QueryInterface(
-       REFIID riid,      // The interface ID.
-       LPVOID * ppvObj)  // The address of interface object pointer.
-{
-    HRESULT hr = S_OK;
-
-    *ppvObj = NULL;
-
-    if ((riid == IID_IUnknown) || (riid == IID_IExchExt)) {
-        *ppvObj = (LPUNKNOWN) this;
-    }
-    else if (riid == IID_IExchExtMessageEvents) {
-        *ppvObj = (LPUNKNOWN) m_pExchExtMessageEvents;
-    }
-    else if (riid == IID_IExchExtCommands) {
-        *ppvObj = (LPUNKNOWN)m_pExchExtCommands;
-        m_pExchExtCommands->SetContext(m_lContext);
-    }
-    else if (riid == IID_IExchExtPropertySheets) {
-       if (m_lContext != EECONTEXT_PROPERTYSHEETS)
-           return E_NOINTERFACE;
-        *ppvObj = (LPUNKNOWN) m_pExchExtPropertySheets;
-    }
-    else
-        hr = E_NOINTERFACE;
-
-    if (*ppvObj != NULL)
-        ((LPUNKNOWN)*ppvObj)->AddRef();
-
-    /*ExchLogInfo("QueryInterface %d\n", __LINE__);*/
-    return hr;
-}
-
-
-/* CGPGExchExt::Install
- Called once for each new context. Checks the exchange extension version 
- number and the context.
- Return value: S_OK if the extension should used in the requested context, 
-               otherwise S_FALSE. */
-STDMETHODIMP CGPGExchExt::Install(
-       LPEXCHEXTCALLBACK pEECB, // The pointer to Exchange Extension callback function.
-       ULONG lContext,          // The context code at time of being called.
-       ULONG lFlags)            // The flag to say if install is for modal or not.
-{
-    ULONG lBuildVersion;
-
-    m_lContext = lContext;
-
-    /*ExchLogInfo("Install %d\n", __LINE__);*/
-    // check the version 
-    pEECB->GetVersion (&lBuildVersion, EECBGV_GETBUILDVERSION);
-    if (EECBGV_BUILDVERSION_MAJOR != (lBuildVersion & EECBGV_BUILDVERSION_MAJOR_MASK))
-        return S_FALSE;
-
-    // and the context
-    if ((lContext == EECONTEXT_PROPERTYSHEETS) ||
-       (lContext == EECONTEXT_SENDNOTEMESSAGE) ||
-       (lContext == EECONTEXT_SENDPOSTMESSAGE) ||
-       (lContext == EECONTEXT_SENDRESENDMESSAGE) ||
-       (lContext == EECONTEXT_READNOTEMESSAGE) ||
-       (lContext == EECONTEXT_READPOSTMESSAGE) ||
-       (lContext == EECONTEXT_READREPORTMESSAGE) ||
-       (lContext == EECONTEXT_VIEWER))
-       return S_OK;
-    return S_FALSE;
-}
-
-
-CGPGExchExtMessageEvents::CGPGExchExtMessageEvents (CGPGExchExt *pParentInterface)
-{ 
-    m_pExchExt = pParentInterface;
-    m_lRef = 0; 
-    m_bOnSubmitCalled = FALSE;
-};
-
-
-STDMETHODIMP 
-CGPGExchExtMessageEvents::QueryInterface (REFIID riid, LPVOID FAR *ppvObj)
-{   
-    *ppvObj = NULL;
-    if (riid == IID_IExchExtMessageEvents) {
-        *ppvObj = (LPVOID)this;
-        AddRef();
-        return S_OK;
-    }
-    if (riid == IID_IUnknown) {
-        *ppvObj = (LPVOID)m_pExchExt;  
-        m_pExchExt->AddRef();
-        return S_OK;
-    }
-    return E_NOINTERFACE;
-}
-
-
-/* CGPGExchExtMessageEvents::OnRead - Called from Exchange on reading a message.
- Return value: S_FALSE to signal Exchange to continue calling extensions. */
-STDMETHODIMP CGPGExchExtMessageEvents::OnRead(
-       LPEXCHEXTCALLBACK pEECB) // A pointer to IExchExtCallback interface.
-{
-    ExchLogInfo ("OnRead\n");
-    return S_FALSE;
-}
-
-
-/* CGPGExchExtMessageEvents::OnReadComplete
- Called by Exchange after a message has been read.
-
- Return value: S_FALSE to signal Exchange to continue calling extensions. */
-STDMETHODIMP CGPGExchExtMessageEvents::OnReadComplete(
-       LPEXCHEXTCALLBACK pEECB, // A pointer to IExchExtCallback interface.
-       ULONG lFlags)
-{
-    ExchLogInfo ("OnReadComplete\n");
-    return S_FALSE;
-}
-
-
-/* CGPGExchExtMessageEvents::OnWrite - Called by Exchange when a message will be written.
- @rdesc S_FALSE to signal Exchange to continue calling extensions. */
-STDMETHODIMP CGPGExchExtMessageEvents::OnWrite(
-       LPEXCHEXTCALLBACK pEECB) // A pointer to IExchExtCallback interface.
-{
-    ExchLogInfo ("OnWrite\n");
-    return S_FALSE;
-}
-
-
-/* CGPGExchExtMessageEvents::OnWriteComplete
- Called by Exchange when the data has been written to the message.
- Encrypts and signs the message if the options are set.
- @pEECB - A pointer to IExchExtCallback interface.
-
- Return value: S_FALSE: signals Exchange to continue calling extensions
-               E_FAIL:  signals Exchange an error; the message will not be sent */
-STDMETHODIMP CGPGExchExtMessageEvents::OnWriteComplete (
-                 LPEXCHEXTCALLBACK pEECB, ULONG lFlags)
-{
-    HRESULT hrReturn = S_FALSE;
-    LPMESSAGE pMessage = NULL;
-    LPMDB pMDB = NULL;
-    HWND hWnd = NULL;
-
-    if (FAILED(pEECB->GetWindow (&hWnd)))
-       hWnd = NULL;
-
-    if (!m_bOnSubmitCalled) /* the user is just saving the message */
-       return S_FALSE;
-
-    if (m_bWriteFailed)     /* operation failed already */
-       return S_FALSE;
-
-    HRESULT hr = pEECB->GetObject (&pMDB, (LPMAPIPROP *)&pMessage);
-    if (SUCCEEDED (hr)) {
-       if (m_pExchExt->m_gpgEncrypt || m_pExchExt->m_gpgSign) {
-           m_gpg->setMessage (pMessage);
-           if (m_gpg->doCmd (m_pExchExt->m_gpgEncrypt,
-                             m_pExchExt->m_gpgSign)) {
-               hrReturn = E_FAIL;
-               m_bWriteFailed = TRUE;  
-           }
-       }
-    }
-    if (pMessage != NULL)
-       UlRelease(pMessage);
-    if (pMDB != NULL)
-       UlRelease(pMDB);
-
-    return hrReturn;
-}
-
-/* CGPGExchExtMessageEvents::OnCheckNames
-
- Called by Exchange when the user selects the "check names" command.
-
- @pEECB - A pointer to IExchExtCallback interface.
-
- Return value: S_FALSE to signal Exchange to continue calling extensions.
-*/
-STDMETHODIMP CGPGExchExtMessageEvents::OnCheckNames(LPEXCHEXTCALLBACK pEECB)
-{
-    return S_FALSE;
-}
-
-
-/* CGPGExchExtMessageEvents::OnCheckNamesComplete
-
- Called by Exchange when "check names" command is complete.
-
-  @pEECB - A pointer to IExchExtCallback interface.
-
- Return value: S_FALSE to signal Exchange to continue calling extensions.
-*/
-STDMETHODIMP CGPGExchExtMessageEvents::OnCheckNamesComplete(
-                       LPEXCHEXTCALLBACK pEECB, ULONG lFlags)
-{
-    return S_FALSE;
-}
-
-
-/* CGPGExchExtMessageEvents::OnSubmit
-
- Called by Exchange before the message data will be written and submitted.
- to MAPI.
-
- @pEECB - A pointer to IExchExtCallback interface.
-
- Return value: S_FALSE to signal Exchange to continue calling extensions.
-*/
-STDMETHODIMP CGPGExchExtMessageEvents::OnSubmit(
-                           LPEXCHEXTCALLBACK pEECB)
-{
-    m_bOnSubmitCalled = TRUE;
-    m_bWriteFailed = FALSE;
-    return S_FALSE;
-}
-
-
-/* CGPGExchExtMessageEvents::OnSubmitComplete
-
-  @pEECB - A pointer to IExchExtCallback interface.
-
- Called by Echange after the message has been submitted to MAPI.
-*/
-STDMETHODIMP_ (VOID) CGPGExchExtMessageEvents::OnSubmitComplete (
-                           LPEXCHEXTCALLBACK pEECB, ULONG lFlags)
-{
-    m_bOnSubmitCalled = FALSE; 
-}
-
-
-CGPGExchExtCommands::CGPGExchExtCommands (CGPGExchExt* pParentInterface)
-{ 
-    m_pExchExt = pParentInterface; 
-    m_lRef = 0; 
-    m_lContext = 0; 
-    m_nCmdEncrypt = 0;  
-    m_nCmdSign = 0; 
-    m_nToolbarButtonID1 = 0; 
-    m_nToolbarButtonID2 = 0; 
-    m_nToolbarBitmap1 = 0;
-    m_nToolbarBitmap2 = 0; 
-    m_hWnd = NULL; 
-};
-
-
-
-STDMETHODIMP 
-CGPGExchExtCommands::QueryInterface (REFIID riid, LPVOID FAR * ppvObj)
-{
-    *ppvObj = NULL;
-    if ((riid == IID_IExchExtCommands) || (riid == IID_IUnknown)) {
-        *ppvObj = (LPVOID)this;
-        AddRef ();
-        return S_OK;
-    }
-    return E_NOINTERFACE;
-}
-
-
-// XXX IExchExtSessionEvents::OnDelivery: could be used to automatically decrypt new mails
-// when they arrive
-
-/* CGPGExchExtCommands::InstallCommands
-
- Called by Echange to install commands and toolbar buttons.
-
- Return value: S_FALSE to signal Exchange to continue calling extensions.
-*/
-STDMETHODIMP CGPGExchExtCommands::InstallCommands(
-       LPEXCHEXTCALLBACK pEECB, // The Exchange Callback Interface.
-       HWND hWnd,               // The window handle to main window of context.
-       HMENU hMenu,             // The menu handle to main menu of context.
-       UINT FAR * pnCommandIDBase,  // The base conmmand id.
-       LPTBENTRY pTBEArray,     // The array of toolbar button entries.
-       UINT nTBECnt,            // The count of button entries in array.
-       ULONG lFlags)            // reserved
-{
-    HMENU hMenuTools;
-    m_hWnd = hWnd;
-
-    /* XXX: factor out common code */
-    if (m_lContext == EECONTEXT_READNOTEMESSAGE) {
-       int nTBIndex;
-       HWND hwndToolbar = NULL;
-       CHAR szBuffer[128];
-
-        pEECB->GetMenuPos (EECMDID_ToolsCustomizeToolbar, &hMenuTools, NULL, NULL, 0);
-        AppendMenu (hMenuTools, MF_SEPARATOR, 0, NULL);
-       
-       LoadString (m_hInstance, IDS_DECRYPT_MENU_ITEM, szBuffer, 128);
-        AppendMenu (hMenuTools, MF_BYPOSITION | MF_STRING, *pnCommandIDBase, szBuffer);
-
-        m_nCmdEncrypt = *pnCommandIDBase;
-        (*pnCommandIDBase)++;
-       
-       for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex) { 
-           if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid) {
-               hwndToolbar = pTBEArray[nTBIndex].hwnd;         
-               m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
-               pTBEArray[nTBIndex].itbbBase++;
-               break;          
-           }   
-       }
-
-       if (hwndToolbar) {
-           TBADDBITMAP tbab;
-           tbab.hInst = m_hInstance;
-           tbab.nID = IDB_DECRYPT;
-           m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP, 1, (LPARAM)&tbab);
-           m_nToolbarButtonID2 = pTBEArray[nTBIndex].itbbBase;
-           pTBEArray[nTBIndex].itbbBase++;
-       }
-    }
-
-    if (m_lContext == EECONTEXT_SENDNOTEMESSAGE) {
-       CHAR szBuffer[128];
-       int nTBIndex;
-       HWND hwndToolbar = NULL;
-
-        pEECB->GetMenuPos(EECMDID_ToolsCustomizeToolbar, &hMenuTools, NULL, NULL, 0);
-        AppendMenu(hMenuTools, MF_SEPARATOR, 0, NULL);
-       
-       LoadString(m_hInstance, IDS_ENCRYPT_MENU_ITEM, szBuffer, 128);
-        AppendMenu(hMenuTools, MF_BYPOSITION | MF_STRING, *pnCommandIDBase, szBuffer);
-
-        m_nCmdEncrypt = *pnCommandIDBase;
-        (*pnCommandIDBase)++;
-
-       LoadString(m_hInstance, IDS_SIGN_MENU_ITEM, szBuffer, 128);
-        AppendMenu(hMenuTools, MF_BYPOSITION | MF_STRING, *pnCommandIDBase, szBuffer);
-
-        m_nCmdSign = *pnCommandIDBase;
-        (*pnCommandIDBase)++;
-
-       for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex)
-       {
-           if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid)
-           {
-               hwndToolbar = pTBEArray[nTBIndex].hwnd;
-               m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
-               pTBEArray[nTBIndex].itbbBase++;
-               break;  
-           }
-       }
-
-       if (hwndToolbar) {
-           TBADDBITMAP tbab;
-           tbab.hInst = m_hInstance;
-           tbab.nID = IDB_ENCRYPT;
-           m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP, 1, (LPARAM)&tbab);
-           m_nToolbarButtonID2 = pTBEArray[nTBIndex].itbbBase;
-           pTBEArray[nTBIndex].itbbBase++;
-           tbab.nID = IDB_SIGN;
-           m_nToolbarBitmap2 = SendMessage(hwndToolbar, TB_ADDBITMAP, 1, (LPARAM)&tbab);
-       }
-       m_pExchExt->m_gpgEncrypt = m_gpg->getEncryptDefault ();
-       m_pExchExt->m_gpgSign = m_gpg->getSignDefault ();
-    }
-
-    if (m_lContext == EECONTEXT_VIEWER) {
-       CHAR szBuffer[128];
-       int nTBIndex;
-       HWND hwndToolbar = NULL;
-
-        pEECB->GetMenuPos (EECMDID_ToolsCustomizeToolbar, &hMenuTools, NULL, NULL, 0);
-        AppendMenu (hMenuTools, MF_SEPARATOR, 0, NULL);
-       
-       LoadString (m_hInstance, IDS_KEY_MANAGER, szBuffer, 128);
-        AppendMenu (hMenuTools, MF_BYPOSITION | MF_STRING, *pnCommandIDBase, szBuffer);
-
-        m_nCmdEncrypt = *pnCommandIDBase;
-        (*pnCommandIDBase)++;  
-
-       for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex) {
-           if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid) {
-               hwndToolbar = pTBEArray[nTBIndex].hwnd;
-               m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
-               pTBEArray[nTBIndex].itbbBase++;
-               break;  
-           }
-       }
-       if (hwndToolbar) {
-           TBADDBITMAP tbab;
-           tbab.hInst = m_hInstance;
-           tbab.nID = IDB_KEY_MANAGER;
-           m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP, 1, (LPARAM)&tbab);
-       }       
-    }
-    return S_FALSE;
-}
-
-
-/* CGPGExchExtCommands::DoCommand - Called by Exchange when a user selects a command. 
-
- Return value: S_OK if command is handled, otherwise S_FALSE.
-*/
-STDMETHODIMP CGPGExchExtCommands::DoCommand(
-       LPEXCHEXTCALLBACK pEECB, // The Exchange Callback Interface.
-       UINT nCommandID)         // The command id.
-{
-
-    if ((nCommandID != m_nCmdEncrypt) && 
-       (nCommandID != m_nCmdSign))
-       return S_FALSE; 
-
-    if (m_lContext == EECONTEXT_READNOTEMESSAGE) {
-       LPMESSAGE pMessage = NULL;
-       LPMDB pMDB = NULL;
-       HWND hWnd = NULL;
-
-       if (FAILED (pEECB->GetWindow (&hWnd)))
-           hWnd = NULL;
-       HRESULT hr = pEECB->GetObject (&pMDB, (LPMAPIPROP *)&pMessage);
-       if (SUCCEEDED (hr)) {
-           if (nCommandID == m_nCmdEncrypt) {
-               m_gpg->setWindow (hWnd);
-               m_gpg->setMessage (pMessage);
-               m_gpg->decrypt ();
-           }
-       }
-       if (pMessage != NULL)
-           UlRelease(pMessage);
-       if (pMDB != NULL)
-           UlRelease(pMDB);
-    }
-    if (m_lContext == EECONTEXT_SENDNOTEMESSAGE) {
-       HWND hWnd = NULL;
-       if (FAILED(pEECB->GetWindow (&hWnd)))
-           hWnd = NULL;
-       if (nCommandID == m_nCmdEncrypt)
-           m_pExchExt->m_gpgEncrypt = !m_pExchExt->m_gpgEncrypt;
-       if (nCommandID == m_nCmdSign)
-           m_pExchExt->m_gpgSign = !m_pExchExt->m_gpgSign;
-    }
-    if (m_lContext == EECONTEXT_VIEWER) {
-       if (m_gpg->startKeyManager ())
-           MessageBox (NULL, "Could not start Key-Manager", "GPGExch", MB_ICONERROR|MB_OK);
-    }
-    return S_OK; 
-}
-
-STDMETHODIMP_(VOID) CGPGExchExtCommands::InitMenu(
-       LPEXCHEXTCALLBACK pEECB) // The pointer to Exchange Callback Interface.
-{
-}
-
-/* CGPGExchExtCommands::Help
-
- Called by Exhange when the user requests help for a menu item.
-
- Return value: S_OK when it is a menu item of this plugin and the help was shown;
-               otherwise S_FALSE
-*/
-STDMETHODIMP CGPGExchExtCommands::Help (
-       LPEXCHEXTCALLBACK pEECB, // The pointer to Exchange Callback Interface.
-       UINT nCommandID)         // The command id.
-{
-    if (m_lContext == EECONTEXT_READNOTEMESSAGE) {
-       if (nCommandID == m_nCmdEncrypt) {
-           CHAR szBuffer[512];
-           CHAR szAppName[128];
-
-           LoadString (m_hInstance, IDS_DECRYPT_HELP, szBuffer, 511);
-           LoadString (m_hInstance, IDS_APP_NAME, szAppName, 127);
-           MessageBox (m_hWnd, szBuffer, szAppName, MB_OK);
-           return S_OK;
-       }
-    }
-    if (m_lContext == EECONTEXT_SENDNOTEMESSAGE) {
-       if (nCommandID == m_nCmdEncrypt) {
-           CHAR szBuffer[512];
-           CHAR szAppName[128];
-           LoadString(m_hInstance, IDS_ENCRYPT_HELP, szBuffer, 511);
-           LoadString(m_hInstance, IDS_APP_NAME, szAppName, 127);
-           MessageBox(m_hWnd, szBuffer, szAppName, MB_OK);     
-           return S_OK;
-       } 
-       if (nCommandID == m_nCmdSign) {
-           CHAR szBuffer[512]; 
-           CHAR szAppName[128];        
-           LoadString(m_hInstance, IDS_SIGN_HELP, szBuffer, 511);      
-           LoadString(m_hInstance, IDS_APP_NAME, szAppName, 127);      
-           MessageBox(m_hWnd, szBuffer, szAppName, MB_OK);     
-           return S_OK;
-       } 
-    }
-
-    if (m_lContext == EECONTEXT_VIEWER) {
-       if (nCommandID == m_nCmdEncrypt) {
-               CHAR szBuffer[512];
-               CHAR szAppName[128];
-               LoadString(m_hInstance, IDS_KEY_MANAGER_HELP, szBuffer, 511);
-               LoadString(m_hInstance, IDS_APP_NAME, szAppName, 127);
-               MessageBox(m_hWnd, szBuffer, szAppName, MB_OK);
-               return S_OK;
-       } 
-    }
-
-    return S_FALSE;
-}
-
-/* CGPGExchExtCommands::QueryHelpText
-
- Called by Exhange to get the status bar text or the tooltip of a menu item.
-
- @rdesc S_OK when it is a menu item of this plugin and the text was set;
-        otherwise S_FALSE.
-*/
-STDMETHODIMP CGPGExchExtCommands::QueryHelpText(
-       UINT nCommandID,  // The command id corresponding to menu item activated.
-       ULONG lFlags,     // Identifies either EECQHT_STATUS or EECQHT_TOOLTIP.
-    LPTSTR pszText,   // A pointer to buffer to be populated with text to display.
-       UINT nCharCnt)    // The count of characters available in psz buffer.
-{
-       
-    if (m_lContext == EECONTEXT_READNOTEMESSAGE) {
-       if (nCommandID == m_nCmdEncrypt) {
-           if (lFlags == EECQHT_STATUS)
-               LoadString (m_hInstance, IDS_DECRYPT_STATUSBAR, pszText, nCharCnt);
-           if (lFlags == EECQHT_TOOLTIP)
-               LoadString (m_hInstance, IDS_DECRYPT_TOOLTIP, pszText, nCharCnt);
-           return S_OK;
-       }
-    }
-    if (m_lContext == EECONTEXT_SENDNOTEMESSAGE) {
-       if (nCommandID == m_nCmdEncrypt) {
-           if (lFlags == EECQHT_STATUS)
-               LoadString (m_hInstance, IDS_ENCRYPT_STATUSBAR, pszText, nCharCnt);
-           if (lFlags == EECQHT_TOOLTIP)
-               LoadString (m_hInstance, IDS_ENCRYPT_TOOLTIP, pszText, nCharCnt);
-           return S_OK;
-       }
-       if (nCommandID == m_nCmdSign) {
-           if (lFlags == EECQHT_STATUS)
-               LoadString (m_hInstance, IDS_SIGN_STATUSBAR, pszText, nCharCnt);
-           if (lFlags == EECQHT_TOOLTIP)
-               LoadString (m_hInstance, IDS_SIGN_TOOLTIP, pszText, nCharCnt);
-           return S_OK;
-       }
-    }
-    if (m_lContext == EECONTEXT_VIEWER) {
-       if (nCommandID == m_nCmdEncrypt) {
-           if (lFlags == EECQHT_STATUS)
-               LoadString (m_hInstance, IDS_KEY_MANAGER_STATUSBAR, pszText, nCharCnt);
-           if (lFlags == EECQHT_TOOLTIP)
-               LoadString (m_hInstance, IDS_KEY_MANAGER_TOOLTIP, pszText, nCharCnt);
-           return S_OK;
-       }       
-    }
-    return S_FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CGPGExchExtCommands::QueryButtonInfo 
-//
-// Called by Exchange to get toolbar button infos,
-//
-// @rdesc S_OK when it is a button of this plugin and the requested info was delivered;
-//        otherwise S_FALSE
-//
-STDMETHODIMP CGPGExchExtCommands::QueryButtonInfo (
-       ULONG lToolbarID,       // The toolbar identifier.
-       UINT nToolbarButtonID,  // The toolbar button index.
-    LPTBBUTTON pTBB,        // A pointer to toolbar button structure (see TBBUTTON structure).
-       LPTSTR lpszDescription, // A pointer to string describing button.
-       UINT nCharCnt,          // The maximum size of lpsz buffer.
-    ULONG lFlags)           // EXCHEXT_UNICODE may be specified
-{
-       if (m_lContext == EECONTEXT_READNOTEMESSAGE)
-       {
-               if (nToolbarButtonID == m_nToolbarButtonID1)
-               {
-                       pTBB->iBitmap = m_nToolbarBitmap1;             
-                       pTBB->idCommand = m_nCmdEncrypt;
-                       pTBB->fsState = TBSTATE_ENABLED;
-                       pTBB->fsStyle = TBSTYLE_BUTTON;
-                       pTBB->dwData = 0;
-                       pTBB->iString = -1;
-                       LoadString(m_hInstance, IDS_DECRYPT_TOOLTIP, lpszDescription, nCharCnt);
-                       return S_OK;
-               }
-       }
-       if (m_lContext == EECONTEXT_SENDNOTEMESSAGE)
-       {
-               if (nToolbarButtonID == m_nToolbarButtonID1)
-               {
-                       pTBB->iBitmap = m_nToolbarBitmap1;             
-                       pTBB->idCommand = m_nCmdEncrypt;
-                       pTBB->fsState = TBSTATE_ENABLED;
-                       if (m_pExchExt->m_gpgEncrypt)
-                               pTBB->fsState |= TBSTATE_CHECKED;
-                       pTBB->fsStyle = TBSTYLE_BUTTON | TBSTYLE_CHECK;
-                       pTBB->dwData = 0;
-                       pTBB->iString = -1;
-                       LoadString(m_hInstance, IDS_ENCRYPT_TOOLTIP, lpszDescription, nCharCnt);
-                       return S_OK;
-               }
-               if (nToolbarButtonID == m_nToolbarButtonID2)
-               {
-                       pTBB->iBitmap = m_nToolbarBitmap2;             
-                       pTBB->idCommand = m_nCmdSign;
-                       pTBB->fsState = TBSTATE_ENABLED;
-                       if (m_pExchExt->m_gpgSign)
-                               pTBB->fsState |= TBSTATE_CHECKED;
-                       pTBB->fsStyle = TBSTYLE_BUTTON | TBSTYLE_CHECK;
-                       pTBB->dwData = 0;
-                       pTBB->iString = -1;
-                       LoadString(m_hInstance, IDS_SIGN_TOOLTIP, lpszDescription, nCharCnt);
-                       return S_OK;
-               }
-       }
-       if (m_lContext == EECONTEXT_VIEWER)
-       {
-               if (nToolbarButtonID == m_nToolbarButtonID1)
-               {
-                       pTBB->iBitmap = m_nToolbarBitmap1;             
-                       pTBB->idCommand = m_nCmdEncrypt;
-                       pTBB->fsState = TBSTATE_ENABLED;
-                       pTBB->fsStyle = TBSTYLE_BUTTON;
-                       pTBB->dwData = 0;
-                       pTBB->iString = -1;
-                       LoadString(m_hInstance, IDS_KEY_MANAGER_TOOLTIP, lpszDescription, nCharCnt);
-                       return S_OK;
-               }
-       }
-
-       return S_FALSE;
-}
-
-
-STDMETHODIMP 
-CGPGExchExtCommands::ResetToolbar (ULONG lToolbarID, ULONG lFlags)
-{      
-    return S_OK;
-}
-
-
-CGPGExchExtPropertySheets::CGPGExchExtPropertySheets(CGPGExchExt* pParentInterface)
-{ 
-    m_pExchExt = pParentInterface;
-    m_lRef = 0; 
-}
-
-
-STDMETHODIMP 
-CGPGExchExtPropertySheets::QueryInterface(REFIID riid, LPVOID FAR * ppvObj)
-{   
-    *ppvObj = NULL;
-    if (riid == IID_IExchExtPropertySheets) {
-        *ppvObj = (LPVOID)this;
-        AddRef();
-        return S_OK;
-    }
-    if (riid == IID_IUnknown) {
-        *ppvObj = (LPVOID)m_pExchExt;
-        m_pExchExt->AddRef();
-        return S_OK;
-    }
-
-    return E_NOINTERFACE;
-}
-
-
-/* CGPGExchExtPropertySheets::GetMaxPageCount
-
- Called by Echange to get the maximum number of property pages which are
- to be added.
-
- Return value: The maximum number of custom pages for the property sheet.
-*/
-STDMETHODIMP_ (ULONG) 
-CGPGExchExtPropertySheets::GetMaxPageCount(
-       ULONG lFlags) // A bitmask indicating what type of property sheet is being displayed.
-{
-    if (lFlags == EEPS_TOOLSOPTIONS)
-       return 1;       
-    return 0;
-}
-
-
-/* CGPGExchExtPropertySheets::GetPages
-
- Called by Exchange to request information about the property page.
-
- Return value: S_OK to signal Echange to use the pPSP information.
-*/
-STDMETHODIMP 
-CGPGExchExtPropertySheets::GetPages(
-       LPEXCHEXTCALLBACK pEECB, // A pointer to Exchange callback interface.
-       ULONG lFlags,            // A  bitmask indicating what type of property sheet is being displayed.
-       LPPROPSHEETPAGE pPSP,    // The output parm pointing to pointer to list of property sheets.
-       ULONG FAR * plPSP)       // The output parm pointing to buffer contaiing number of property sheets actually used.
-{
-    int resid = 0;
-
-    switch (GetUserDefaultLangID ()) {
-    case 0x0407:    resid = IDD_GPG_OPTIONS_DE;break;
-    default:       resid = IDD_GPG_OPTIONS; break;
-    }
-
-    pPSP[0].dwSize = sizeof (PROPSHEETPAGE);
-    pPSP[0].dwFlags = PSP_DEFAULT | PSP_HASHELP;
-    pPSP[0].hInstance = m_hInstance;
-    pPSP[0].pszTemplate = MAKEINTRESOURCE (resid);
-    pPSP[0].hIcon = NULL;     
-    pPSP[0].pszTitle = NULL;  
-    pPSP[0].pfnDlgProc = (DLGPROC) GPGOptionsDlgProc;
-    pPSP[0].lParam = 0;     
-    pPSP[0].pfnCallback = NULL;
-    pPSP[0].pcRefParent = NULL; 
-
-    *plPSP = 1;
-
-    return S_OK;
-}
-
-STDMETHODIMP_ (VOID) 
-CGPGExchExtPropertySheets::FreePages (LPPROPSHEETPAGE pPSP, ULONG lFlags, ULONG lPSP)
-{
-}
diff --git a/olflange/GPGExch.def b/olflange/GPGExch.def
deleted file mode 100644 (file)
index 7f01185..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; GPGExch.def : Declares the module parameters for the DLL.
-
-LIBRARY      "OLGPGMAIN"
-DESCRIPTION  'Outlook GPG Main DLL'
-
-EXPORTS
-    ExchEntryPoint = ExchEntryPoint@0            @1
-    DllRegisterServer = DllRegisterServer@0      @2    PRIVATE
-    DllUnregisterServer = DllUnregisterServer@0  @3    PRIVATE
diff --git a/olflange/GPGExch.dsp b/olflange/GPGExch.dsp
deleted file mode 100644 (file)
index 5cee35e..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-# Microsoft Developer Studio Project File - Name="GPGExch" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=GPGExch - Win32 Debug
-!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
-!MESSAGE 
-!MESSAGE NMAKE /f "GPGExch.mak".
-!MESSAGE 
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE 
-!MESSAGE NMAKE /f "GPGExch.mak" CFG="GPGExch - Win32 Debug"
-!MESSAGE 
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE 
-!MESSAGE "GPGExch - Win32 Release" (basierend auf  "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "GPGExch - Win32 Debug" (basierend auf  "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""$/GPG/GPGExch", RCJAAAAA"
-# PROP Scc_LocalPath "."
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "GPGExch - Win32 Release"
-
-# PROP BASE Use_MFC 5
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 6
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "c:\oss\w32root\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_WINDLL" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x407 /d "NDEBUG" /d "_AFXDLL"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 mapi32.lib c:\oss\w32root\lib\olgpgcore.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release/olgpgmain.dll"
-
-!ELSEIF  "$(CFG)" == "GPGExch - Win32 Debug"
-
-# PROP BASE Use_MFC 5
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 6
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_WINDLL" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG" /d "_AFXDLL"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 mapi32.lib c:\oss\w32root\lib\olgpgcore.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/olgpgmain.dll" /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "GPGExch - Win32 Release"
-# Name "GPGExch - Win32 Debug"
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\bitmap1.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\decrypt.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\encrypt.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\GPGExch.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\GPGExch.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\key_mana.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\sign.bmp
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\ChangeLog
-# End Source File
-# Begin Source File
-
-SOURCE=.\GPGExch.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\GPGExch.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\GPGExchange.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\GPGOptionsDlg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Resource.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.cpp
-# ADD CPP /Yc"stdafx.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.h
-# End Source File
-# End Target
-# End Project
diff --git a/olflange/GPGExch.dsw b/olflange/GPGExch.dsw
deleted file mode 100644 (file)
index f80663b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00\r
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
-\r
-###############################################################################\r
-\r
-Project: "GPGExch"=.\GPGExch.dsp - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-    begin source code control\r
-    "$/GPG/GPGExch", RCJAAAAA\r
-    .\r
-    end source code control\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Global:\r
-\r
-Package=<5>\r
-{{{\r
-    begin source code control\r
-    "$/GPG/GPGExch", RCJAAAAA\r
-    .\r
-    end source code control\r
-}}}\r
-\r
-Package=<3>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
diff --git a/olflange/GPGExch.h b/olflange/GPGExch.h
deleted file mode 100644 (file)
index 1709721..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/* GPGExch.h - exchange extension classes
- *     Copyright (C) 2001 G Data Software AG, http://www.gdata.de
- *     Copyright (C) 2005 g10 Code GmbH
- * 
- * This file is part of the G DATA Outlook Plugin for GnuPG.
- * 
- * This plugin is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * 
- * This plugin is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General
- * Public License along with this plugin; if not, write to the 
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef INC_GPGEXCH_H
-#define INC_GPGEXCH_H
-
-#include "resource.h"          // main symbols
-
-
-/*
- CGPGExchExt 
-
- The CGPGExchExt class is the main exchange extension class. The other 
- extensions will be created in the constructor of this class.
-*/
-class CGPGExchExt : public IExchExt
-{
-public:
-    CGPGExchExt();
-    ~CGPGExchExt();
-
-public:        
-    HWND m_hWndExchange;  /* Handle of the exchange window. */
-    /* parameter for sending mails */
-    BOOL  m_gpgEncrypt;
-    BOOL  m_gpgSign;
-
-private:
-    ULONG m_lRef;
-    ULONG m_lContext;
-
-    /* pointer to the other extension objects */
-    CGPGExchExtMessageEvents* m_pExchExtMessageEvents;
-    CGPGExchExtCommands* m_pExchExtCommands;
-    CGPGExchExtPropertySheets* m_pExchExtPropertySheets;
-
-public:
-    STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObj);
-    inline STDMETHODIMP_(ULONG) AddRef() { ++m_lRef;  return m_lRef; };
-    inline STDMETHODIMP_(ULONG) Release()
-    {
-       ULONG lCount = --m_lRef;
-       if (!lCount) 
-           delete this;
-       return lCount;  
-    };
-    STDMETHODIMP Install(LPEXCHEXTCALLBACK pEECB, ULONG lContext, ULONG lFlags);
-};
-
-/////////////////////////////////////////////////////////////////////////////
-// CGPGExchExtMessageEvents 
-//
-// The CGPGExchExtMessageEvents class implements the reaction of the exchange 
-// message events.
-//
-class CGPGExchExtMessageEvents : public IExchExtMessageEvents
-{
-// constructor
-public:
-       CGPGExchExtMessageEvents (CGPGExchExt* pParentInterface);
-
-// attributes
-private:
-    ULONG   m_lRef;
-    BOOL    m_bOnSubmitCalled;
-    CGPGExchExt* m_pExchExt;
-    BOOL    m_bWriteFailed;
-
-public:
-    STDMETHODIMP QueryInterface (REFIID riid, LPVOID *ppvObj);
-    inline STDMETHODIMP_(ULONG) AddRef (void) { ++m_lRef; return m_lRef; };
-    inline STDMETHODIMP_(ULONG) Release (void) 
-    {
-       ULONG lCount = --m_lRef;
-       if (!lCount) 
-           delete this;
-       return lCount;  
-    };
-
-    STDMETHODIMP OnRead (LPEXCHEXTCALLBACK pEECB);
-    STDMETHODIMP OnReadComplete (LPEXCHEXTCALLBACK pEECB, ULONG lFlags);
-    STDMETHODIMP OnWrite (LPEXCHEXTCALLBACK pEECB);
-    STDMETHODIMP OnWriteComplete (LPEXCHEXTCALLBACK pEECB, ULONG lFlags);
-    STDMETHODIMP OnCheckNames (LPEXCHEXTCALLBACK pEECB);
-    STDMETHODIMP OnCheckNamesComplete (LPEXCHEXTCALLBACK pEECB, ULONG lFlags);
-    STDMETHODIMP OnSubmit (LPEXCHEXTCALLBACK pEECB);
-    STDMETHODIMP_ (VOID)OnSubmitComplete (LPEXCHEXTCALLBACK pEECB, ULONG lFlags);
-};
-
-/* CGPGExchExtCommands 
- Makes the menu and toolbar extensions. Implements the own commands.
-*/
-class CGPGExchExtCommands : public IExchExtCommands
-{
-public:
-    CGPGExchExtCommands (CGPGExchExt* pParentInterface);
-
-private:
-    ULONG m_lRef;
-    ULONG m_lContext;
-
-    UINT  m_nCmdEncrypt;
-    UINT  m_nCmdSign;
-
-    UINT  m_nToolbarButtonID1;
-    UINT  m_nToolbarButtonID2;     
-    UINT  m_nToolbarBitmap1;
-    UINT  m_nToolbarBitmap2;
-
-    HWND  m_hWnd;
-
-    CGPGExchExt* m_pExchExt;
-
-public:
-    STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObj);
-    inline STDMETHODIMP_(ULONG) AddRef (void) { ++m_lRef; return m_lRef; };
-    inline STDMETHODIMP_(ULONG) Release (void) 
-    {
-       ULONG lCount = --m_lRef;
-       if (!lCount) 
-           delete this;
-       return lCount;  
-    };
-
-    STDMETHODIMP InstallCommands (LPEXCHEXTCALLBACK pEECB, HWND hWnd, HMENU hMenu,    
-                                 UINT FAR * pnCommandIDBase, LPTBENTRY pTBEArray, UINT nTBECnt, ULONG lFlags);
-    STDMETHODIMP DoCommand (LPEXCHEXTCALLBACK pEECB, UINT nCommandID);
-    STDMETHODIMP_(VOID) InitMenu (LPEXCHEXTCALLBACK pEECB);
-    STDMETHODIMP Help (LPEXCHEXTCALLBACK pEECB, UINT nCommandID);
-    STDMETHODIMP QueryHelpText (UINT nCommandID, ULONG lFlags, LPTSTR szText, UINT nCharCnt);
-    STDMETHODIMP QueryButtonInfo (ULONG lToolbarID, UINT nToolbarButtonID, 
-                                 LPTBBUTTON pTBB, LPTSTR lpszDescription, UINT nCharCnt, ULONG lFlags);
-    STDMETHODIMP ResetToolbar (ULONG nToolbarID, ULONG lFlags);
-
-    inline VOID SetContext (ULONG lContext) { m_lContext = lContext; };
-};
-
-
-/////////////////////////////////////////////////////////////////////////////
-// CGPGExchExtPropertySheets 
-//
-// The CGPGExchExtPropertySheets implements the exchange property sheet extension 
-// to put the GPG options page in the exchanges options property sheet.
-//
-class CGPGExchExtPropertySheets : public IExchExtPropertySheets
-{
-// constructor
-public:
-    CGPGExchExtPropertySheets(CGPGExchExt* pParentInterface);
-
-// attibutes
-private:
-    ULONG m_lRef;
-    CGPGExchExt* m_pExchExt;
-
-public:        
-    STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObj);
-    inline STDMETHODIMP_(ULONG) AddRef() { ++m_lRef; return m_lRef; };
-    inline STDMETHODIMP_(ULONG) Release() 
-    {
-       ULONG lCount = --m_lRef;
-       if (!lCount)
-           delete this;
-       return lCount;  
-    };
-
-    STDMETHODIMP_ (ULONG) GetMaxPageCount(ULONG lFlags);          
-    STDMETHODIMP  GetPages(LPEXCHEXTCALLBACK pEECB,
-           ULONG lFlags, LPPROPSHEETPAGE pPSP, ULONG FAR * pcpsp);
-    STDMETHODIMP_ (VOID) FreePages(LPPROPSHEETPAGE pPSP, 
-               ULONG lFlags, ULONG cpsp);          
-
-};
-
-#endif // INC_GPGEXCH_H
diff --git a/olflange/GPGExch.plg b/olflange/GPGExch.plg
deleted file mode 100644 (file)
index e701786..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>\r
-<body>\r
-<pre>\r
-<h1>Erstellungsprotokoll</h1>\r
-<h3>\r
---------------------Konfiguration: GPGExch - Win32 Release--------------------\r
-</h3>\r
-<h3>Befehlszeilen</h3>\r
-\r
-\r
-\r
-<h3>Ergebnisse</h3>\r
-GPGExch.dll - 0 Fehler, 0 Warnung(en)\r
-</pre>\r
-</body>\r
-</html>\r
diff --git a/olflange/GPGExchange.h b/olflange/GPGExchange.h
deleted file mode 100644 (file)
index 11c156d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* GPGExchange.h - global declarations
- *     Copyright (C) 2001 G Data Software AG, http://www.gdata.de
- *     Copyright (C) 2005 g10 Code GmbH
- * 
- * This file is part of the G DATA Outlook Plugin for GnuPG.
- * 
- * This plugin is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * 
- * This plugin is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General
- * Public License along with this plugin; if not, write to the 
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef INC_GPGEXCHANGE_H
-#define INC_GPGEXCHANGE_H
-
-
-class CGPGExchExtMessageEvents;
-class CGPGExchExtCommands;
-class CGPGExchExtPropertySheets;
-class CGPGExchApp;
-
-
-class MapiGPGME;
-/* GPGExch.cpp */
-extern MapiGPGME *m_gpg;
-
-
-BOOL CALLBACK GPGOptionsDlgProc (HWND hDlg, UINT uMsg,
-                                WPARAM wParam, LPARAM lParam);
-
-#endif /* INC_GPGEXCHANGE_H */
diff --git a/olflange/GPGOptions.cpp b/olflange/GPGOptions.cpp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/olflange/GPGOptionsDlg.cpp b/olflange/GPGOptionsDlg.cpp
deleted file mode 100644 (file)
index 709d913..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/* GPGOptionsDlg.cpp - gpg options dialog procedure
- *     Copyright (C) 2001 G Data Software AG, http://www.gdata.de
- *     Copyright (C) 2004, 2005 g10 Code GmbH
- * 
- * This file is part of the G DATA Outlook Plugin for GnuPG.
- * 
- * This plugin is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * 
- * This plugin is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General
- * Public License along with this plugin; if not, write to the 
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <windows.h>
-#include <prsht.h>
-
-#include "GPGExchange.h"
-#include "resource.h"
-#include "../src/mymapi.h"
-#include "../src/mymapitags.h"
-#include "../src/MapiGPGME.h"
-
-
-/* GPGOptionsDlgProc -
-   Handles the notifications sent for managing the options property page. */
-BOOL CALLBACK GPGOptionsDlgProc (HWND hDlg, UINT uMsg, 
-                                WPARAM wParam, LPARAM lParam)
-{
-    BOOL bMsgResult;    
-    static LPNMHDR pnmhdr;
-    static HWND hWndPage;
-    static int enable = 1;
-    
-    switch (uMsg) {
-    case WM_INITDIALOG:
-       const char *s;
-       s = NULL;
-       s = m_gpg->getDefaultKey ();
-       enable = s && *s? 1 : 0;
-       EnableWindow (GetDlgItem (hDlg, IDC_ENCRYPT_TO), enable==0? FALSE: TRUE);
-       if (enable == 1)
-           CheckDlgButton (hDlg, IDC_ENCRYPT_WITH_STANDARD_KEY, BST_CHECKED);
-       SetDlgItemText (hDlg, IDC_VERSION_INFO, 
-                       "Version "VERSION " ("__DATE__")");
-       return TRUE;
-               
-    case WM_COMMAND:
-       if (HIWORD (wParam) == BN_CLICKED &&
-           LOWORD (wParam) == IDC_ENCRYPT_WITH_STANDARD_KEY) {
-           enable ^= 1;
-           EnableWindow (GetDlgItem (hDlg, IDC_ENCRYPT_TO), enable==0? FALSE: TRUE);
-       }
-       if (LOWORD(wParam) == IDC_GPG_OPTIONS)
-           m_gpg->startConfigDialog (hDlg);
-       break;
-       
-    case WM_NOTIFY:
-       pnmhdr = ((LPNMHDR) lParam);
-       switch (pnmhdr->code) {
-       case PSN_KILLACTIVE:
-           bMsgResult = FALSE;  /* allow this page to receive PSN_APPLY */
-           break;
-
-       case PSN_SETACTIVE: {
-           TCHAR s[20];
-           const char * f;
-           
-           if (m_gpg->getDefaultKey () != NULL)                
-               SetDlgItemText (hDlg, IDC_ENCRYPT_TO, m_gpg->getDefaultKey ());
-           wsprintf(s, "%d", m_gpg->getStorePasswdTime ());
-           SendDlgItemMessage(hDlg, IDC_TIME_PHRASES, WM_SETTEXT, 0, (LPARAM) s);
-           f = m_gpg->getLogFile ();
-           SendDlgItemMessage (hDlg, IDC_DEBUG_LOGFILE, WM_SETTEXT, 0, (LPARAM)f);
-           hWndPage = pnmhdr->hwndFrom;   // to be used in WM_COMMAND
-           SendDlgItemMessage (hDlg, IDC_ENCRYPT_DEFAULT, BM_SETCHECK, 
-                               m_gpg->getEncryptDefault () ? 1 : 0, 0L);
-           SendDlgItemMessage (hDlg, IDC_SIGN_DEFAULT, BM_SETCHECK, 
-                               m_gpg->getSignDefault () ? 1 : 0, 0L);
-           SendDlgItemMessage (hDlg, IDC_ENCRYPT_WITH_STANDARD_KEY, BM_SETCHECK, 
-                               m_gpg->getEncryptWithDefaultKey () && enable? 1 : 0, 0L);
-           SendDlgItemMessage (hDlg, IDC_SAVE_DECRYPTED, BM_SETCHECK, 
-                               m_gpg->getSaveDecryptedAttachments () ? 1 : 0, 0L);
-           SendDlgItemMessage (hDlg, IDC_SIGN_ATTACHMENTS, BM_SETCHECK,
-                               m_gpg->getSignAttachments() ? 1 : 0, 0L);
-           bMsgResult = FALSE;  /* accepts activation */
-           break; }
-               
-       case PSN_APPLY: {
-           TCHAR s[201];
-
-           GetDlgItemText (hDlg, IDC_ENCRYPT_TO, s, 200);
-           if (strlen (s) > 0 && strchr (s, ' ')) {
-               MessageBox (hDlg, "The default key cannot contain any spaces.",
-                           "Outlook GnuPG-Plugin", MB_ICONERROR|MB_OK);
-               bMsgResult = PSNRET_INVALID_NOCHANGEPAGE ;
-               break;
-           }
-           if (strlen (s) == 0)
-               m_gpg->setEncryptWithDefaultKey (false);
-           else
-               m_gpg->setEncryptWithDefaultKey (SendDlgItemMessage(hDlg, IDC_ENCRYPT_WITH_STANDARD_KEY, BM_GETCHECK, 0, 0L));
-           SendDlgItemMessage (hDlg, IDC_TIME_PHRASES, WM_GETTEXT, 20, (LPARAM) s);            
-           m_gpg->setStorePasswdTime (atol (s));
-           SendDlgItemMessage (hDlg, IDC_DEBUG_LOGFILE, WM_GETTEXT, 200, (LPARAM)s);
-           m_gpg->setLogFile (s);
-           SendDlgItemMessage (hDlg, IDC_ENCRYPT_TO, WM_GETTEXT, 200, (LPARAM)s);
-           m_gpg->setDefaultKey (s);
-               
-           m_gpg->setEncryptDefault (SendDlgItemMessage(hDlg, IDC_ENCRYPT_DEFAULT, BM_GETCHECK, 0, 0L));
-           m_gpg->setSignDefault (SendDlgItemMessage(hDlg, IDC_SIGN_DEFAULT, BM_GETCHECK, 0, 0L));
-           m_gpg->setSaveDecryptedAttachments (SendDlgItemMessage(hDlg, IDC_SAVE_DECRYPTED, BM_GETCHECK, 0, 0L));
-           m_gpg->setSignAttachments (SendDlgItemMessage (hDlg, IDC_SIGN_ATTACHMENTS,  BM_GETCHECK, 0, 0L));
-           m_gpg->writeOptions ();
-           bMsgResult = PSNRET_NOERROR;
-           break; }
-               
-       case PSN_HELP:
-           MessageBox (pnmhdr->hwndFrom,
-                       "This plugin was orginally created by G-DATA and called \"GPGExch\" http://www.gdata.de/gpg\n\n"
-                       "Later versions of the plugin were created by g10 Code GmbH (http://www.g10code.com)\n",
-                       "Outlook GnuPG-Plugin", MB_OK);
-           bMsgResult = TRUE;
-           break;
-
-       default:
-           bMsgResult = FALSE;
-           break;          
-       }
-       SetWindowLong (hDlg, DWL_MSGRESULT, bMsgResult);
-       break;
-
-    default:
-       bMsgResult = FALSE;
-       break;          
-    }
-    return bMsgResult;
-}
diff --git a/olflange/Makefile.am b/olflange/Makefile.am
deleted file mode 100644 (file)
index 0d3b903..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# Makefile.am - main makefile for the Outlook Flange part of OutlGPG
-# Copyright (C) 2005 g10 Code GmbH
-# 
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-## Process this file with automake to produce Makefile.in
-
-EXTRA_DIST = \
-             gpgexch.cpp gpgoptionsdlg.cpp stdafx.cpp gpgexch.h \
-             gpgexchange.h resource.h stdafx.h bitmap1.bmp \
-            decrypt.bmp encrypt.bmp gpgexch.def gpgexch.rc \
-             key_mana.bmp sign.bmp
-
-
-bin_PROGRAMS = olgpgmain
-EXEEXT = .dll
-
-AM_CFLAGS = $(GPGME_CFLAGS) -shared
-AM_CXXFLAGS = $(GPGME_CFLAGS) -shared
-
-olgpgmain_SOURCES = \
-        GPGExch.cpp  \
-       GPGOptionsDlg.cpp \
-       olgpgmaindlgs.rc
-
-
-olgpgmain_LDADD = GPGExch.def olgpgmaindlgs.o \
-       mapi32.dll ../src/olgpgcore.dll $(GPGME_LIBS) \
-        -lshell32 -lgdi32 -lcomdlg32
-
-
-.rc.o:
-       $(WINDRES) `test -f '$<' || echo '$(srcdir)/'`$< $@
-
-
-
-
-
diff --git a/olflange/StdAfx.cpp b/olflange/StdAfx.cpp
deleted file mode 100644 (file)
index 1d7596e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-
-#include "stdafx.h"
-
-
-
diff --git a/olflange/StdAfx.h b/olflange/StdAfx.h
deleted file mode 100644 (file)
index 0a0af9a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// include file for standard system include files
-#ifndef INC_STDAFX_H
-#define INC_STDAFX_H
-
-#define VC_EXTRALEAN           // Exclude rarely-used stuff from Windows headers
-
-#include <afxwin.h>         // MFC core and standard components
-#include <afxext.h>         // MFC extensions
-
-#ifndef _AFX_NO_OLE_SUPPORT
-#include <afxole.h>         // MFC OLE classes
-#include <afxodlgs.h>       // MFC OLE dialog classes
-#include <afxdisp.h>        // MFC Automation classes
-#endif // _AFX_NO_OLE_SUPPORT
-
-#ifndef _AFX_NO_DB_SUPPORT
-#include <afxdb.h>                     // MFC ODBC database classes
-#endif // _AFX_NO_DB_SUPPORT
-
-#ifndef _AFX_NO_DAO_SUPPORT
-#include <afxdao.h>                    // MFC DAO database classes
-#endif // _AFX_NO_DAO_SUPPORT
-
-#include <afxdtctl.h>          // MFC support for Internet Explorer 4 Common Controls
-#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h>                    // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-
-// MAPI includes
-#include <MAPIX.H>
-#include <MAPIUTIL.H>
-#include <MAPIFORM.H>
-
-#include <atlbase.h>
-#include <string>
-#include <vector>
-using namespace std;
-
-#endif // INC_STDAFX_H
diff --git a/olflange/TODO.txt b/olflange/TODO.txt
deleted file mode 100644 (file)
index cc9d47f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Problems with the current version\r
-=================================\r
-\r
-- If the mail uses UTF-8 as the charset, it is not possible to set the\r
-  PR_BODY property. Thus the mail text is read-only and the plugin failes\r
-  to show the decrypted message body.\r
-\r
-- Another UTF-8 problem: if the mail has this charset, the temporary files\r
-  cannot be deleted. DeleteFile() returns true but the file remains on diesk.\r
-\r
-- After an update the LogFile file contains invalid data.\r
-  (Fixme:  is this still true for 0.94?)\r
diff --git a/olflange/bin/INSTALL b/olflange/bin/INSTALL
deleted file mode 100644 (file)
index 804fd53..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-The file contains binary files of all plugin components for testing.
-
-To install them do the following steps:
-
-1) regsvr32 olgpgmain.dll
-2) copy olgpgcore.dll c:\windows\system32 (\system for W9X)
-
-
diff --git a/olflange/bin/olgpgmain.dll.bz2 b/olflange/bin/olgpgmain.dll.bz2
deleted file mode 100644 (file)
index 2c2fe2a..0000000
Binary files a/olflange/bin/olgpgmain.dll.bz2 and /dev/null differ
diff --git a/olflange/bitmap1.bmp b/olflange/bitmap1.bmp
deleted file mode 100644 (file)
index 1c4f5aa..0000000
Binary files a/olflange/bitmap1.bmp and /dev/null differ
diff --git a/olflange/decrypt.bmp b/olflange/decrypt.bmp
deleted file mode 100644 (file)
index cca5738..0000000
Binary files a/olflange/decrypt.bmp and /dev/null differ
diff --git a/olflange/encrypt.bmp b/olflange/encrypt.bmp
deleted file mode 100644 (file)
index 9092c78..0000000
Binary files a/olflange/encrypt.bmp and /dev/null differ
diff --git a/olflange/key_mana.bmp b/olflange/key_mana.bmp
deleted file mode 100644 (file)
index 18fa370..0000000
Binary files a/olflange/key_mana.bmp and /dev/null differ
diff --git a/olflange/olgpgmaindlgs.rc b/olflange/olgpgmaindlgs.rc
deleted file mode 100644 (file)
index ae78a97..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Deutsch (Deutschland) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-#ifdef _WIN32
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#include ""afxres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
-    "#define _AFX_NO_OLE_RESOURCES\r\n"
-    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
-    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
-    "\r\n"
-    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)\r\n"
-    "#ifdef _WIN32\r\n"
-    "LANGUAGE 7, 1\r\n"
-    "#pragma code_page(1252)\r\n"
-    "#endif //_WIN32\r\n"
-    "#include ""res\\GPGExch.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
-    "#include ""l.deu\\afxres.rc""          // Standard components\r\n"
-    "#endif\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,99,4,0
- PRODUCTVERSION 0,99,4,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040704b0"
-        BEGIN
-            VALUE "Comments", "\0"
-            VALUE "CompanyName", "\0"
-            VALUE "FileDescription", "Outlook GPG Main DLL\0"
-            VALUE "FileVersion", "0.99.4\0"
-            VALUE "InternalName", "olgpgmain\0"
-            VALUE "LegalCopyright", "Copyright (C) 2004-5 g10 Code GmbH, 2003 Timo Schulz, 2000-1 G-DATA\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "OriginalFilename", "olgpgmain.dll\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Outlook GPG plugin\0"
-            VALUE "ProductVersion", "0.99.4\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x407, 1200
-    END
-END
-
-#endif    // !_MAC
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDB_DECRYPT             BITMAP  DISCARDABLE     "decrypt.bmp"
-IDB_ENCRYPT             BITMAP  DISCARDABLE     "encrypt.bmp"
-IDB_SIGN                BITMAP  DISCARDABLE     "sign.bmp"
-IDB_KEY_MANAGER         BITMAP  DISCARDABLE     "key_mana.bmp"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_GPG_OPTIONS_DE DIALOG DISCARDABLE  0, 0, 266, 201
-STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "GnuPG"
-FONT 8, "MS Sans Serif"
-BEGIN
-    GROUPBOX        "Optionen",IDC_STATIC,9,9,242,87
-    CONTROL         "Neue Nachrichten per Voreinstellung verschlüsseln",
-                    IDC_ENCRYPT_DEFAULT,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,24,19,177,10
-    CONTROL         "Neue Nachrichten per Voreinstellung signieren",
-                    IDC_SIGN_DEFAULT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    24,30,162,10
-    CONTROL         "Entschlüsselte Attachments automatisch speichern",
-                    IDC_SAVE_DECRYPTED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    24,42,175,10
-    CONTROL         "Automatisch Attachments signieren",IDC_SIGN_ATTACHMENTS,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,54,126,10
-    CONTROL         "Nachricht ebenfalls mit voreingestellten Schlüssel verschlüsseln",
-                    IDC_ENCRYPT_WITH_STANDARD_KEY,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,24,67,215,10
-    EDITTEXT        IDC_ENCRYPT_TO,36,79,133,12,ES_AUTOHSCROLL
-    GROUPBOX        "Passphrase",IDC_STATIC,9,100,242,31
-    LTEXT           "Passphrase speichern für",IDC_STATIC,24,114,80,8
-    EDITTEXT        IDC_TIME_PHRASES,107,113,39,14,ES_AUTOHSCROLL
-    LTEXT           "Sekunden",IDC_STATIC,151,115,34,8
-    GROUPBOX        "Debug (nur für erfahrene Benutzer)",IDC_STATIC,9,134,
-                    242,28
-    LTEXT           "Logdatei",IDC_STATIC,18,146,28,8
-    EDITTEXT        IDC_DEBUG_LOGFILE,48,145,138,13,ES_AUTOHSCROLL
-    PUSHBUTTON      "&Erweitert...",IDC_GPG_OPTIONS,202,166,50,14
-    LTEXT           "By g10 Code GmbH; available under the LGPL",
-                    IDC_STATIC,8,185,148,8
-    LTEXT           "Version 0.99",IDC_VERSION_INFO,161,185,98,9
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_GPG_OPTIONS_DE, DIALOG
-    BEGIN
-        LEFTMARGIN, 4
-        RIGHTMARGIN, 259
-        TOPMARGIN, 4
-        BOTTOMMARGIN, 194
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDS_DECRYPT_MENU_ITEM   "&Decrypt and verify message"
-    IDS_DECRYPT_HELP        "Decrypt and verify the message."
-    IDS_APP_NAME            "GnuPG"
-    IDS_DECRYPT_STATUSBAR   "."
-    IDS_DECRYPT_TOOLTIP     "Decrypt message and verify signature"
-    IDS_ENCRYPT_MENU_ITEM   "GPG &encrypt message"
-    IDS_SIGN_MENU_ITEM      "GPG &sign message"
-    IDS_ENCRYPT_HELP        "Select this option to encrypt the message."
-    IDS_SIGN_HELP           "Select this option to sign the message."
-    IDS_SIGN_STATUSBAR      "."
-    IDS_SIGN_TOOLTIP        "Sign message with GPG"
-    IDS_ENCRYPT_STATUSBAR   "."
-    IDS_ENCRYPT_TOOLTIP     "Encrypt message with GPG"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDS_KEY_MANAGER         "GnuPG Key &Manager"
-    IDS_KEY_MANAGER_HELP    "Open GnuPG Key Manager"
-    IDS_KEY_MANAGER_STATUSBAR "."
-    IDS_KEY_MANAGER_TOOLTIP "Open GnuPG Key Manager"
-    IDS_ERR_REPLACE_TEXT    "The message text could not be refreshed.\nPlease close the message and open it again."
-    IDS_ATT_DECRYPT_AND_SAVE 
-                            "Please close the message and open it again, to open the encrypted attachments or to save them."
-    IDS_SAVE_ATT_TITLE      "Save decrypted attachment"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDS_SAVE_ATT_FILTER     "All Files (*.*)|*.*||"
-    IDS_ERR_REPLACE_TEXT_ASK_SAVE 
-                            "The message text could not be refreshed. You can only read the message, when you save the decrypted message. Then you need to close it and open it again.\n\nShould the decrypted message be saved?"
-    IDS_ERR_ENCRYPT_ATTACHMENTS 
-                            "An error occured during the encryption of the attachments. The message cannot be sent."
-    IDS_COPY_KEY_TO_CLIPBOARD 
-                            "The key was written to the clipboard. Please add it to the message."
-    IDS_ERR_ENCRYPT_EMBEDDED_OLE 
-                            "Messaged with embedded OLE-objects cannot be encrypted."
-END
-
-#endif    // Deutsch (Deutschland) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Englisch (USA) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_GPG_OPTIONS DIALOG DISCARDABLE  0, 0, 266, 201
-STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "GnuPG"
-FONT 8, "MS Sans Serif"
-BEGIN
-    GROUPBOX        "Options",IDC_STATIC,9,9,242,87
-    CONTROL         "&Encrypt new messages by default",IDC_ENCRYPT_DEFAULT,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,19,121,10
-    CONTROL         "&Sign new messages by default",IDC_SIGN_DEFAULT,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,24,30,111,10
-    CONTROL         "Save decrypted message &automatically",
-                    IDC_SAVE_DECRYPTED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    24,42,139,10
-    CONTROL         "Automatically sign attachments",IDC_SIGN_ATTACHMENTS,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,54,113,10
-    CONTROL         "Also encrypt message with the &default key",
-                    IDC_ENCRYPT_WITH_STANDARD_KEY,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,24,67,148,10
-    EDITTEXT        IDC_ENCRYPT_TO,36,79,133,12,ES_AUTOHSCROLL
-    GROUPBOX        "Passphrase",IDC_STATIC,9,100,242,31
-    LTEXT           "Cache &passphrase for",IDC_STATIC,24,114,70,8
-    EDITTEXT        IDC_TIME_PHRASES,107,113,39,14,ES_AUTOHSCROLL
-    LTEXT           "seconds",IDC_STATIC,151,115,28,8
-    GROUPBOX        "Debug (advanced users only)",IDC_STATIC,9,134,242,28
-    LTEXT           "Logfile",IDC_STATIC,18,146,22,8
-    EDITTEXT        IDC_DEBUG_LOGFILE,48,145,138,13,ES_AUTOHSCROLL
-    PUSHBUTTON      "Ad&vanced..",IDC_GPG_OPTIONS,202,166,50,14
-    LTEXT           "By g10 Code GmbH; available under the LGPL",
-                    IDC_STATIC,8,185,148,8
-    LTEXT           "Version 0.99",IDC_VERSION_INFO,161,185,98,9
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_GPG_OPTIONS, DIALOG
-    BEGIN
-        LEFTMARGIN, 4
-        RIGHTMARGIN, 259
-        TOPMARGIN, 4
-        BOTTOMMARGIN, 194
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-#endif    // Englisch (USA) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#define _AFX_NO_SPLITTER_RESOURCES
-#define _AFX_NO_OLE_RESOURCES
-#define _AFX_NO_TRACKER_RESOURCES
-#define _AFX_NO_PROPERTY_RESOURCES
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-#ifdef _WIN32
-LANGUAGE 7, 1
-#pragma code_page(1252)
-#endif //_WIN32
-#include "l.deu\afxres.rc"          // Standard components
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
diff --git a/olflange/resource.h b/olflange/resource.h
deleted file mode 100644 (file)
index 5d1a5d6..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by GPGExch.rc
-//
-#define IDS_DECRYPT_MENU_ITEM           1
-#define IDS_DECRYPT_HELP                2
-#define IDS_APP_NAME                    3
-#define IDS_DECRYPT_STATUSBAR           4
-#define IDS_DECRYPT_TOOLTIP             5
-#define IDS_ENCRYPT_MENU_ITEM           6
-#define IDS_SIGN_MENU_ITEM              7
-#define IDS_ENCRYPT_HELP                8
-#define IDS_SIGN_HELP                   9
-#define IDS_SIGN_STATUSBAR              10
-#define IDS_SIGN_TOOLTIP                11
-#define IDS_ENCRYPT_STATUSBAR           12
-#define IDS_ENCRYPT_TOOLTIP             13
-#define IDS_ADD_KEYS_MENU_ITEM          14
-#define IDS_ADD_KEYS_HELP               15
-#define IDS_ADD_KEYS_STATUSBAR          16
-#define IDS_ADD_KEYS_TOOLTIP            17
-#define IDS_KEY_MANAGER                 18
-#define IDS_KEY_MANAGER_HELP            19
-#define IDS_KEY_MANAGER_STATUSBAR       20
-#define IDS_KEY_MANAGER_TOOLTIP         21
-#define IDS_ADD_STANDARD_KEY            22
-#define IDS_ADD_STANDARD_KEY_HELP       23
-#define IDS_ADD_STANDARD_KEY_STATUSBAR  24
-#define IDS_IMPORT_X_KEYS               25
-#define IDS_IMPORT_NO_NEW_OR_CHANGED_KEYS 26
-#define IDS_IMPORT_NO_KEYS              27
-#define IDS_ERR_REPLACE_TEXT            28
-#define IDS_ERR_EXPORT_KEY              29
-#define IDS_ATT_DECRYPT_AND_SAVE        30
-#define IDS_SAVE_ATT_TITLE              31
-#define IDS_SAVE_ATT_FILTER             32
-#define IDS_ERR_REPLACE_TEXT_ASK_SAVE   33
-#define IDS_ERR_ENCRYPT_ATTACHMENTS     34
-#define IDS_COPY_KEY_TO_CLIPBOARD       35
-#define IDS_ERR_ENCRYPT_EMBEDDED_OLE    36
-#define IDB_DECRYPT                     4000
-#define IDC_TIME_PHRASES                4000
-#define IDB_ENCRYPT                     4001
-#define IDD_GPG_OPTIONS                 4001
-#define IDC_ENCRYPT_DEFAULT             4001
-#define IDB_SIGN                        4002
-#define IDC_SIGN_DEFAULT                4002
-#define IDB_ADD_KEYS                    4003
-#define IDC_ENCRYPT_WITH_STANDARD_KEY   4003
-#define IDB_KEY_MANAGER                 4004
-#define IDC_SAVE_DECRYPTED              4004
-#define IDC_GPG_OPTIONS                 4006
-#define IDC_BITMAP                      4007
-#define IDC_DEBUG_LOGFILE               4008
-#define IDB_BANNER                      4009
-#define IDC_VERSION_INFO                4009
-#define IDB_BANNER_HI                   4010
-#define IDC_ENCRYPT_TO                  4010
-#define IDC_SIGN_ATTACHMENTS            4011
-#define IDD_GPG_OPTIONS_DE              4012
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        4013
-#define _APS_NEXT_COMMAND_VALUE         32771
-#define _APS_NEXT_CONTROL_VALUE         4012
-#define _APS_NEXT_SYMED_VALUE           4000
-#endif
-#endif
diff --git a/olflange/sign.bmp b/olflange/sign.bmp
deleted file mode 100644 (file)
index 664a6da..0000000
Binary files a/olflange/sign.bmp and /dev/null differ
index c7cc142..4c59609 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-30  Werner Koch  <wk@g10code.com>
+
+       More or less finished this major rewrite.
+
 2005-08-26  Werner Koch  <wk@g10code.com>
 
        * MapiGPGME.cpp, MapiGPGME.h: Removed.
index 2efbcf5..dfe319c 100644 (file)
@@ -199,7 +199,8 @@ GPGOptionsDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
     "\n"
     "OutlGPG is a plugin for Outlook to allow encryption and\n"
     "signing of messages using the OpenPGP standard. It makes\n"
-    "use of the GnuPG software (http://www.gnupg.org).\n"
+    "use of the GnuPG software (http://www.gnupg.org). Latest\n"
+    "release information are accessible by clicking on the logo.\n"
     "\n"
     "OutlGPG is free software; you can redistribute it and/or\n"
     "modify it under the terms of the GNU Lesser General Public\n"
index 7e94a01..c727ff1 100644 (file)
@@ -752,32 +752,15 @@ CGPGExchExtCommands::QueryInterface (REFIID riid, LPVOID FAR * ppvObj)
 }
 
 
-
-// We can't read the Body object because it would fire up the
-// security pop-up.  Writing is okay.
-//       vtResult.pdispVal = NULL;
-//       pDisp->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT,
-//                     DISPATCH_PROPERTYGET, &dispparamsNoArgs,
-//                     &vtResult, NULL, NULL);
-
-//       log_debug ("%s:%s: Body=%p (%s)\n", __FILE__, __func__, 
-//                    vtResult.pbVal,
-//                    (tmp = wchar_to_utf8 ((wchar_t*)vtResult.pbVal)));
-
-
-
-// XXX IExchExtSessionEvents::OnDelivery: could be used to automatically decrypt new mails
-// when they arrive
-
 /* Called by Echange to install commands and toolbar buttons.  Returns
-    S_FALSE to signal Exchange to continue calling extensions. */
+   S_FALSE to signal Exchange to continue calling extensions. */
 STDMETHODIMP 
 CGPGExchExtCommands::InstallCommands (
        LPEXCHEXTCALLBACK pEECB, // The Exchange Callback Interface.
        HWND hWnd,               // The window handle to the main window
                                  // of context.
        HMENU hMenu,             // The menu handle to main menu of context.
-       UINT FAR * pnCommandIDBase,  // The base conmmand id.
+       UINT FAR * pnCommandIDBase,  // The base command id.
        LPTBENTRY pTBEArray,     // The array of toolbar button entries.
        UINT nTBECnt,            // The count of button entries in array.
        ULONG lFlags)            // reserved
@@ -793,22 +776,22 @@ CGPGExchExtCommands::InstallCommands (
   int force_encrypt = 0;
   
   log_debug ("%s:%s: context=0x%lx (%s) flags=0x%lx\n", __FILE__, __func__, 
-               m_lContext,
-               (m_lContext == EECONTEXT_SESSION?           "Session"          :
-                m_lContext == EECONTEXT_VIEWER?            "Viewer"           :
-                m_lContext == EECONTEXT_REMOTEVIEWER?      "RemoteViewer"     :
-                m_lContext == EECONTEXT_SEARCHVIEWER?      "SearchViewer"     :
-                m_lContext == EECONTEXT_ADDRBOOK?          "AddrBook"         :
-                m_lContext == EECONTEXT_SENDNOTEMESSAGE?   "SendNoteMessage"  :
-                m_lContext == EECONTEXT_READNOTEMESSAGE?   "ReadNoteMessage"  :
-                m_lContext == EECONTEXT_SENDPOSTMESSAGE?   "SendPostMessage"  :
-                m_lContext == EECONTEXT_READPOSTMESSAGE?   "ReadPostMessage"  :
-                m_lContext == EECONTEXT_READREPORTMESSAGE? "ReadReportMessage":
-                m_lContext == EECONTEXT_SENDRESENDMESSAGE? "SendResendMessage":
-                m_lContext == EECONTEXT_PROPERTYSHEETS?    "PropertySheets"   :
-                m_lContext == EECONTEXT_ADVANCEDCRITERIA?  "AdvancedCriteria" :
-                m_lContext == EECONTEXT_TASK?              "Task" : ""),
-               lFlags);
+             m_lContext,
+             (m_lContext == EECONTEXT_SESSION?           "Session"          :
+              m_lContext == EECONTEXT_VIEWER?            "Viewer"           :
+              m_lContext == EECONTEXT_REMOTEVIEWER?      "RemoteViewer"     :
+              m_lContext == EECONTEXT_SEARCHVIEWER?      "SearchViewer"     :
+              m_lContext == EECONTEXT_ADDRBOOK?          "AddrBook"         :
+              m_lContext == EECONTEXT_SENDNOTEMESSAGE?   "SendNoteMessage"  :
+              m_lContext == EECONTEXT_READNOTEMESSAGE?   "ReadNoteMessage"  :
+              m_lContext == EECONTEXT_SENDPOSTMESSAGE?   "SendPostMessage"  :
+              m_lContext == EECONTEXT_READPOSTMESSAGE?   "ReadPostMessage"  :
+              m_lContext == EECONTEXT_READREPORTMESSAGE? "ReadReportMessage":
+              m_lContext == EECONTEXT_SENDRESENDMESSAGE? "SendResendMessage":
+              m_lContext == EECONTEXT_PROPERTYSHEETS?    "PropertySheets"   :
+              m_lContext == EECONTEXT_ADVANCEDCRITERIA?  "AdvancedCriteria" :
+              m_lContext == EECONTEXT_TASK?              "Task" : ""),
+             lFlags);
 
 
   if (m_lContext == EECONTEXT_READNOTEMESSAGE
@@ -841,7 +824,7 @@ CGPGExchExtCommands::InstallCommands (
      whether he really wants to do that.  
 
      Note, that we can't optimize the code here by first reading the
-     body becuase this would pop up the securiy window, telling tghe
+     body because this would pop up the securiy window, telling the
      user that someone is trying to read these data.
   */
   if (m_lContext == EECONTEXT_SENDNOTEMESSAGE)
@@ -872,7 +855,7 @@ CGPGExchExtCommands::InstallCommands (
                              NULL, NULL, NULL);
           xfree (dispparams.rgvarg[0].bstrVal);
           log_debug ("%s:%s: PROPERTYPUT(body) result -> %d\n",
-                       __FILE__, __func__, hr);
+                     __FILE__, __func__, hr);
 
           pDisp->Release();
           pDisp = NULL;
@@ -893,126 +876,137 @@ CGPGExchExtCommands::InstallCommands (
 
 
   /* XXX: factor out common code */
-  if (m_lContext == EECONTEXT_READNOTEMESSAGE) {
-    int nTBIndex;
-    HWND hwndToolbar = NULL;
-    CHAR szBuffer[128];
-
-    pEECB->GetMenuPos (EECMDID_ToolsCustomizeToolbar, &hMenuTools,
-                       NULL, NULL, 0);
-    AppendMenu (hMenuTools, MF_SEPARATOR, 0, NULL);
+  if (m_lContext == EECONTEXT_READNOTEMESSAGE)
+    {
+      int nTBIndex;
+      HWND hwndToolbar = NULL;
+      CHAR szBuffer[128];
+
+      pEECB->GetMenuPos (EECMDID_ToolsCustomizeToolbar, &hMenuTools,
+                         NULL, NULL, 0);
+      AppendMenu (hMenuTools, MF_SEPARATOR, 0, NULL);
        
-    LoadString (glob_hinst, IDS_DECRYPT_MENU_ITEM, szBuffer, 128);
-    AppendMenu (hMenuTools, MF_BYPOSITION | MF_STRING,
-                *pnCommandIDBase, szBuffer);
+      LoadString (glob_hinst, IDS_DECRYPT_MENU_ITEM, szBuffer, 128);
+      AppendMenu (hMenuTools, MF_BYPOSITION | MF_STRING,
+                  *pnCommandIDBase, szBuffer);
 
-    m_nCmdEncrypt = *pnCommandIDBase;
-    (*pnCommandIDBase)++;
+      m_nCmdEncrypt = *pnCommandIDBase;
+      (*pnCommandIDBase)++;
        
-    for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex) {    
-      if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid) {
-        hwndToolbar = pTBEArray[nTBIndex].hwnd;                
-        m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
-        pTBEArray[nTBIndex].itbbBase++;
-        break;         
-      }        
-    }
+      for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex)
+        {      
+          if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid)
+            {
+              hwndToolbar = pTBEArray[nTBIndex].hwnd;          
+              m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
+              pTBEArray[nTBIndex].itbbBase++;
+              break;           
+            }  
+        }
 
-    if (hwndToolbar) {
-      TBADDBITMAP tbab;
-      tbab.hInst = glob_hinst;
-      tbab.nID = IDB_DECRYPT;
-      m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP,
-                                      1, (LPARAM)&tbab);
-      m_nToolbarButtonID2 = pTBEArray[nTBIndex].itbbBase;
-      pTBEArray[nTBIndex].itbbBase++;
+      if (hwndToolbar)
+        {
+          TBADDBITMAP tbab;
+          tbab.hInst = glob_hinst;
+          tbab.nID = IDB_DECRYPT;
+          m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP,
+                                          1, (LPARAM)&tbab);
+          m_nToolbarButtonID2 = pTBEArray[nTBIndex].itbbBase;
+          pTBEArray[nTBIndex].itbbBase++;
+        }
     }
-  }
 
-  if (m_lContext == EECONTEXT_SENDNOTEMESSAGE) {
-    CHAR szBuffer[128];
-    int nTBIndex;
-    HWND hwndToolbar = NULL;
+  if (m_lContext == EECONTEXT_SENDNOTEMESSAGE) 
+    {
+      CHAR szBuffer[128];
+      int nTBIndex;
+      HWND hwndToolbar = NULL;
 
-    pEECB->GetMenuPos(EECMDID_ToolsCustomizeToolbar, &hMenuTools,
-                      NULL, NULL, 0);
-    AppendMenu(hMenuTools, MF_SEPARATOR, 0, NULL);
+      pEECB->GetMenuPos(EECMDID_ToolsCustomizeToolbar, &hMenuTools,
+                        NULL, NULL, 0);
+      AppendMenu(hMenuTools, MF_SEPARATOR, 0, NULL);
        
-    LoadString(glob_hinst, IDS_ENCRYPT_MENU_ITEM, szBuffer, 128);
-    AppendMenu(hMenuTools, MF_BYPOSITION | MF_STRING,
-               *pnCommandIDBase, szBuffer);
-
-    m_nCmdEncrypt = *pnCommandIDBase;
-    (*pnCommandIDBase)++;
-
-    LoadString(glob_hinst, IDS_SIGN_MENU_ITEM, szBuffer, 128);
-    AppendMenu(hMenuTools, MF_BYPOSITION | MF_STRING,
-               *pnCommandIDBase, szBuffer);
-
-    m_nCmdSign = *pnCommandIDBase;
-    (*pnCommandIDBase)++;
-
-    for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex)
-      {
-        if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid)
-          {
-            hwndToolbar = pTBEArray[nTBIndex].hwnd;
-            m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
-            pTBEArray[nTBIndex].itbbBase++;
-            break;     
-          }
-      }
-
-    if (hwndToolbar) {
-      TBADDBITMAP tbab;
-      tbab.hInst = glob_hinst;
-      tbab.nID = IDB_ENCRYPT;
-      m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP,
-                                      1, (LPARAM)&tbab);
-      m_nToolbarButtonID2 = pTBEArray[nTBIndex].itbbBase;
-      pTBEArray[nTBIndex].itbbBase++;
-      tbab.nID = IDB_SIGN;
-      m_nToolbarBitmap2 = SendMessage(hwndToolbar, TB_ADDBITMAP,
-                                      1, (LPARAM)&tbab);
+      LoadString(glob_hinst, IDS_ENCRYPT_MENU_ITEM, szBuffer, 128);
+      AppendMenu(hMenuTools, MF_STRING,
+                 *pnCommandIDBase, szBuffer);
+
+      m_nCmdEncrypt = *pnCommandIDBase;
+      (*pnCommandIDBase)++;
+
+      LoadString(glob_hinst, IDS_SIGN_MENU_ITEM, szBuffer, 128);
+      AppendMenu(hMenuTools, MF_STRING,
+                 *pnCommandIDBase, szBuffer);
+
+      m_nCmdSign = *pnCommandIDBase;
+      (*pnCommandIDBase)++;
+
+      for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex)
+        {
+          if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid)
+            {
+              hwndToolbar = pTBEArray[nTBIndex].hwnd;
+              m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
+              pTBEArray[nTBIndex].itbbBase++;
+              break;   
+            }
+        }
+
+      if (hwndToolbar) 
+        {
+          TBADDBITMAP tbab;
+          tbab.hInst = glob_hinst;
+          tbab.nID = IDB_ENCRYPT;
+          m_nToolbarBitmap1 = SendMessage (hwndToolbar, TB_ADDBITMAP,
+                                           1, (LPARAM)&tbab);
+          m_nToolbarButtonID2 = pTBEArray[nTBIndex].itbbBase;
+          pTBEArray[nTBIndex].itbbBase++;
+          tbab.nID = IDB_SIGN;
+          m_nToolbarBitmap2 = SendMessage (hwndToolbar, TB_ADDBITMAP,
+                                           1, (LPARAM)&tbab);
+        }
+
+      m_pExchExt->m_gpgEncrypt = opt.encrypt_default;
+      m_pExchExt->m_gpgSign    = opt.sign_default;
+      if (force_encrypt)
+        m_pExchExt->m_gpgEncrypt = true;
     }
-    m_pExchExt->m_gpgEncrypt = opt.encrypt_default;
-    m_pExchExt->m_gpgSign    = opt.sign_default;
-    if (force_encrypt)
-      m_pExchExt->m_gpgEncrypt = true;
-  }
-
-  if (m_lContext == EECONTEXT_VIEWER) {
-    CHAR szBuffer[128];
-    int nTBIndex;
-    HWND hwndToolbar = NULL;
-
-    pEECB->GetMenuPos (EECMDID_ToolsCustomizeToolbar, &hMenuTools,
-                       NULL, NULL, 0);
-    AppendMenu (hMenuTools, MF_SEPARATOR, 0, NULL);
-       
-    LoadString (glob_hinst, IDS_KEY_MANAGER, szBuffer, 128);
-    AppendMenu (hMenuTools, MF_BYPOSITION | MF_STRING,
-                *pnCommandIDBase, szBuffer);
-
-    m_nCmdEncrypt = *pnCommandIDBase;
-    (*pnCommandIDBase)++;      
-
-    for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex) {
-      if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid) {
-        hwndToolbar = pTBEArray[nTBIndex].hwnd;
-        m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
-        pTBEArray[nTBIndex].itbbBase++;
-        break; 
-      }
+
+  if (m_lContext == EECONTEXT_VIEWER) 
+    {
+      CHAR szBuffer[128];
+      int nTBIndex;
+      HWND hwndToolbar = NULL;
+      
+      pEECB->GetMenuPos (EECMDID_ToolsCustomizeToolbar, &hMenuTools,
+                         NULL, NULL, 0);
+      AppendMenu (hMenuTools, MF_SEPARATOR, 0, NULL);
+      
+      LoadString (glob_hinst, IDS_KEY_MANAGER, szBuffer, 128);
+      AppendMenu (hMenuTools, MF_BYPOSITION | MF_STRING,
+                  *pnCommandIDBase, szBuffer);
+
+      m_nCmdEncrypt = *pnCommandIDBase;
+      (*pnCommandIDBase)++;    
+      
+      for (nTBIndex = nTBECnt-1; nTBIndex > -1; --nTBIndex)
+        {
+          if (EETBID_STANDARD == pTBEArray[nTBIndex].tbid) 
+            {
+              hwndToolbar = pTBEArray[nTBIndex].hwnd;
+              m_nToolbarButtonID1 = pTBEArray[nTBIndex].itbbBase;
+              pTBEArray[nTBIndex].itbbBase++;
+              break;   
+            }
+        }
+      if (hwndToolbar)
+        {
+          TBADDBITMAP tbab;
+          tbab.hInst = glob_hinst;
+          tbab.nID = IDB_KEY_MANAGER;
+          m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP,
+                                          1, (LPARAM)&tbab);
+        }      
     }
-    if (hwndToolbar) {
-      TBADDBITMAP tbab;
-      tbab.hInst = glob_hinst;
-      tbab.nID = IDB_KEY_MANAGER;
-      m_nToolbarBitmap1 = SendMessage(hwndToolbar, TB_ADDBITMAP,
-                                      1, (LPARAM)&tbab);
-    }  
-  }
   return S_FALSE;
 }