From e285748eb98a76b045cb94dd61d1397c9fdd47f9 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Fri, 4 Oct 2024 20:15:35 -0400 Subject: [PATCH 01/34] Build 307.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 37d536a68..ed481b524 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from __future__ import annotations -build_id = "307" # may optionally include a ".{patchno}" suffix. +build_id = "307.1" # may optionally include a ".{patchno}" suffix. __doc__ = """This is a distutils setup-script for the pywin32 extensions. From 303acfd20a042e3d3eb25cea9274036e2e9ce5d1 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 6 Oct 2024 11:05:47 -0400 Subject: [PATCH 02/34] Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381) --- CHANGES.txt | 2 ++ com/win32comext/axscript/client/error.py | 10 +++++++--- com/win32comext/axscript/client/framework.py | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index fd800ca29..497361adf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,8 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 308, as yet unreleased -------------------------------------- +* Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381, @Avasam) + Build 307, released 2024-10-04 ------------------------------ ### Release process changes diff --git a/com/win32comext/axscript/client/error.py b/com/win32comext/axscript/client/error.py index 27d007ed4..2be175e89 100644 --- a/com/win32comext/axscript/client/error.py +++ b/com/win32comext/axscript/client/error.py @@ -10,15 +10,19 @@ import traceback import warnings from types import TracebackType +from typing import TYPE_CHECKING import pythoncom import win32com.server.util import winerror from win32com.axscript import axscript from win32com.server.exception import COMException -from win32comext.axscript.client.debug import DebugManager -from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript -from win32comext.axscript.server.axsite import AXSite + +if TYPE_CHECKING: + # Prevent circular imports + from win32comext.axscript.client.debug import DebugManager + from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript + from win32comext.axscript.server.axsite import AXSite debugging = 0 diff --git a/com/win32comext/axscript/client/framework.py b/com/win32comext/axscript/client/framework.py index e4c69f7ba..eada9097c 100644 --- a/com/win32comext/axscript/client/framework.py +++ b/com/win32comext/axscript/client/framework.py @@ -19,6 +19,9 @@ import win32com.server.util import winerror from win32com.axscript import axscript +from win32com.server.exception import COMException, IsCOMServerException + +from . import error # axscript.client.error def RemoveCR(text): @@ -32,9 +35,6 @@ def RemoveCR(text): SCRIPTTEXT_ISEXPRESSION = 0x00000020 SCRIPTTEXT_ISPERSISTENT = 0x00000040 -from win32com.server.exception import COMException, IsCOMServerException - -from . import error # ax.client.error state_map = { axscript.SCRIPTSTATE_UNINITIALIZED: "SCRIPTSTATE_UNINITIALIZED", From 07360ec739131b56478f3dbe8850e7b153b3527a Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 6 Oct 2024 21:50:53 -0400 Subject: [PATCH 03/34] Remove long-deprecated `win32com.server.dispatcher.DispatcherWin32dbg` (#2382) --- CHANGES.txt | 1 + com/win32com/server/dispatcher.py | 59 ------------------------------- 2 files changed, 1 insertion(+), 59 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 497361adf..eea52c8eb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,7 @@ Coming in build 308, as yet unreleased -------------------------------------- * Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381, @Avasam) +* Remove long-deprecated `win32com.server.dispatcher.DispatcherWin32dbg` (#2382, @Avasam) Build 307, released 2024-10-04 ------------------------------ diff --git a/com/win32com/server/dispatcher.py b/com/win32com/server/dispatcher.py index 95791a355..241edfef8 100644 --- a/com/win32com/server/dispatcher.py +++ b/com/win32com/server/dispatcher.py @@ -6,7 +6,6 @@ from __future__ import annotations import traceback -from sys import exc_info import pythoncom import win32api @@ -236,64 +235,6 @@ def _trace_(self, *args): win32api.OutputDebugString(str(args[-1]) + "\n") -DispatcherWin32dbg_deprecation_message = """\ -The DispatcherWin32dbg dispatcher is deprecated! -Please open an issue at https://github.com/mhammond/pywin32 is this is a problem. -Comment the relevant DeprecationWarning in dispatcher.py to re-enable.\ -""" - - -class DispatcherWin32dbg(DispatcherBase): - """A source-level debugger dispatcher - - A dispatcher which invokes the debugger as an object is instantiated, or - when an unexpected exception occurs. - - Requires Pythonwin. - """ - - def __init__(self, policyClass, ob): - raise DeprecationWarning(DispatcherWin32dbg_deprecation_message) - # No one uses this, and it just causes py2exe to drag all of pythonwin in. - import pywin.debugger - - pywin.debugger.brk() - # DEBUGGER Note - You can either: - # * Hit Run and wait for a (non Exception class) exception to occur! - # * Set a breakpoint and hit run. - # * Step into the object creation (a few steps away!) - DispatcherBase.__init__(self, policyClass, ob) - - def _HandleException_(self): - """Invoke the debugger post mortem capability""" - raise DeprecationWarning(DispatcherWin32dbg_deprecation_message) - # Save details away. - typ, val, tb = exc_info() - import pywin.debugger - import pywin.debugger.dbgcon - - debug = 0 - try: - raise typ(val) - except Exception: # AARG - What is this Exception??? - # Use some inside knowledge to borrow a Debugger option which dictates if we - # stop at "expected" exceptions. - debug = pywin.debugger.GetDebugger().get_option( - pywin.debugger.dbgcon.OPT_STOP_EXCEPTIONS - ) - except: - debug = 1 - if debug: - try: - pywin.debugger.post_mortem(tb, typ, val) # The original exception - except: - traceback.print_exc() - - # But still raise it. - del tb - raise - - try: import win32trace From ca0b57fa34bf3529f22ad19eea8422095d239b75 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 00:12:21 -0400 Subject: [PATCH 04/34] Set timeout-minutes in GitHub actions (#2383) --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bde655f3b..015651077 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,7 @@ jobs: test: name: Build and test runs-on: windows-2019 + timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -64,6 +65,7 @@ jobs: build_arm64: name: Cross-compile ARM runs-on: windows-2019 + timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -103,6 +105,7 @@ jobs: # This job can be run locally by running `pre-commit run` checkers: runs-on: windows-2019 + timeout-minutes: 20 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -126,6 +129,7 @@ jobs: mypy: runs-on: windows-2019 + timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -145,6 +149,7 @@ jobs: pyright: runs-on: windows-2019 + timeout-minutes: 20 strategy: fail-fast: false matrix: From 5e5e5d087fa052bd6bff1a2a5ffcebf248e8003a Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 00:27:12 -0400 Subject: [PATCH 05/34] Remove unbuildable `exchdapi` (#2374) --- AutoDuck/pywin32.mak | 5 - com/win32comext/mapi/__init__.py | 6 - com/win32comext/mapi/src/exchange.i | 2 +- com/win32comext/mapi/src/exchdapi.i | 264 ---------------------------- mypy.ini | 2 +- setup.py | 33 +--- 6 files changed, 7 insertions(+), 305 deletions(-) delete mode 100644 com/win32comext/mapi/src/exchdapi.i diff --git a/AutoDuck/pywin32.mak b/AutoDuck/pywin32.mak index 7245cfb2e..b6dd33464 100644 --- a/AutoDuck/pywin32.mak +++ b/AutoDuck/pywin32.mak @@ -82,7 +82,6 @@ WIN32COM_SOURCE = \ $(GENDIR)\PyIProfAdmin.d \ $(GENDIR)\PyIProfSect.d \ $(GENDIR)\exchange.d \ - $(GENDIR)\exchdapi.d \ $(ADSI_DIR)\src\*.cpp \ $(GENDIR)\adsi.d \ $(GENDIR)\PyIADsContainer.d \ @@ -231,10 +230,6 @@ $(GENDIR)\PyIProfSect.d: $(MAPI_DIR)/src/$(*B).i $(GENDIR)\exchange.d: $(MAPI_DIR)/src/$(*B).i $(PYTHON) makedfromi.py -o$*.d $(MAPI_DIR)/src/$(*B).i -# Exchange stuff. -$(GENDIR)\exchdapi.d: $(MAPI_DIR)/src/$(*B).i - $(PYTHON) makedfromi.py -o$*.d $(MAPI_DIR)/src/$(*B).i - # ADSI $(GENDIR)\adsi.d: $(ADSI_DIR)/src/$(*B).i $(PYTHON) makedfromi.py -o$*.d $(ADSI_DIR)/src/$(*B).i diff --git a/com/win32comext/mapi/__init__.py b/com/win32comext/mapi/__init__.py index d15a79e1f..181ae1c5c 100644 --- a/com/win32comext/mapi/__init__.py +++ b/com/win32comext/mapi/__init__.py @@ -14,12 +14,6 @@ sys.modules["win32com.mapi.exchange"] = exchange except ImportError: pass - try: - import exchdapi - - sys.modules["win32com.mapi.exchdapi"] = exchdapi - except ImportError: - pass else: import win32com diff --git a/com/win32comext/mapi/src/exchange.i b/com/win32comext/mapi/src/exchange.i index a70523c97..19362694f 100644 --- a/com/win32comext/mapi/src/exchange.i +++ b/com/win32comext/mapi/src/exchange.i @@ -1,4 +1,4 @@ -/* File : exchdapi.i */ +/* File : exchange.i */ /* This is designed to be an interface to the Exchange specific diff --git a/com/win32comext/mapi/src/exchdapi.i b/com/win32comext/mapi/src/exchdapi.i deleted file mode 100644 index 6f7960de8..000000000 --- a/com/win32comext/mapi/src/exchdapi.i +++ /dev/null @@ -1,264 +0,0 @@ -/* File : exchdapi.i */ - -%module exchdapi // An COM interface to Exchange's DAPI - -//%{ -//#define UNICODE -//%} - - -%include "typemaps.i" -%include "pywin32.i" -%include "pythoncom.i" -%include "mapilib.i" - -%{ - -#include "PythonCOMServer.h" -#include "PythonCOMRegister.h" - -#include -#include "EDKMDB.H" -#include "EDKMAPI.H" -#include "EDKCFG.H" -#include "EXCHINST.H" -#include "EDKUTILS.H" -// see exchange.i - the stand-alone exchange SDK seems to be -// missing lots of functions -#if defined(EXCHANGE_RE) -# define DAPI_FUNCTIONS_MISSING -#endif - -%} - -// @pyswig |HrInstallService| -%{ -HRESULT MyHrInstallService( - TCHAR *lpszServer, - TCHAR *lpszSiteDN, - TCHAR *pszServiceDisplayName, - TCHAR *lpszServiceName, - TCHAR *lpszCommonName, - TCHAR *lpszObjectGuid, - TCHAR *lpszProductGuid, - TCHAR *lpszExeName, - TCHAR *lpszDependencies, - TCHAR *lpszAccount, - TCHAR *lpszPassword -) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrInstallService(lpszServer, lpszSiteDN, pszServiceDisplayName, - lpszServiceName, lpszCommonName, lpszObjectGuid, - lpszProductGuid, lpszExeName, lpszDependencies, - lpszAccount, lpszPassword); -#endif -} -%} - -%name(HrInstallService) HRESULT MyHrInstallService( - TCHAR *INPUT, // lpszServer - TCHAR *INPUT, // lpszSiteDN - TCHAR *INPUT, // lpszServiceDisplayName - TCHAR *INPUT, // lpszServiceName - TCHAR *INPUT, // lpszCommonName - TCHAR *INPUT, // lpszObjectGuid - TCHAR *INPUT, // lpszProductGuid - TCHAR *INPUT, // lpszExeName - TCHAR *INPUT_NULLOK, // lpszDependencies - TCHAR *INPUT, // lpszAccount - TCHAR *INPUT_NULLOK // lpszPassword -); - - -// @pyswig |HrInstallMailboxAgent| -%{ -HRESULT MyHrInstallMailboxAgent( - TCHAR *Server, - TCHAR *SiteDN, - TCHAR *DisplayName, - TCHAR *RDN, - TCHAR *lpszExtensionName, - TCHAR *lpszExtensionData, - TCHAR *lpszAccountName) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrInstallMailboxAgent(Server, SiteDN, DisplayName, RDN, - lpszExtensionName, lpszExtensionData, - lpszAccountName); -#endif -} -%} -%name(HrInstallMailboxAgent) HRESULT MyHrInstallMailboxAgent( - TCHAR *INPUT, // Server - TCHAR *INPUT, // SiteDN - TCHAR *INPUT, // DisplayName - TCHAR *INPUT, // RDN - TCHAR *INPUT_NULLOK, // lpszExtensionName - TCHAR *INPUT_NULLOK, // lpszExtensionData - TCHAR *INPUT_NULLOK // lpszAccountName -); - -// @pyswig |HrCreateMailboxAgentProfile| -HRESULT HrCreateMailboxAgentProfile( - char *INPUT, // @pyparm string|serviceName||The name of the service. - char *INPUT // @pyparm string|profile||The profile. -); - -// @pyswig |HrCreateGatewayProfile| -HRESULT HrCreateGatewayProfile( - char *INPUT, // @pyparm string|serviceName||The name of the service. - char *INPUT // @pyparm string|profile||The profile. -); - - -// @pyswig |HrMailboxAgentExists| -%{ -HRESULT MyHrMailboxAgentExists( - TCHAR *server, - TCHAR *siteDN, - TCHAR *rdn) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrMailboxAgentExists(server, siteDN, rdn); -#endif -} -%} - -%name(HrMailboxAgentExists) HRESULT MyHrMailboxAgentExists( - TCHAR *INPUT, // @pyparm string|server||The name of the server - TCHAR *INPUT, // @pyparm string|siteDN||Contains the distinguished name (DN) of the site. - TCHAR *INPUT // @pyparm string|rdn||RDN of the site where the mailbox agent might exist. -); - - -// @pyswig |HrAdminProgramExists| -HRESULT HrAdminProgramExists(); - -// @pyswig |HrRemoveMailboxAgent|Removes a Mailbox Agent -%{ -HRESULT MyHrRemoveMailboxAgent( - TCHAR *server, - TCHAR *siteDN, - TCHAR *rdn) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrRemoveMailboxAgent(server, siteDN, rdn); -#endif -} -%} - -%name(HrRemoveMailboxAgent) HRESULT MyHrRemoveMailboxAgent( - TCHAR *INPUT, // @pyparm string|server||The name of the server - TCHAR *INPUT, // @pyparm string|siteDN||Contains the distinguished name (DN) of the site. - TCHAR *INPUT // @pyparm string|rdn||RDN of the site where the mailbox agent exists. -); - -// @pyswig |HrRemoveProfile|Removes a profile -HRESULT HrRemoveProfile( - char *INPUT // @pyparm string|profile||The profile to delete. -); - -// @pyswig [string, ...]|HrEnumOrganizations|Lists the names of the organizations on the server. -%{ -HRESULT MyHrEnumOrganizations( - TCHAR *p1, - TCHAR *p2, - TCHAR **out) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrEnumOrganizations(p1, p2, out); -#endif -} -%} -%name(HrEnumOrganizations) HRESULT MyHrEnumOrganizations( - TCHAR *INPUT_NULLOK, // @pyparm string|rootDN||Contains the distinguished name (DN) of the directory information tree (DIT) root. - TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server - TCHAR **OUTPUT_ARRAY // lppszOrganizations -); - -// @pyswig [string, ...]|HrEnumSites|Lists the names of the sites in an organization. -%{ -HRESULT MyHrEnumSites( - TCHAR *p1, - TCHAR *p2, - TCHAR **out) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrEnumSites(p1, p2, out); -#endif -} -%} -%name(HrEnumSites) HRESULT MyHrEnumSites( - TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server - TCHAR *INPUT_NULLOK, // @pyparm string|organizationDN||Contains the distinguished name (DN) of the organization. - TCHAR **OUTPUT_ARRAY // lppszSites -); - -// @pyswig [string, ...]|HrEnumContainers|Lists the names of the containers on the server -%{ -HRESULT MyHrEnumContainers( - TCHAR *p1, - TCHAR *p2, - BOOL b, - TCHAR **out) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrEnumContainers(p1, p2, b, out); -#endif -} -%} -%name(HrEnumContainers) HRESULT MyHrEnumContainers( - TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server - TCHAR *INPUT, // @pyparm string|siteDN||Distinguished name (DN) of the site. - BOOL fSubtree, // @pyparm int|fSubtree|| - TCHAR **OUTPUT_ARRAY // lppszContainers -); - -// @pyswig [string, ...]|HrEnumSiteAdmins|Lists the administrators for a site. -%{ -HRESULT MyHrEnumSiteAdmins( - TCHAR *p1, - TCHAR *p2, - TCHAR **out) -{ -#if defined(DAPI_FUNCTIONS_MISSING) - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - return E_NOTIMPL; -#else - return HrEnumSiteAdmins(p1, p2, out); -#endif -} -%} -%name(HrEnumSiteAdmins) HRESULT MyHrEnumSiteAdmins( - TCHAR *INPUT, // @pyparm string|server||The name of the server - TCHAR *INPUT, // @pyparm string|siteDN||Distinguished name (DN) of the site. - TCHAR **OUTPUT_ARRAY // lppszAdmins -); - -// @pyswig string|HrGetServiceAccountName|Obtains the account name for a service. -HRESULT HrGetServiceAccountName( - char *INPUT, // @pyparm string|serviceName||The name of the service - char **OUTPUT_MAPI // @pyparm string|serviceName||The name of the service -); diff --git a/mypy.ini b/mypy.ini index a93198a2f..962e9a6cc 100644 --- a/mypy.ini +++ b/mypy.ini @@ -45,7 +45,7 @@ exclude = (?x)( ) ; C-modules that will need type-stubs -[mypy-adsi.*,dde,exchange,exchdapi,mapi,perfmon,servicemanager,win32api,win32console,win32clipboard,win32comext.adsi.adsi,win32event,win32evtlog,win32file,win32gui,win32help,win32pdh,win32process,win32ras,win32security,win32service,win32trace,win32ui,win32uiole,win32wnet,_win32sysloader,_winxptheme] +[mypy-adsi.*,dde,exchange,mapi,perfmon,servicemanager,win32api,win32console,win32clipboard,win32comext.adsi.adsi,win32event,win32evtlog,win32file,win32gui,win32help,win32pdh,win32process,win32ras,win32security,win32service,win32trace,win32ui,win32uiole,win32wnet,_win32sysloader,_winxptheme] ignore_missing_imports = True ; verstamp is installed from win32verstamp.py called in setup.py diff --git a/setup.py b/setup.py index ed481b524..0f481c2c0 100644 --- a/setup.py +++ b/setup.py @@ -319,8 +319,8 @@ def __init__(self, name, **kw): WinExt_win32com.__init__(self, name, **kw) def get_pywin32_dir(self): - # 'win32com.mapi.exchange' and 'win32com.mapi.exchdapi' currently only - # ones with this special requirement + # 'win32com.mapi.exchange' is currently the only + # one with this special requirement return "win32comext/mapi" @@ -387,14 +387,7 @@ def finalize_options(self): self.swig_cpp = True # hrm - deprecated - should use swig_opts=-c++?? def _why_cant_build_extension(self, ext): - # Return None, or a reason it can't be built. - # Exclude exchange 32-bit utility libraries from 64-bit - # builds. Note that the exchange module now builds, but only - # includes interfaces for 64-bit builds. - if self.plat_name in ["win-amd64", "win-arm64"] and ext.name == "exchdapi": - return "No 64-bit library for utility functions available." - if ext.name == "exchdapi": - return "Haven't worked out how to build on vs2015" + """Return None, or a reason it can't be built.""" # axdebug fails to build on 3.11 due to Python "frame" objects changing. # This could be fixed, but is almost certainly not in use any more, so # just skip it. @@ -1625,20 +1618,6 @@ def finalize_options(self): ) ).split(), ), - WinExt_win32com_mapi( - "exchdapi", - libraries="advapi32", - include_dirs=["{mapi}/mapi_headers".format(**dirs)], - sources=( - """ - {mapi}/exchdapi.i {mapi}/exchdapi.cpp - {mapi}/mapi_stub_library/MapiStubLibrary.cpp - {mapi}/mapi_stub_library/StubUtils.cpp - """.format( - **dirs - ) - ).split(), - ), WinExt_win32com( "shell", libraries="shell32", @@ -2068,9 +2047,7 @@ def finalize_options(self): "PyIProfAdmin": "", "PyIProfSect": "IMAPIProp", "PyIConverterSession": "", - # exchange and exchdapi - "exchange": None, - "exchdapi": None, + "exchange": None, # mapi module "PyIExchangeManageStore": "", "PyIExchangeManageStoreEx": "", # ADSI @@ -2376,7 +2353,7 @@ def maybe_fixup_exes(): # Print the list of extension modules we skipped building. excluded_extensions = dist.command_obj["build_ext"].excluded_extensions if excluded_extensions: - skip_whitelist = {"exchdapi", "exchange", "axdebug"} + skip_whitelist = {"exchange", "axdebug"} skipped_ex = [] print("*** NOTE: The following extensions were NOT %s:" % what_string) for ext, why in excluded_extensions: From 6125a6199519861406533ba2c17dfb8e308664c2 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 12 Oct 2024 14:52:51 -0400 Subject: [PATCH 06/34] Resolve verstamp bootstraping problem | Allow GitHub installs (#2349) --- .github/workflows/main.yml | 9 +- CHANGES.txt | 2 + README.md | 2 +- mypy.ini | 3 +- setup.py | 49 ++----- win32/Lib/_win32verstamp_pywin32ctypes.py | 164 ++++++++++++++++++++++ win32/Lib/win32verstamp.py | 9 +- win32/scripts/VersionStamp/bulkstamp.py | 43 +++--- 8 files changed, 217 insertions(+), 64 deletions(-) create mode 100644 win32/Lib/_win32verstamp_pywin32ctypes.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 015651077..09c98f48e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: - name: Build and install run: | - python setup.py --skip-verstamp install --user + python setup.py install --user - name: Run tests # Run the tests directly from the source dir so support files (eg, .wav files etc) @@ -93,7 +93,7 @@ jobs: python .github\workflows\download-arm64-libs.py .\arm64libs - name: Build wheels - run: python setup.py --skip-verstamp build_ext -L .\arm64libs --plat-name win-arm64 build --plat-name win-arm64 bdist_wheel --plat-name win-arm64 + run: python setup.py build_ext -L .\arm64libs --plat-name win-arm64 build --plat-name win-arm64 bdist_wheel --plat-name win-arm64 - uses: actions/upload-artifact@v3 if: ${{ always() }} @@ -110,8 +110,9 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - # This job only needs to target the oldest supported version (black@stable supports Python >=3.8) - python-version: "3.8" + # This job only needs to target the oldest version supported by our checkers + # (black>=24.10.0 supports Python >=3.9) + python-version: "3.9" cache: pip cache-dependency-path: .github/workflows/main.yml - run: pip install clang-format pycln diff --git a/CHANGES.txt b/CHANGES.txt index eea52c8eb..7f46e93c9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,8 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 308, as yet unreleased -------------------------------------- +* Allowed installs from source w/o having pywin32 pre-installed (for instance, from GitHub) (#2349, @Avasam) +* Restored version stamping of installed DLLs (#2349, @Avasam) * Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381, @Avasam) * Remove long-deprecated `win32com.server.dispatcher.DispatcherWin32dbg` (#2382, @Avasam) diff --git a/README.md b/README.md index a74de0c42..b03454e45 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ the builds. Build 306 was the last released with this process. * Update setup.py with the new build number. -* Execute `make.bat`, wait forever, test the artifacts. +* Execute `make_all.bat`, wait forever, test the artifacts. * Upload .whl artifacts to pypi - we do this before pushing the tag because they might be rejected for an invalid `README.md`. Done via `py -3.? -m twine upload dist/*XXX*.whl`. diff --git a/mypy.ini b/mypy.ini index 962e9a6cc..bd1cd4316 100644 --- a/mypy.ini +++ b/mypy.ini @@ -48,11 +48,10 @@ exclude = (?x)( [mypy-adsi.*,dde,exchange,mapi,perfmon,servicemanager,win32api,win32console,win32clipboard,win32comext.adsi.adsi,win32event,win32evtlog,win32file,win32gui,win32help,win32pdh,win32process,win32ras,win32security,win32service,win32trace,win32ui,win32uiole,win32wnet,_win32sysloader,_winxptheme] ignore_missing_imports = True -; verstamp is installed from win32verstamp.py called in setup.py ; Most of win32com re-exports win32comext ; Test is a local untyped module in win32comext.axdebug ; pywin32_system32 is an empty module created in setup.py to store dlls -[mypy-verstamp,win32com.*,Test,pywin32_system32] +[mypy-win32com.*,Test,pywin32_system32] ignore_missing_imports = True ; Distutils being removed from stdlib currently causes some issues on Python 3.12 diff --git a/setup.py b/setup.py index 0f481c2c0..8b77726ae 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ __doc__ = """This is a distutils setup-script for the pywin32 extensions. The canonical source of truth for supported versions and build environments -is [the github CI](https://github.com/mhammond/pywin32/tree/main/.github/workflows). +is [the GitHub CI](https://github.com/mhammond/pywin32/tree/main/.github/workflows). To build and install locally for testing etc, you need a build environment which is capable of building the version of Python you are targeting, then: @@ -62,12 +62,6 @@ ) print("Building pywin32", pywin32_version) -try: - sys.argv.remove("--skip-verstamp") - skip_verstamp = True -except ValueError: - skip_verstamp = False - try: this_file = __file__ except NameError: @@ -978,35 +972,18 @@ def link( # target. Do this externally to avoid suddenly dragging in the # modules needed by this process, and which we will soon try and # update. - # Further, we don't really want to use sys.executable, because that - # means the build environment must have a current pywin32 installed - # in every version, which is a bit of a burden only for this. - # So we assume the "default" Python version (ie, the version run by - # py.exe) has pywin32 installed. - # (This creates a chicken-and-egg problem though! We used to work around - # this by ignoring failure to verstamp, but that's easy to miss. So now - # allow --skip-verstamp on the cmdline - but if it's not there, the - # verstamp must work.) - if not skip_verstamp: - args = ["py.exe", "-m", "win32verstamp"] - args.append(f"--version={pywin32_version}") - args.append("--comments=https://github.com/mhammond/pywin32") - args.append(f"--original-filename={os.path.basename(output_filename)}") - args.append("--product=PyWin32") - if "-v" not in sys.argv: - args.append("--quiet") - args.append(output_filename) - try: - self.spawn(args) - except Exception: - print("** Failed to versionstamp the binaries.") - # py.exe is not yet available for windows-arm64 so version stamp will fail - # ignore it for now - if platform.machine() != "ARM64": - print( - "** If you want to skip this step, pass '--skip-verstamp' on the setup.py command-line" - ) - raise + args = [ + sys.executable, + # NOTE: On Python 3.7, all args must be str + str(Path(__file__).parent / "win32" / "Lib" / "win32verstamp.py"), + f"--version={pywin32_version}", + "--comments=https://github.com/mhammond/pywin32", + f"--original-filename={os.path.basename(output_filename)}", + "--product=PyWin32", + "--quiet" if "-v" not in sys.argv else "", + output_filename, + ] + self.spawn(args) # Work around bpo-36302/bpo-42009 - it sorts sources but this breaks # support for building .mc files etc :( diff --git a/win32/Lib/_win32verstamp_pywin32ctypes.py b/win32/Lib/_win32verstamp_pywin32ctypes.py new file mode 100644 index 000000000..b878809b7 --- /dev/null +++ b/win32/Lib/_win32verstamp_pywin32ctypes.py @@ -0,0 +1,164 @@ +""" +A pure-python re-implementation of methods used by win32verstamp. +This is to avoid a bootstraping problem where win32verstamp is used during build, +but requires an installation of pywin32 to be present. +We used to work around this by ignoring failure to verstamp, but that's easy to miss. + +Implementations adapted, simplified and typed from: +- https://github.com/enthought/pywin32-ctypes/blob/main/win32ctypes/core/ctypes/_util.py +- https://github.com/enthought/pywin32-ctypes/blob/main/win32ctypes/core/cffi/_resource.py +- https://github.com/enthought/pywin32-ctypes/blob/main/win32ctypes/pywin32/win32api.py + +--- + +(C) Copyright 2014 Enthought, Inc., Austin, TX +All right reserved. + +This file is open source software distributed according to the terms in +https://github.com/enthought/pywin32-ctypes/blob/main/LICENSE.txt +""" + +from __future__ import annotations + +from collections.abc import Iterable +from ctypes import FormatError, WinDLL, get_last_error +from ctypes.wintypes import ( + BOOL, + DWORD, + HANDLE, + LPCWSTR, + LPVOID, + WORD, +) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ctypes import _NamedFuncPointer + + from _typeshed import ReadableBuffer + from typing_extensions import Literal, SupportsBytes, SupportsIndex + +kernel32 = WinDLL("kernel32", use_last_error=True) + +### +# https://github.com/enthought/pywin32-ctypes/blob/main/win32ctypes/core/ctypes/_util.py +### + + +def make_error(function: _NamedFuncPointer) -> OSError: + code = get_last_error() + exception = OSError() + exception.winerror = code + exception.function = function.__name__ + exception.strerror = FormatError(code).strip() + return exception + + +def check_null(result: int | None, function: _NamedFuncPointer, *_) -> int: + if result is None: + raise make_error(function) + return result + + +def check_false(result: int | None, function: _NamedFuncPointer, *_) -> Literal[True]: + if not bool(result): + raise make_error(function) + else: + return True + + +### +# https://github.com/enthought/pywin32-ctypes/blob/main/win32ctypes/core/cffi/_resource.py +### + +_BeginUpdateResource = kernel32.BeginUpdateResourceW +_BeginUpdateResource.argtypes = [LPCWSTR, BOOL] +_BeginUpdateResource.restype = HANDLE +_BeginUpdateResource.errcheck = check_null # type: ignore[assignment] # ctypes is badly typed + + +_EndUpdateResource = kernel32.EndUpdateResourceW +_EndUpdateResource.argtypes = [HANDLE, BOOL] +_EndUpdateResource.restype = BOOL +_EndUpdateResource.errcheck = check_false # type: ignore[assignment] # ctypes is badly typed + +_UpdateResource = kernel32.UpdateResourceW +_UpdateResource.argtypes = [HANDLE, LPCWSTR, LPCWSTR, WORD, LPVOID, DWORD] +_UpdateResource.restype = BOOL +_UpdateResource.errcheck = check_false # type: ignore[assignment] # ctypes is badly typed + + +### +# https://github.com/enthought/pywin32-ctypes/blob/main/win32ctypes/pywin32/win32api.py +### + +LANG_NEUTRAL = 0x00 + + +def BeginUpdateResource(filename: str, delete: bool): + """Get a handle that can be used by the :func:`UpdateResource`. + + Parameters + ---------- + fileName : str + The filename of the module to load. + delete : bool + When true all existing resources are deleted + + Returns + ------- + result : hModule + Handle of the resource. + + """ + return _BeginUpdateResource(filename, delete) + + +def EndUpdateResource(handle: int, discard: bool) -> None: + """End the update resource of the handle. + + Parameters + ---------- + handle : hModule + The handle of the resource as it is returned + by :func:`BeginUpdateResource` + + discard : bool + When True all writes are discarded. + + """ + _EndUpdateResource(handle, discard) + + +def UpdateResource( + handle: int, + type: str | int, + name: str | int, + data: Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer, + language: int = LANG_NEUTRAL, +) -> None: + """Update a resource. + + Parameters + ---------- + handle : hModule + The handle of the resource file as returned by + :func:`BeginUpdateResource`. + + type : str | int + The type of resource to update. + + name : str | int + The name or Id of the resource to update. + + data : bytes-like + A bytes like object is expected. + + language : int + Language to use, default is LANG_NEUTRAL. + + """ + lp_data = bytes(data) + _UpdateResource( + handle, LPCWSTR(type), LPCWSTR(name), language, lp_data, len(lp_data) + ) diff --git a/win32/Lib/win32verstamp.py b/win32/Lib/win32verstamp.py index e9f8c5e45..7b211303d 100644 --- a/win32/Lib/win32verstamp.py +++ b/win32/Lib/win32verstamp.py @@ -1,12 +1,15 @@ -""" Stamp a Win32 binary with version information. -""" +"""Stamp a Win32 binary with version information.""" import glob import optparse import os import struct -from win32api import BeginUpdateResource, EndUpdateResource, UpdateResource +from _win32verstamp_pywin32ctypes import ( + BeginUpdateResource, + EndUpdateResource, + UpdateResource, +) VS_FFI_SIGNATURE = -17890115 # 0xFEEF04BD VS_FFI_STRUCVERSION = 0x00010000 diff --git a/win32/scripts/VersionStamp/bulkstamp.py b/win32/scripts/VersionStamp/bulkstamp.py index 3a039ebb8..89be6347d 100644 --- a/win32/scripts/VersionStamp/bulkstamp.py +++ b/win32/scripts/VersionStamp/bulkstamp.py @@ -33,11 +33,15 @@ import fnmatch import os import sys +from collections.abc import Mapping +from optparse import Values -import verstamp -import win32api - -numStamped = 0 +try: + import win32verstamp +except ModuleNotFoundError: + # If run with pywin32 not already installed + sys.path.append(os.path.abspath(__file__ + "/../../../Lib")) + import win32verstamp g_patterns = [ "*.dll", @@ -47,9 +51,9 @@ ] -def walk(arg, dirname, names): - global numStamped - vars, debug, descriptions = arg +def walk(vars: Mapping[str, str], debug, descriptions, dirname, names) -> int: + """Returns the number of stamped files.""" + numStamped = 0 for name in names: for pat in g_patterns: if fnmatch.fnmatch(name, pat): @@ -60,11 +64,14 @@ def walk(arg, dirname, names): name = base[:-2] + ext is_dll = ext.lower() != ".exe" if os.path.normcase(name) in descriptions: - desc = descriptions[os.path.normcase(name)] + description = descriptions[os.path.normcase(name)] try: - verstamp.stamp(vars, pathname, desc, is_dll=is_dll) + options = Values( + {**vars, "description": description, "dll": is_dll} + ) + win32verstamp.stamp(pathname, options) numStamped += 1 - except win32api.error as exc: + except OSError as exc: print( "Could not stamp", pathname, @@ -76,13 +83,14 @@ def walk(arg, dirname, names): else: print("WARNING: description not provided for:", name) # skip branding this - assume already branded or handled elsewhere + return numStamped # print("Stamped", pathname) def load_descriptions(fname, vars): - retvars = {} + retvars: dict[str, str] = {} descriptions = {} lines = open(fname, "r").readlines() @@ -118,9 +126,7 @@ def load_descriptions(fname, vars): return retvars, descriptions -def scan(build, root, desc, **custom_vars): - global numStamped - numStamped = 0 +def scan(build, root: str, desc, **custom_vars): try: build = int(build) except ValueError: @@ -135,10 +141,11 @@ def scan(build, root, desc, **custom_vars): vars["build"] = build vars.update(custom_vars) - arg = vars, debug, descriptions - os.path.walk(root, walk, arg) + numStamped = 0 + for directory, dirnames, filenames in os.walk(root): + numStamped += walk(vars, debug, descriptions, directory, filenames) - print("Stamped %d files." % (numStamped)) + print(f"Stamped {numStamped} files.") if __name__ == "__main__": @@ -146,4 +153,4 @@ def scan(build, root, desc, **custom_vars): print("ERROR: incorrect invocation. See script's header comments.") sys.exit(1) - scan(*tuple(sys.argv[1:])) + scan(*sys.argv[1:]) From 4f212e134df72beeb68cb08345a8fdf610d3098f Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Sat, 12 Oct 2024 15:55:27 -0400 Subject: [PATCH 07/34] Fix Pythonwin displaying syntax errors in Python 3.13 (#2393) (#2394) --- CHANGES.txt | 1 + Pythonwin/pywin/framework/interact.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7f46e93c9..12f9b28f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 308, as yet unreleased -------------------------------------- +* Fix Pythonwin displaying syntax errors in Python 3.13 (#2393) * Allowed installs from source w/o having pywin32 pre-installed (for instance, from GitHub) (#2349, @Avasam) * Restored version stamping of installed DLLs (#2349, @Avasam) * Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381, @Avasam) diff --git a/Pythonwin/pywin/framework/interact.py b/Pythonwin/pywin/framework/interact.py index d93934e0e..1d940c3ca 100644 --- a/Pythonwin/pywin/framework/interact.py +++ b/Pythonwin/pywin/framework/interact.py @@ -300,7 +300,7 @@ def __init__(self, locals=None, globals=None): self.globals = globals code.InteractiveInterpreter.__init__(self, locals) - def showsyntaxerror(self, filename=None): + def showsyntaxerror(self, filename=None, **kwargs): sys.stderr.write( tracebackHeader.decode("ascii") ) # So the color syntaxer recognises it. From 857833047174da1f10a284715184725f2436d682 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Sat, 12 Oct 2024 16:10:16 -0400 Subject: [PATCH 08/34] Build 308 (#2391) --- CHANGES.txt | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 12f9b28f1..9187e900d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,9 +11,11 @@ or As of build 305, installation .exe files have been deprecated; see https://mhammond.github.io/pywin32_installers.html. -Coming in build 308, as yet unreleased +Coming in build 309, as yet unreleased -------------------------------------- +Build 308, released 2024-10-12 +------------------------------ * Fix Pythonwin displaying syntax errors in Python 3.13 (#2393) * Allowed installs from source w/o having pywin32 pre-installed (for instance, from GitHub) (#2349, @Avasam) * Restored version stamping of installed DLLs (#2349, @Avasam) diff --git a/setup.py b/setup.py index 8b77726ae..38692037f 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from __future__ import annotations -build_id = "307.1" # may optionally include a ".{patchno}" suffix. +build_id = "308" # may optionally include a ".{patchno}" suffix. __doc__ = """This is a distutils setup-script for the pywin32 extensions. From c6acaf54b441da947f98f8c9494a740ecdbc814a Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Sat, 12 Oct 2024 16:42:28 -0400 Subject: [PATCH 09/34] Build 308.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 38692037f..9d225e6ec 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from __future__ import annotations -build_id = "308" # may optionally include a ".{patchno}" suffix. +build_id = "308.1" # may optionally include a ".{patchno}" suffix. __doc__ = """This is a distutils setup-script for the pywin32 extensions. From 3ca02ab6c6889030ab7b06f38c2eba1290ff72f1 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 12:43:55 -0400 Subject: [PATCH 10/34] Remove unbuildable `exchange` methods (#2375) --- com/win32comext/mapi/src/exchange.i | 93 ++--------------------------- 1 file changed, 6 insertions(+), 87 deletions(-) diff --git a/com/win32comext/mapi/src/exchange.i b/com/win32comext/mapi/src/exchange.i index 19362694f..8afdf76b0 100644 --- a/com/win32comext/mapi/src/exchange.i +++ b/com/win32comext/mapi/src/exchange.i @@ -38,30 +38,6 @@ %} -/* - Only include Ex2KSdk.lib functions for 32-bit builds. -*/ -#ifdef SWIG_PY32BIT -%{ -#include "EDKMAPI.H" -#include "EDKCFG.H" -#include "EDKUTILS.H" - -// What is the correct story here?? The Exchange SDK story sucks - it seems -// certain functions in the stand-alone version are simply commented out. -#if defined(EXCHANGE_RE) -# define DONT_HAVE_MBLOGON -# define DONT_HAVE_ADDRLKUP -#endif - -#if !defined(DONT_HAVE_ADDRLKUP) -# include "ADDRLKUP.H" -#endif -#if !defined(DONT_HAVE_MBLOGON) -# include "MBLOGON.H" -#endif -%} -#endif %{ static int AddIID(PyObject *dict, const char *key, REFGUID guid) @@ -98,6 +74,12 @@ static int AddIID(PyObject *dict, const char *key, REFGUID guid) Only include Ex2KSdk.lib functions for 32-bit builds. */ #ifdef SWIG_PY32BIT +%{ +#include "EDKMAPI.H" +#include "EDKCFG.H" +#include "EDKUTILS.H" +%} + // @pyswig int, int|HrGetExchangeStatus|Obtains the current state of the server on a computer. // @rdesc The result is a tuple of serviceState, serverState HRESULT HrGetExchangeStatus( @@ -407,55 +389,6 @@ done: %} -%native (HrFindExchangeGlobalAddressList) PyHrFindExchangeGlobalAddressList; -%{ -// @pyswig string|HrFindExchangeGlobalAddressList|Retrieves the entry identifier of the global address list (GAL) container in the address book. -static PyObject *PyHrFindExchangeGlobalAddressList(PyObject *self, PyObject *args) -{ -#ifdef DONT_HAVE_ADDRLKUP - return PyErr_Format(PyExc_NotImplementedError, "Not available with this version of the Exchange SDK"); -#else - PyObject *obAddrBook; - // @pyparm |addrBook||The interface containing the address book - if (!PyArg_ParseTuple(args, "O:HrFindExchangeGlobalAddressList", &obAddrBook)) - return NULL; - - IAddrBook *pAB; - ULONG cb; - LPENTRYID peid; - if (!PyCom_InterfaceFromPyInstanceOrObject(obAddrBook, IID_IAddrBook, (void **)&pAB, 0)) - return NULL; - HRESULT _result = HrFindExchangeGlobalAddressList(pAB, &cb, &peid); - if (FAILED(_result)) { - return OleSetOleError(_result); - } - - PyObject *rc = PyBytes_FromStringAndSize((char *)peid, cb); - MAPIFreeBuffer(peid); - return rc; -#endif -} -%} - -%{ -HRESULT MyHrMailboxLogon( - IN LPMAPISESSION lplhSession, // ptr to MAPI session handle - IN LPMDB lpMDB, // ptr to message store - IN LPSTR lpszMsgStoreDN, // ptr to message store DN - IN LPSTR lpszMailboxDN, // ptr to mailbox DN - OUT LPMDB *lppMailboxMDB) // ptr to mailbox message store ptr -{ -#if defined(DONT_HAVE_MBLOGON) - PyGILState_STATE gstate = PyGILState_Ensure(); - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - PyGILState_Release(gstate); - return E_NOTIMPL; -#else - return HrMailboxLogon(lplhSession, lpMDB, lpszMsgStoreDN, lpszMailboxDN, lppMailboxMDB); -#endif -} -%} - // @pyswig |HrMailboxLogon|Logs on a server and mailbox. %name(HrMailboxLogon) HRESULT MyHrMailboxLogon( IMAPISession *INPUT, // @pyparm |session||The session object @@ -465,20 +398,6 @@ HRESULT MyHrMailboxLogon( IMsgStore **OUTPUT ); -%{ -HRESULT MyHrMailboxLogoff(IMsgStore **pp) -{ -#if defined(DONT_HAVE_MBLOGON) - PyGILState_STATE gstate = PyGILState_Ensure(); - PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK"); - PyGILState_Release(gstate); - return E_NOTIMPL; -#else - return HrMailboxLogoff(pp); -#endif -} -%} - // @pyswig |HrMailboxLogoff|Logs off a server and mailbox. %name(HrMailboxLogoff) HRESULT MyHrMailboxLogoff( IMsgStore **INPUT // @pyparm |inbox||The open inbox. From cba799bc68db46837c27b5832b9c1a37c8ec3a36 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 12:44:40 -0400 Subject: [PATCH 11/34] Enable flake8-type-checking (TCH) to prevent regressions due to extra imports for type-checking purposes (#2388) --- com/win32comext/axscript/client/error.py | 1 - ruff.toml | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/com/win32comext/axscript/client/error.py b/com/win32comext/axscript/client/error.py index 2be175e89..5aadbf9bc 100644 --- a/com/win32comext/axscript/client/error.py +++ b/com/win32comext/axscript/client/error.py @@ -19,7 +19,6 @@ from win32com.server.exception import COMException if TYPE_CHECKING: - # Prevent circular imports from win32comext.axscript.client.debug import DebugManager from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript from win32comext.axscript.server.axsite import AXSite diff --git a/ruff.toml b/ruff.toml index cd23d7822..603043e8f 100644 --- a/ruff.toml +++ b/ruff.toml @@ -31,6 +31,13 @@ select = [ "UP007", # non-pep604-annotation "UP010", # unnecessary-future-import "UP037", # quoted-annotation + + # Helps prevent circular imports and other unneeded imports + "TCH", # flake8-type-checking +] +extend-ignore = [ + # No such concerns for stdlib + "TCH003", # typing-only-standard-library-import ] [lint.per-file-ignores] From 285019dd294fadd10d297cdbec5ce30312fcccf3 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 12:46:23 -0400 Subject: [PATCH 12/34] Fixed openGLDemo, simplified guidemo and restored fondemo in it (#2345) --- .github/workflows/main.yml | 4 +- CHANGES.txt | 2 + Pythonwin/pywin/Demos/guidemo.py | 53 +++++-------------- Pythonwin/pywin/Demos/ocx/webbrowser.py | 4 +- Pythonwin/pywin/Demos/openGLDemo.py | 69 ++++++++++++++++++++----- 5 files changed, 76 insertions(+), 56 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 09c98f48e..6ccddac84 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -145,7 +145,7 @@ jobs: cache: pip cache-dependency-path: .github/workflows/main.yml check-latest: true - - run: pip install types-regex types-setuptools mypy==1.11 + - run: pip install types-regex types-setuptools PyOpenGL mypy==1.11 - run: mypy . --python-version=${{ matrix.python-version }} pyright: @@ -164,7 +164,7 @@ jobs: cache-dependency-path: .github/workflows/main.yml check-latest: true # pyright vendors typeshed, but let's make sure we have the most up to date stubs - - run: pip install types-regex types-setuptools + - run: pip install types-regex types-setuptools PyOpenGL - uses: jakebailey/pyright-action@v2 with: python-version: ${{ matrix.python-version }} diff --git a/CHANGES.txt b/CHANGES.txt index 9187e900d..e41e71084 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,8 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- +* Fixed "Open GL Demo" (`Pythonwin/pywin/Demos/openGLDemo.py`) and restore "Font" demo in `Pythonwin/pywin/Demos/guidemo.py` (#2345, @Avasam) + Build 308, released 2024-10-12 ------------------------------ * Fix Pythonwin displaying syntax errors in Python 3.13 (#2393) diff --git a/Pythonwin/pywin/Demos/guidemo.py b/Pythonwin/pywin/Demos/guidemo.py index 887738c24..1069162a3 100644 --- a/Pythonwin/pywin/Demos/guidemo.py +++ b/Pythonwin/pywin/Demos/guidemo.py @@ -2,11 +2,10 @@ import sys import __main__ -import regutil -import win32api -import win32ui +import pywin.dialogs.list -demos = [ # ('Font', 'import fontdemo;fontdemo.FontDemo()'), +demos = [ + ("Font", "import fontdemo;fontdemo.FontDemo()"), ("Open GL Demo", "import openGLDemo;openGLDemo.test()"), ("Threaded GUI", "import threadedgui;threadedgui.ThreadedDemo()"), ("Tree View Demo", "import hiertest;hiertest.demoboth()"), @@ -19,58 +18,32 @@ ("OCX Control Demo", "from ocx import ocxtest;ocxtest.demo()"), ("OCX Serial Port Demo", "from ocx import ocxserialtest; ocxserialtest.test()"), ( - "IE4 Control Demo", + "Internet Explorer Control Demo", 'from ocx import webbrowser; webbrowser.Demo("http://www.python.org")', ), ] -def demo(): +def _exec_demo(cmd): try: - # seeif I can locate the demo files. - import fontdemo - except ImportError: - # else put the demos direectory on the path (if not already) - try: - instPath = regutil.GetRegistryDefaultValue( - regutil.BuildDefaultPythonKey() + "\\InstallPath" - ) - except win32api.error: - print( - "The InstallPath can not be located, and the Demos directory is not on the path" - ) - instPath = "." - - demosDir = win32ui.FullPath(instPath + "\\Demos") - for path in sys.path: - if win32ui.FullPath(path) == demosDir: - break - else: - sys.path.append(demosDir) - import fontdemo + exec(cmd) + except Exception as error: + print(f"Demo of {cmd} failed - {type(error)}:{error}") - import sys +def demo(): if "/go" in sys.argv: for name, cmd in demos: - try: - exec(cmd) - except: - print(f"Demo of {cmd} failed - {sys.exc_info()[0]}:{sys.exc_info()[1]}") + _exec_demo(cmd) return - # Otherwise allow the user to select the demo to run - - import pywin.dialogs.list - while 1: + # Otherwise allow the user to select the demo to run + while True: rc = pywin.dialogs.list.SelectFromLists("Select a Demo", demos, ["Demo Title"]) if rc is None: break title, cmd = demos[rc] - try: - exec(cmd) - except: - print(f"Demo of {title} failed - {sys.exc_info()[0]}:{sys.exc_info()[1]}") + _exec_demo(cmd) if __name__ == __main__.__name__: diff --git a/Pythonwin/pywin/Demos/ocx/webbrowser.py b/Pythonwin/pywin/Demos/ocx/webbrowser.py index 89c713c26..c881d3daa 100644 --- a/Pythonwin/pywin/Demos/ocx/webbrowser.py +++ b/Pythonwin/pywin/Demos/ocx/webbrowser.py @@ -1,4 +1,4 @@ -# This demo uses the IE4 Web Browser control. +# This demo uses the Internet Explorer Web Browser control. # It catches an "OnNavigate" event, and updates the frame title. # (event stuff by Neil Hodgson) @@ -16,7 +16,7 @@ "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1 ) if WebBrowserModule is None: - raise ImportError("IE4 does not appear to be installed.") + raise ImportError("Internet Explorer does not appear to be installed.") class MyWebBrowser(activex.Control, WebBrowserModule.WebBrowser): diff --git a/Pythonwin/pywin/Demos/openGLDemo.py b/Pythonwin/pywin/Demos/openGLDemo.py index f7449d1e0..d51c08c97 100644 --- a/Pythonwin/pywin/Demos/openGLDemo.py +++ b/Pythonwin/pywin/Demos/openGLDemo.py @@ -2,11 +2,55 @@ import sys -from pywin.mfc import docview - try: - from OpenGL.GL import * # nopycln: import - from OpenGL.GLU import * # nopycln: import + from OpenGL.GL import ( + GL_COLOR_BUFFER_BIT, + GL_DEPTH_BUFFER_BIT, + GL_DEPTH_TEST, + GL_MODELVIEW, + GL_PROJECTION, + GL_QUAD_STRIP, + GL_QUADS, + GL_TRIANGLE_FAN, + glBegin, + glClear, + glClearColor, + glClearDepth, + glColor3f, + glEnable, + glEnd, + glFinish, + glLoadIdentity, + glMatrixMode, + glPopMatrix, + glPushMatrix, + glRotatef, + glTranslatef, + glVertex3f, + glViewport, + ) + from OpenGL.GLU import ( + GLU_FILL, + GLU_SMOOTH, + gluCylinder, + gluNewQuadric, + gluPerspective, + gluQuadricDrawStyle, + gluQuadricNormals, + ) + from OpenGL.WGL import ( + PIXELFORMATDESCRIPTOR, + ChoosePixelFormat, + DescribePixelFormat, + GetPixelFormat, + SetPixelFormat, + SwapBuffers, + wglCreateContext, + wglDeleteContext, + wglGetCurrentContext, + wglGetCurrentDC, + wglMakeCurrent, + ) except ImportError: print("The OpenGL extensions do not appear to be installed.") print("This Pythonwin demo can not run") @@ -16,6 +60,7 @@ import win32api import win32con import win32ui +from pywin.mfc import docview PFD_TYPE_RGBA = 0 PFD_TYPE_COLORINDEX = 1 @@ -117,7 +162,7 @@ def OnEraseBkgnd(self, dc): # The OpenGL helpers def _SetupPixelFormat(self): dc = self.dc.GetSafeHdc() - pfd = CreatePIXELFORMATDESCRIPTOR() + pfd = PIXELFORMATDESCRIPTOR() pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER pfd.iPixelType = PFD_TYPE_RGBA pfd.cColorBits = 24 @@ -125,16 +170,16 @@ def _SetupPixelFormat(self): pfd.iLayerType = PFD_MAIN_PLANE pixelformat = ChoosePixelFormat(dc, pfd) SetPixelFormat(dc, pixelformat, pfd) - self._CreateRGBPalette() + self._CreateRGBPalette(pfd) - def _CreateRGBPalette(self): - dc = self.dc.GetSafeHdc() - n = GetPixelFormat(dc) - pfd = DescribePixelFormat(dc, n) + def _CreateRGBPalette(self, pfd): + hdc = self.dc.GetSafeHdc() + iPixelFormat = GetPixelFormat(hdc) + DescribePixelFormat(hdc, iPixelFormat, pfd.nSize, pfd) if pfd.dwFlags & PFD_NEED_PALETTE: - n = 1 << pfd.cColorBits + iPixelFormat = 1 << pfd.cColorBits pal = [] - for i in range(n): + for i in range(iPixelFormat): this = ( ComponentFromIndex(i, pfd.cRedBits, pfd.cRedShift), ComponentFromIndex(i, pfd.cGreenBits, pfd.cGreenShift), From 01e16eed68dc79b0a86c57c6c3afb35da86945b1 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 13:13:12 -0400 Subject: [PATCH 13/34] Fix `reportUnnecessaryComparison` that can be resolved through annotations (#2327) --- Pythonwin/pywin/framework/app.py | 8 +++++++- Pythonwin/pywin/tools/hierlist.py | 4 ++-- com/win32comext/axdebug/codecontainer.py | 10 +++++++--- pyrightconfig.json | 4 ++-- win32/Lib/sspi.py | 2 +- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Pythonwin/pywin/framework/app.py b/Pythonwin/pywin/framework/app.py index f0c4d6d3e..4e0f09b94 100644 --- a/Pythonwin/pywin/framework/app.py +++ b/Pythonwin/pywin/framework/app.py @@ -3,9 +3,12 @@ # # We also grab the FileOpen command, to invoke our Python editor " The PythonWin application code. Manages most aspects of MDI, etc " +from __future__ import annotations + import os import sys import traceback +from typing import TYPE_CHECKING import regutil import win32api @@ -16,6 +19,9 @@ from . import scriptutils +if TYPE_CHECKING: + from typing_extensions import Literal + # Helper for writing a Window position by name, and later loading it. def SaveWindowSize(section, rect, state=""): @@ -61,7 +67,7 @@ class MainFrame(window.MDIFrameWnd): win32ui.ID_INDICATOR_COLNUM, ) - def OnCreate(self, cs): + def OnCreate(self, cs) -> Literal[-1, 0, 1]: self._CreateStatusBar() return 0 diff --git a/Pythonwin/pywin/tools/hierlist.py b/Pythonwin/pywin/tools/hierlist.py index 7ec29563a..1e4f8d768 100644 --- a/Pythonwin/pywin/tools/hierlist.py +++ b/Pythonwin/pywin/tools/hierlist.py @@ -12,7 +12,7 @@ # If you need to use the Tree Control, you may still find this API a reasonable # choice. However, you should investigate using the tree control directly # to provide maximum flexibility (but with extra work). - +from __future__ import annotations import commctrl import win32api @@ -259,7 +259,7 @@ def GetBitmapColumn(self, item): else: return 4 - def GetSelectedBitmapColumn(self, item): + def GetSelectedBitmapColumn(self, item) -> int | None: return 0 def CheckChangedChildren(self): diff --git a/com/win32comext/axdebug/codecontainer.py b/com/win32comext/axdebug/codecontainer.py index d82ee0008..babbd6fc4 100644 --- a/com/win32comext/axdebug/codecontainer.py +++ b/com/win32comext/axdebug/codecontainer.py @@ -4,9 +4,12 @@ to color the text, and also how to translate lines into offsets, and back. """ +from __future__ import annotations + import os import sys import tokenize +from typing import Any import win32api import winerror @@ -26,7 +29,7 @@ class SourceCodeContainer: def __init__( self, - text, + text: str | None, fileName="", sourceContext=0, startLineNumber=0, @@ -34,12 +37,13 @@ def __init__( debugDocument=None, ): self.sourceContext = sourceContext # The source context added by a smart host. - self.text = text + self.text: str | None = text if text: self._buildlines() self.nextLineNo = 0 self.fileName = fileName - self.codeContexts = {} + # Any: PyIDispatch type is not statically exposed + self.codeContexts: dict[int, Any] = {} self.site = site self.startLineNumber = startLineNumber self.debugDocument = debugDocument diff --git a/pyrightconfig.json b/pyrightconfig.json index bc3c26fbc..d90035dc3 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -37,6 +37,8 @@ "reportOptionalIterable": "warning", "reportOptionalMemberAccess": "warning", "reportOptionalSubscript": "warning", + // Needs fixes in types-pywin32 and requires Python 3.8 to annotate ambiguous global variables + "reportUnnecessaryComparison": "warning", // TODO: Leave Unbound/Undefined to their own PR(s) "reportUnboundVariable": "warning", "reportUndefinedVariable": "warning", @@ -49,8 +51,6 @@ "reportMissingModuleSource": "none", // External type stubs may not be completable, and this will require type stubs for dynamic modules. "reportMissingTypeStubs": "information", - // Sometimes used for extra runtime safety - "reportUnnecessaryComparison": "warning", // Use Flake8/Pycln/Ruff instead "reportUnusedImport": "none", } diff --git a/win32/Lib/sspi.py b/win32/Lib/sspi.py index 5b6291354..d2658773a 100644 --- a/win32/Lib/sspi.py +++ b/win32/Lib/sspi.py @@ -26,7 +26,7 @@ def __init__(self): def reset(self): """Reset everything to an unauthorized state""" - self.ctxt = None + self.ctxt: win32security.PyCtxtHandleType | None = None self.authenticated = False self.initiator_name = None self.service_name = None From 489230a02251d227238ae1424d4d249fd5a862dd Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 13:19:43 -0400 Subject: [PATCH 14/34] Attempt at handling random `testFileTimes` test failure in `test_win32file.py` (#2346) --- win32/test/test_win32file.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/win32/test/test_win32file.py b/win32/test/test_win32file.py index fd72c614d..4763f9289 100644 --- a/win32/test/test_win32file.py +++ b/win32/test/test_win32file.py @@ -227,16 +227,25 @@ def testFileTimes(self): ) try: ct, at, wt = win32file.GetFileTime(f) - self.assertTrue( - ct >= now, + # NOTE (Avasam): I've seen the time be off from -0.003 to +1.11 seconds, + # so the above comment about microseconds might be wrong. + # Let's standardize ms and avoid random CI failures + # https://github.com/mhammond/pywin32/issues/2203 + ct = ct.replace(microsecond=0) + at = at.replace(microsecond=0) + wt = wt.replace(microsecond=0) + self.assertGreaterEqual( + ct, + now, f"File was created in the past - now={now}, created={ct}", ) - self.assertTrue(now <= ct <= nowish, (now, ct)) - self.assertTrue( - wt >= now, + self.assertTrue(now <= ct <= nowish, (now, ct, nowish)) + self.assertGreaterEqual( + wt, + now, f"File was written-to in the past now={now}, written={wt}", ) - self.assertTrue(now <= wt <= nowish, (now, wt)) + self.assertTrue(now <= wt <= nowish, (now, wt, nowish)) # Now set the times. win32file.SetFileTime(f, later, later, later, UTCTimes=True) From 9ec6542a02239d7863d180a9ea160bb3ca1bbbdc Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 13:39:23 -0400 Subject: [PATCH 15/34] Simplify dict iterations from Python 2 to 3 migration (#2331) --- AutoDuck/Dump2HHC.py | 8 +-- AutoDuck/InsertExternalOverviews.py | 8 +-- AutoDuck/py2d.py | 4 +- CHANGES.txt | 1 + Pythonwin/pywin/Demos/app/customprint.py | 4 +- Pythonwin/pywin/debugger/configui.py | 2 +- Pythonwin/pywin/debugger/debugger.py | 2 +- Pythonwin/pywin/framework/dbgcommands.py | 2 +- Pythonwin/pywin/framework/mdi_pychecker.py | 4 +- Pythonwin/pywin/framework/scriptutils.py | 2 +- Pythonwin/pywin/framework/sgrepmdi.py | 4 +- Pythonwin/pywin/mfc/dialog.py | 6 +- Pythonwin/pywin/scintilla/bindings.py | 2 +- Pythonwin/pywin/scintilla/config.py | 6 +- Pythonwin/pywin/scintilla/configui.py | 3 +- Pythonwin/pywin/scintilla/formatter.py | 6 +- Pythonwin/pywin/scintilla/view.py | 16 ++--- Pythonwin/pywin/tools/browser.py | 9 +-- com/win32com/client/__init__.py | 16 ++--- com/win32com/client/build.py | 19 +++--- com/win32com/client/dynamic.py | 11 ++-- com/win32com/client/gencache.py | 16 +++-- com/win32com/client/genpy.py | 58 ++++++------------- com/win32com/demos/dump_clipboard.py | 2 +- com/win32com/makegw/makegwparse.py | 6 +- com/win32com/server/policy.py | 4 +- com/win32com/servers/dictionary.py | 2 +- com/win32com/test/testDictionary.py | 2 +- com/win32com/test/testIterators.py | 2 +- com/win32com/test/testmakepy.py | 2 +- com/win32com/universal.py | 4 +- com/win32comext/axdebug/debugger.py | 4 +- com/win32comext/axdebug/expressions.py | 4 +- com/win32comext/axscript/client/framework.py | 2 +- com/win32comext/axscript/client/pyscript.py | 2 +- com/win32comext/axscript/server/axsite.py | 2 +- .../shell/demos/IFileOperationProgressSink.py | 2 +- .../shell/demos/ITransferAdviseSink.py | 8 ++- .../shell/demos/servers/shell_view.py | 4 +- isapi/install.py | 16 +++-- win32/Demos/GetSaveFileName.py | 4 +- win32/Demos/rastest.py | 10 ++-- win32/Demos/security/sspi/fetch_url.py | 6 +- win32/Demos/security/sspi/simple_auth.py | 2 +- win32/Demos/win32clipboardDemo.py | 9 +-- win32/Demos/win32console_demo.py | 5 +- win32/Demos/win32netdemo.py | 7 +-- win32/Lib/win32timezone.py | 12 ++-- win32/Lib/win32verstamp.py | 2 +- win32/test/test_win32api.py | 2 +- win32/test/test_win32guistruct.py | 6 +- 51 files changed, 147 insertions(+), 195 deletions(-) diff --git a/AutoDuck/Dump2HHC.py b/AutoDuck/Dump2HHC.py index ef16a3816..343bdbca1 100644 --- a/AutoDuck/Dump2HHC.py +++ b/AutoDuck/Dump2HHC.py @@ -231,9 +231,7 @@ def _urlescape(name): def _genCategoryHTMLFromDict(dict, output): - keys = list(dict.keys()) - keys.sort() - for key in keys: + for key in sorted(dict): topic = dict[key] output.write(f'
  • {topic.name}\n') @@ -285,9 +283,7 @@ def genCategoryHTML(output_dir, cats): def _genItemsFromDict(dict, cat, output, target, do_children=1): CHM = "mk:@MSITStore:%s.chm::/" % target - keys = list(dict.keys()) - keys.sort() - for k in keys: + for k in sorted(dict): context = dict[k].context name = dict[k].name output.write( diff --git a/AutoDuck/InsertExternalOverviews.py b/AutoDuck/InsertExternalOverviews.py index c0465e40b..e4bbd8d51 100644 --- a/AutoDuck/InsertExternalOverviews.py +++ b/AutoDuck/InsertExternalOverviews.py @@ -26,12 +26,8 @@ def genHTML(doc): s = "" for cat in doc: s += f"

    {cat.label}

    \n" - dict = {} - for item in cat.overviewItems.items: - dict[item.name] = item.href - keys = list(dict.keys()) - keys.sort() - for k in keys: + dict = {item.name: item.href for item in cat.overviewItems.items} + for k in sorted(dict): s += f'
  • {k}\n' return s diff --git a/AutoDuck/py2d.py b/AutoDuck/py2d.py index 6a0452bf7..647fb7121 100644 --- a/AutoDuck/py2d.py +++ b/AutoDuck/py2d.py @@ -100,7 +100,7 @@ def build_module(fp, mod_name): functions = [] classes = [] constants = [] - for name, ob in list(mod.__dict__.items()): + for name, ob in mod.__dict__.items(): if name.startswith("_"): continue if hasattr(ob, "__module__") and ob.__module__ != mod_name: @@ -139,7 +139,7 @@ def build_module(fp, mod_name): func_infos = [] # We need to iter the keys then to a getattr() so the funky descriptor # things work. - for n in list(ob.ob.__dict__.keys()): + for n in ob.ob.__dict__: o = getattr(ob.ob, n) if isinstance(o, (types.FunctionType, types.MethodType)): info = BuildInfo(n, o) diff --git a/CHANGES.txt b/CHANGES.txt index e41e71084..08f963451 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- +* Improved handling of dict iterations (removes Python 2 support code, small general speed improvement) (#2332, @Avasam) * Fixed "Open GL Demo" (`Pythonwin/pywin/Demos/openGLDemo.py`) and restore "Font" demo in `Pythonwin/pywin/Demos/guidemo.py` (#2345, @Avasam) Build 308, released 2024-10-12 diff --git a/Pythonwin/pywin/Demos/app/customprint.py b/Pythonwin/pywin/Demos/app/customprint.py index 4a666ca41..4d9371d68 100644 --- a/Pythonwin/pywin/Demos/app/customprint.py +++ b/Pythonwin/pywin/Demos/app/customprint.py @@ -45,9 +45,7 @@ def OnDraw(self, dc): oldPen = None x, y = self.size delta = 2 - colors = list(self.colors.keys()) - colors.sort() - colors *= 2 + colors = sorted(self.colors) * 2 for color in colors: if oldPen is None: oldPen = dc.SelectObject(self.pens[color]) diff --git a/Pythonwin/pywin/debugger/configui.py b/Pythonwin/pywin/debugger/configui.py index 32de4ee5f..c24d5cda1 100644 --- a/Pythonwin/pywin/debugger/configui.py +++ b/Pythonwin/pywin/debugger/configui.py @@ -19,7 +19,7 @@ def OnInitDialog(self): def OnOK(self): self.UpdateData() dirty = 0 - for key, val in list(self.items()): + for key, val in self.items(): if key in self.options: if self.options[key] != val: self.options[key] = val diff --git a/Pythonwin/pywin/debugger/debugger.py b/Pythonwin/pywin/debugger/debugger.py index 2cddf0ea3..dca59b8c7 100644 --- a/Pythonwin/pywin/debugger/debugger.py +++ b/Pythonwin/pywin/debugger/debugger.py @@ -389,7 +389,7 @@ def DeleteSelected(self): item_id = self.GetItem(num)[6] from bdb import Breakpoint - for bplist in list(Breakpoint.bplist.values()): + for bplist in Breakpoint.bplist.values(): for bp in bplist: if id(bp) == item_id: self.debugger.clear_break(bp.file, bp.line) diff --git a/Pythonwin/pywin/framework/dbgcommands.py b/Pythonwin/pywin/framework/dbgcommands.py index e295926c7..f6aa38358 100644 --- a/Pythonwin/pywin/framework/dbgcommands.py +++ b/Pythonwin/pywin/framework/dbgcommands.py @@ -37,7 +37,7 @@ def HookCommands(self): if not methUpdate is None: frame.HookCommandUpdate(methUpdate, id) - for id in list(IdToBarNames.keys()): + for id in IdToBarNames: frame.HookCommand(self.OnDebuggerBar, id) frame.HookCommandUpdate(self.OnUpdateDebuggerBar, id) diff --git a/Pythonwin/pywin/framework/mdi_pychecker.py b/Pythonwin/pywin/framework/mdi_pychecker.py index 03e5e220f..cd31a9a18 100644 --- a/Pythonwin/pywin/framework/mdi_pychecker.py +++ b/Pythonwin/pywin/framework/mdi_pychecker.py @@ -112,9 +112,7 @@ def __init__(self, str, recurse=0): sd = sd.lower() if sd not in dirs: dirs[sd] = None - self.dirs = [] - for d in dirs.keys(): - self.dirs.append(d) + self.dirs = list(dirs) def __getitem__(self, key): return self.dirs[key] diff --git a/Pythonwin/pywin/framework/scriptutils.py b/Pythonwin/pywin/framework/scriptutils.py index 98c34b477..fe57113dd 100644 --- a/Pythonwin/pywin/framework/scriptutils.py +++ b/Pythonwin/pywin/framework/scriptutils.py @@ -440,7 +440,7 @@ def ImportFile(): # note that some packages (*cough* email *cough*) use "lazy importers" # meaning sys.modules can change as a side-effect of looking at # module.__file__ - so we must take a copy (ie, list(items())) - for key, mod in list(sys.modules.items()): + for key, mod in sys.modules.items(): if getattr(mod, "__file__", None): fname = mod.__file__ base, ext = os.path.splitext(fname) diff --git a/Pythonwin/pywin/framework/sgrepmdi.py b/Pythonwin/pywin/framework/sgrepmdi.py index 539fe6d12..f318f731f 100644 --- a/Pythonwin/pywin/framework/sgrepmdi.py +++ b/Pythonwin/pywin/framework/sgrepmdi.py @@ -94,9 +94,7 @@ def __init__(self, str, recurse=0): sd = sd.lower() if sd not in dirs: dirs[sd] = None - self.dirs = [] - for d in list(dirs.keys()): - self.dirs.append(d) + self.dirs = list(dirs) def __getitem__(self, key): return self.dirs[key] diff --git a/Pythonwin/pywin/mfc/dialog.py b/Pythonwin/pywin/mfc/dialog.py index 93a5ba650..4edb14123 100644 --- a/Pythonwin/pywin/mfc/dialog.py +++ b/Pythonwin/pywin/mfc/dialog.py @@ -83,13 +83,13 @@ def __setitem__(self, key, item): self._obj_.data[key] = item # self.UpdateData(0) def keys(self): - return list(self.data.keys()) + return self.data.keys() def items(self): - return list(self.data.items()) + return self.data.items() def values(self): - return list(self.data.values()) + return self.data.values() def __contains__(self, key): return key in self.data diff --git a/Pythonwin/pywin/scintilla/bindings.py b/Pythonwin/pywin/scintilla/bindings.py index 60001c749..e35be8a57 100644 --- a/Pythonwin/pywin/scintilla/bindings.py +++ b/Pythonwin/pywin/scintilla/bindings.py @@ -56,7 +56,7 @@ def prepare_configure(self): self.keymap = {} def complete_configure(self): - for id in command_to_events.keys(): + for id in command_to_events: self.parent_view.HookCommand(self._OnCommand, id) def close(self): diff --git a/Pythonwin/pywin/scintilla/config.py b/Pythonwin/pywin/scintilla/config.py index 6f5a6396f..e67368dfe 100644 --- a/Pythonwin/pywin/scintilla/config.py +++ b/Pythonwin/pywin/scintilla/config.py @@ -198,7 +198,7 @@ def configure(self, editor, subsections=None): ns = None if ns: num = 0 - for name, func in list(ns.items()): + for name, func in ns.items(): if isinstance(func, types.FunctionType) and name[:1] != "_": bindings.bind(name, func) num += 1 @@ -230,10 +230,8 @@ def get_key_binding(self, event, subsections=None): for subsection in subsections: map = self.key_to_events.get(subsection) if map is None: # Build it - map = {} keymap = subsection_keymap.get(subsection, {}) - for key_info, map_event in list(keymap.items()): - map[map_event] = key_info + map = {map_event: key_info for key_info, map_event in keymap.items()} self.key_to_events[subsection] = map info = map.get(event) diff --git a/Pythonwin/pywin/scintilla/configui.py b/Pythonwin/pywin/scintilla/configui.py index 9da2fbf75..c8e81257a 100644 --- a/Pythonwin/pywin/scintilla/configui.py +++ b/Pythonwin/pywin/scintilla/configui.py @@ -88,8 +88,7 @@ def OnInitDialog(self): self.butIsDefaultBackground = self.GetDlgItem(win32ui.IDC_CHECK2) self.listbox = self.GetDlgItem(win32ui.IDC_LIST1) self.HookCommand(self.OnListCommand, win32ui.IDC_LIST1) - names = list(self.styles.keys()) - names.sort() + names = sorted(self.styles) for name in names: if self.styles[name].aliased is None: self.listbox.AddString(name) diff --git a/Pythonwin/pywin/scintilla/formatter.py b/Pythonwin/pywin/scintilla/formatter.py index 6e3459dcc..cff9ee60e 100644 --- a/Pythonwin/pywin/scintilla/formatter.py +++ b/Pythonwin/pywin/scintilla/formatter.py @@ -185,7 +185,7 @@ def ApplyFormattingStyles(self, bReload=1): defaultStyle = Style("default", baseFormat) defaultStyle.stylenum = scintillacon.STYLE_DEFAULT self._ReformatStyle(defaultStyle) - for style in list(self.styles.values()): + for style in self.styles.values(): if style.aliased is None: style.NormalizeAgainstDefault(baseFormat) self._ReformatStyle(style) @@ -202,7 +202,7 @@ def LoadPreferences(self): ) self.bUseFixed = int(self.LoadPreference("Use Fixed", 1)) - for style in list(self.styles.values()): + for style in self.styles.values(): new = self.LoadPreference(style.name, str(style.format)) try: style.format = eval(new) @@ -222,7 +222,7 @@ def SavePreferences(self): self.SavePreference("Base Format Fixed", str(self.baseFormatFixed)) self.SavePreference("Base Format Proportional", str(self.baseFormatProp)) self.SavePreference("Use Fixed", self.bUseFixed) - for style in list(self.styles.values()): + for style in self.styles.values(): if style.aliased is None: self.SavePreference(style.name, str(style.format)) bg_name = style.name + " background" diff --git a/Pythonwin/pywin/scintilla/view.py b/Pythonwin/pywin/scintilla/view.py index e94148750..1cbc26e0d 100644 --- a/Pythonwin/pywin/scintilla/view.py +++ b/Pythonwin/pywin/scintilla/view.py @@ -517,10 +517,14 @@ def list2dict(l): ) ) - # ensure all keys are strings. - items = [str(k) for k in items_dict.keys()] - # All names that start with "_" go! - items = [k for k in items if not k.startswith("_")] + items = [ + k + for k in + # ensure all keys are strings. + map(str, items_dict) + # All names that start with "_" go! + if not k.startswith("_") + ] if not items: # Heuristics a-la AutoExpand @@ -550,9 +554,7 @@ def list2dict(l): if curclass and left == "self": self._UpdateWithClassMethods(unique, curclass) - items = [ - word for word in unique.keys() if word[:2] != "__" or word[-2:] != "__" - ] + items = [word for word in unique if word[:2] != "__" or word[-2:] != "__"] # Ignore the word currently to the right of the dot - probably a red-herring. try: items.remove(right[1:]) diff --git a/Pythonwin/pywin/tools/browser.py b/Pythonwin/pywin/tools/browser.py index b0fd7cab1..6a301c3de 100644 --- a/Pythonwin/pywin/tools/browser.py +++ b/Pythonwin/pywin/tools/browser.py @@ -110,7 +110,7 @@ def CalculateIsExpandable(self): if hasattr(self.myobject, "__doc__"): return 1 try: - for key in self.myobject.__dict__.keys(): + for key in self.myobject.__dict__: if key not in special_names: return 1 except (AttributeError, TypeError): @@ -288,12 +288,7 @@ def IsExpandable(self): return len(self.myobject) > 0 def GetSubList(self): - ret = [] - keys = list(self.myobject.keys()) - keys.sort() - for key in keys: - ob = self.myobject[key] - ret.append(MakeHLI(ob, str(key))) + ret = [MakeHLI(self.myobject[key], str(key)) for key in sorted(self.myobject)] self.InsertDocString(ret) return ret diff --git a/com/win32com/client/__init__.py b/com/win32com/client/__init__.py index c0b1a8761..055b7c9cf 100644 --- a/com/win32com/client/__init__.py +++ b/com/win32com/client/__init__.py @@ -7,6 +7,7 @@ # with dynamic.Dispatch behaviour, where dynamic objects are always used. import sys +from itertools import chain import pythoncom import pywintypes @@ -510,17 +511,18 @@ def __init__(self, oobj=None): self.__dict__["_oleobj_"] = oobj # so we don't call __setattr__ def __dir__(self): - lst = ( - list(self.__dict__.keys()) - + dir(self.__class__) - + list(self._prop_map_get_.keys()) - + list(self._prop_map_put_.keys()) + attributes = chain( + self.__dict__, + dir(self.__class__), + self._prop_map_get_, + self._prop_map_put_, ) + try: - lst += [p.Name for p in self.Properties_] + attributes = chain(attributes, [p.Name for p in self.Properties_]) except AttributeError: pass - return list(set(lst)) + return list(set(attributes)) # Provide a prettier name than the CLSID def __repr__(self): diff --git a/com/win32com/client/build.py b/com/win32com/client/build.py index b75f21821..4f0730e28 100644 --- a/com/win32com/client/build.py +++ b/com/win32com/client/build.py @@ -18,6 +18,7 @@ import datetime import string +from itertools import chain from keyword import iskeyword import pythoncom @@ -493,18 +494,20 @@ def Build(self, typeinfo, attr, bForUser=1): DispatchItem.Build(self, typeinfo, attr, bForUser) assert typeinfo is not None, "Can't build vtables without type info!" - meth_list = ( - list(self.mapFuncs.values()) - + list(self.propMapGet.values()) - + list(self.propMapPut.values()) + meth_list = sorted( + chain( + self.mapFuncs.values(), + self.propMapGet.values(), + self.propMapPut.values(), + ), + key=lambda m: m.desc[7], ) - meth_list.sort(key=lambda m: m.desc[7]) # Now turn this list into the run-time representation # (ready for immediate use or writing to gencache) - self.vtableFuncs = [] - for entry in meth_list: - self.vtableFuncs.append((entry.names, entry.dispid, entry.desc)) + self.vtableFuncs = [ + (entry.names, entry.dispid, entry.desc) for entry in meth_list + ] # A Lazy dispatch item - builds an item on request using info from diff --git a/com/win32com/client/dynamic.py b/com/win32com/client/dynamic.py index ffe7e9e26..7a269d514 100644 --- a/com/win32com/client/dynamic.py +++ b/com/win32com/client/dynamic.py @@ -17,6 +17,7 @@ """ import traceback +from itertools import chain from types import MethodType import pythoncom # Needed as code we eval() references it. @@ -233,19 +234,19 @@ def __str__(self): return self.__repr__() def __dir__(self): - lst = list(self.__dict__.keys()) + dir(self.__class__) + self._dir_ole_() + attributes = chain(self.__dict__, dir(self.__class__), self._dir_ole_()) try: - lst += [p.Name for p in self.Properties_] + attributes = chain(attributes, [p.Name for p in self.Properties_]) except AttributeError: pass - return list(set(lst)) + return list(set(attributes)) def _dir_ole_(self): items_dict = {} for iTI in range(0, self._oleobj_.GetTypeInfoCount()): typeInfo = self._oleobj_.GetTypeInfo(iTI) self._UpdateWithITypeInfo_(items_dict, typeInfo) - return list(items_dict.keys()) + return list(items_dict) def _UpdateWithITypeInfo_(self, items_dict, typeInfo): typeInfos = [typeInfo] @@ -455,7 +456,7 @@ def _print_details_(self): print("AxDispatch container", self._username_) try: print("Methods:") - for method in self._olerepr_.mapFuncs.keys(): + for method in self._olerepr_.mapFuncs: print("\t", method) print("Props:") for prop, entry in self._olerepr_.propMap.items(): diff --git a/com/win32com/client/gencache.py b/com/win32com/client/gencache.py index 385478561..e64449b8b 100644 --- a/com/win32com/client/gencache.py +++ b/com/win32com/client/gencache.py @@ -420,7 +420,7 @@ def ForgetAboutTypelibInterface(typelib_ob): ) ) # and drop any version redirects to it - for key, val in list(versionRedirectMap.items()): + for key, val in versionRedirectMap.items(): if val == info: del versionRedirectMap[key] @@ -660,7 +660,7 @@ def AddModuleToCache( def SetTypelibForAllClsids(dict): nonlocal dict_modified - for clsid, cls in dict.items(): + for clsid in dict: if clsidToTypelib.get(clsid) != info: clsidToTypelib[clsid] = info dict_modified = True @@ -685,7 +685,7 @@ def GetGeneratedInfos(): zip_file = win32com.__gen_path__[: zip_pos + 4] zip_path = win32com.__gen_path__[zip_pos + 5 :].replace("\\", "/") zf = zipfile.ZipFile(zip_file) - infos = {} + infos = set() for n in zf.namelist(): if not n.startswith(zip_path): continue @@ -701,9 +701,9 @@ def GetGeneratedInfos(): except pywintypes.com_error: # invalid IID continue - infos[(iid, lcid, major, minor)] = 1 + infos.add((iid, lcid, major, minor)) zf.close() - return list(infos.keys()) + return list(infos) else: # on the file system files = glob.glob(win32com.__gen_path__ + "\\*") @@ -760,10 +760,8 @@ def Rebuild(verbose=1): def _Dump(): print("Cache is in directory", win32com.__gen_path__) # Build a unique dir - d = {} - for clsid, (typelibCLSID, lcid, major, minor) in clsidToTypelib.items(): - d[typelibCLSID, lcid, major, minor] = None - for typelibCLSID, lcid, major, minor in d.keys(): + d = set(clsidToTypelib.values()) + for typelibCLSID, lcid, major, minor in d: mod = GetModuleForTypelib(typelibCLSID, lcid, major, minor) print(f"{mod.__doc__} - {typelibCLSID}") diff --git a/com/win32com/client/genpy.py b/com/win32com/client/genpy.py index 6c3e7dc7f..b11d3b85b 100644 --- a/com/win32com/client/genpy.py +++ b/com/win32com/client/genpy.py @@ -16,6 +16,7 @@ import os import sys import time +from itertools import chain import pythoncom import win32com @@ -90,14 +91,14 @@ def MakeEventMethodName(eventName): def WriteSinkEventMap(obj, stream): print("\t_dispid_to_func_ = {", file=stream) - for name, entry in ( - list(obj.propMapGet.items()) - + list(obj.propMapPut.items()) - + list(obj.mapFuncs.items()) + for entry in chain( + obj.propMapGet.values(), + obj.propMapPut.values(), + obj.mapFuncs.values(), ): - fdesc = entry.desc + memid = entry.desc.memid print( - '\t\t%9d : "%s",' % (fdesc.memid, MakeEventMethodName(entry.names[0])), + '\t\t%9d : "%s",' % (memid, MakeEventMethodName(entry.names[0])), file=stream, ) print("\t\t}", file=stream) @@ -215,9 +216,7 @@ def WriteEnumerationItems(self, stream): num = 0 enumName = self.doc[0] # Write in name alpha order - names = list(self.mapVars.keys()) - names.sort() - for name in names: + for name in sorted(self.mapVars): entry = self.mapVars[name] vdesc = entry.desc if vdesc[4] == pythoncom.VAR_CONST: @@ -419,10 +418,8 @@ def WriteCallbackClassBody(self, generator): "\t# If you create handlers, they should have the following prototypes:", file=stream, ) - for name, entry in ( - list(self.propMapGet.items()) - + list(self.propMapPut.items()) - + list(self.mapFuncs.items()) + for entry in chain( + self.propMapGet.values(), self.propMapPut.values(), self.mapFuncs.values() ): fdesc = entry.desc methName = MakeEventMethodName(entry.names[0]) @@ -449,17 +446,14 @@ def WriteCallbackClassBody(self, generator): def WriteClassBody(self, generator): stream = generator.file - # Write in alpha order. - names = list(self.mapFuncs.keys()) - names.sort() specialItems = { "count": None, "item": None, "value": None, "_newenum": None, } # If found, will end up with (entry, invoke_tupe) - itemCount = None - for name in names: + # Write in alpha order. + for name in sorted(self.mapFuncs): entry = self.mapFuncs[name] assert entry.desc.desckind == pythoncom.DESCKIND_FUNCDESC # skip [restricted] methods, unless it is the @@ -498,9 +492,7 @@ def WriteClassBody(self, generator): for line in ret: print(line, file=stream) print("\t_prop_map_get_ = {", file=stream) - names = list(self.propMap.keys()) - names.sort() - for key in names: + for key in sorted(self.propMap): entry = self.propMap[key] if generator.bBuildHidden or not entry.hidden: resultName = entry.GetResultName() @@ -545,9 +537,7 @@ def WriteClassBody(self, generator): f'\t\t"{build.MakePublicAttributeName(key)}": {mapEntry},', file=stream, ) - names = list(self.propMapGet.keys()) - names.sort() - for key in names: + for key in sorted(self.propMapGet): entry = self.propMapGet[key] if generator.bBuildHidden or not entry.hidden: if entry.GetResultName(): @@ -597,9 +587,7 @@ def WriteClassBody(self, generator): print("\t_prop_map_put_ = {", file=stream) # These are "Invoke" args - names = list(self.propMap.keys()) - names.sort() - for key in names: + for key in sorted(self.propMap): entry = self.propMap[key] if generator.bBuildHidden or not entry.hidden: lkey = key.lower() @@ -621,9 +609,7 @@ def WriteClassBody(self, generator): file=stream, ) - names = list(self.propMapPut.keys()) - names.sort() - for key in names: + for key in sorted(self.propMapPut): entry = self.propMapPut[key] if generator.bBuildHidden or not entry.hidden: details = entry.desc @@ -1160,10 +1146,8 @@ def do_generate(self): # Generate the constants and their support. if enumItems: print("class constants:", file=stream) - items = list(enumItems.values()) - items.sort() num_written = 0 - for oleitem in items: + for oleitem in sorted(enumItems.values()): num_written += oleitem.WriteEnumerationItems(stream) self.progress.Tick() if not num_written: @@ -1171,15 +1155,11 @@ def do_generate(self): print(file=stream) if self.generate_type == GEN_FULL: - items = [l for l in oleItems.values() if l is not None] - items.sort() - for oleitem in items: + for oleitem in sorted(filter(None, oleItems.values())): self.progress.Tick() oleitem.WriteClass(self) - items = list(vtableItems.values()) - items.sort() - for oleitem in items: + for oleitem in sorted(vtableItems.values()): self.progress.Tick() oleitem.WriteClass(self) else: diff --git a/com/win32com/demos/dump_clipboard.py b/com/win32com/demos/dump_clipboard.py index 534d540a0..4b7d51e96 100644 --- a/com/win32com/demos/dump_clipboard.py +++ b/com/win32com/demos/dump_clipboard.py @@ -11,7 +11,7 @@ val = getattr(win32con, f) format_name_map[val] = f -tymeds = [attr for attr in pythoncom.__dict__.keys() if attr.startswith("TYMED_")] +tymeds = [attr for attr in pythoncom.__dict__ if attr.startswith("TYMED_")] def DumpClipboard(): diff --git a/com/win32com/makegw/makegwparse.py b/com/win32com/makegw/makegwparse.py index 1a2a63c70..89a574608 100644 --- a/com/win32com/makegw/makegwparse.py +++ b/com/win32com/makegw/makegwparse.py @@ -771,12 +771,10 @@ def _GetPythonTypeDesc(self): "const PUITEMID_CHILD": (ArgFormatterIDLIST, 0), "PCUITEMID_CHILD_ARRAY": (ArgFormatterIDLIST, 2), "const PCUITEMID_CHILD_ARRAY": (ArgFormatterIDLIST, 2), + # Auto-add all the simple types + **{key: (ArgFormatterSimple, 0) for key in ConvertSimpleTypes}, } -# Auto-add all the simple types -for key in ConvertSimpleTypes.keys(): - AllConverters[key] = ArgFormatterSimple, 0 - def make_arg_converter(arg): try: diff --git a/com/win32com/server/policy.py b/com/win32com/server/policy.py index fde608d13..a907bd620 100644 --- a/com/win32com/server/policy.py +++ b/com/win32com/server/policy.py @@ -385,10 +385,8 @@ def _GetNextDispID_(self, fdex, dispid): return self._getnextdispid_(fdex, dispid) def _getnextdispid_(self, fdex, dispid): - ids = list(self._name_to_dispid_.values()) + ids = [id for id in self._name_to_dispid_.values() if id != DISPID_STARTENUM] ids.sort() - if DISPID_STARTENUM in ids: - ids.remove(DISPID_STARTENUM) if dispid == DISPID_STARTENUM: return ids[0] else: diff --git a/com/win32com/servers/dictionary.py b/com/win32com/servers/dictionary.py index 12cd3be5b..f8a7eb249 100644 --- a/com/win32com/servers/dictionary.py +++ b/com/win32com/servers/dictionary.py @@ -110,7 +110,7 @@ def _invokeex_(self, dispid, lcid, wFlags, args, kwargs, serviceProvider): return len(self._obj_) if dispid == pythoncom.DISPID_NEWENUM: - return util.NewEnum(list(self._obj_.keys())) + return util.NewEnum(list(self._obj_)) raise COMException(scode=winerror.DISP_E_MEMBERNOTFOUND) diff --git a/com/win32com/test/testDictionary.py b/com/win32com/test/testDictionary.py index 3e6691332..020efb606 100644 --- a/com/win32com/test/testDictionary.py +++ b/com/win32com/test/testDictionary.py @@ -17,7 +17,7 @@ def MakeTestDictionary(): def TestDictAgainst(dict, check): - for key, value in list(check.items()): + for key, value in check.items(): assert ( dict(key) == value ), f"Indexing for '{key!r}' gave the incorrect value - {dict[key]!r}/{check[key]!r}" diff --git a/com/win32com/test/testIterators.py b/com/win32com/test/testIterators.py index 260cce673..2b2248edf 100644 --- a/com/win32com/test/testIterators.py +++ b/com/win32com/test/testIterators.py @@ -126,7 +126,7 @@ def tearDown(self): def suite(): # We don't want our base class run suite = unittest.TestSuite() - for item in list(globals().values()): + for item in globals().values(): if ( isinstance(item, type) and issubclass(item, unittest.TestCase) diff --git a/com/win32com/test/testmakepy.py b/com/win32com/test/testmakepy.py index 633758649..eafe99555 100644 --- a/com/win32com/test/testmakepy.py +++ b/com/win32com/test/testmakepy.py @@ -40,7 +40,7 @@ def TestBuildAll(verbose=1): # interface manually tinfo = (info.clsid, info.lcid, info.major, info.minor) mod = gencache.EnsureModule(info.clsid, info.lcid, info.major, info.minor) - for name in mod.NamesToIIDMap.keys(): + for name in mod.NamesToIIDMap: makepy.GenerateChildFromTypeLibSpec(name, tinfo) return num diff --git a/com/win32com/universal.py b/com/win32com/universal.py index 1063680d2..c79d7d80a 100644 --- a/com/win32com/universal.py +++ b/com/win32com/universal.py @@ -58,9 +58,7 @@ def RegisterInterfaces(typelibGUID, lcid, major, minor, interface_names=None): ret.append((dispid, invkind, names[0])) else: # Cool - can used cached info. - if not interface_names: - interface_names = list(mod.VTablesToClassMap.values()) - for name in interface_names: + for name in interface_names or mod.VTablesToClassMap.values(): try: iid = mod.NamesToIIDMap[name] except KeyError: diff --git a/com/win32comext/axdebug/debugger.py b/com/win32comext/axdebug/debugger.py index c0b1089f1..d0585b9b6 100644 --- a/com/win32comext/axdebug/debugger.py +++ b/com/win32comext/axdebug/debugger.py @@ -64,7 +64,7 @@ def BuildModule(module, built_nodes, rootNode, create_node_fn, create_node_args) def RefreshAllModules(builtItems, rootNode, create_node, create_node_args): - for module in list(sys.modules.values()): + for module in sys.modules.values(): BuildModule(module, builtItems, rootNode, create_node, create_node_args) @@ -85,7 +85,7 @@ def FromFileName(self, fname): # if self.currentNumModules != len(sys.modules): # self.axdebugger.RefreshAllModules(self.nodes, self) # self.currentNumModules = len(sys.modules) - # for key in self.ccsAndNodes.keys(): + # for key in self.ccsAndNodes: # print("File:", key) return documents.CodeContainerProvider.FromFileName(self, fname) diff --git a/com/win32comext/axdebug/expressions.py b/com/win32comext/axdebug/expressions.py index d741e45a4..401b9a599 100644 --- a/com/win32comext/axdebug/expressions.py +++ b/com/win32comext/axdebug/expressions.py @@ -90,10 +90,10 @@ def GetResultAsDebugProperty(self): def MakeEnumDebugProperty(object, dwFieldSpec, nRadix, iid, stackFrame=None): name_vals = [] if hasattr(object, "items") and hasattr(object, "keys"): # If it is a dict. - name_vals = iter(object.items()) + name_vals = object.items() dictionary = object elif hasattr(object, "__dict__"): # object with dictionary, module - name_vals = iter(object.__dict__.items()) + name_vals = object.__dict__.items() dictionary = object.__dict__ infos = [] for name, val in name_vals: diff --git a/com/win32comext/axscript/client/framework.py b/com/win32comext/axscript/client/framework.py index eada9097c..b9f0fd605 100644 --- a/com/win32comext/axscript/client/framework.py +++ b/com/win32comext/axscript/client/framework.py @@ -987,7 +987,7 @@ def ResetNamedItems(self): # Due to the way we work, we re-create persistent ones. existing = self.subItems self.subItems = {} - for name, item in existing.items(): + for item in existing.values(): item.Close() if item.flags & axscript.SCRIPTITEM_ISPERSISTENT: self.AddNamedItem(item.name, item.flags) diff --git a/com/win32comext/axscript/client/pyscript.py b/com/win32comext/axscript/client/pyscript.py index 5bf46eb80..6b9ee53ab 100644 --- a/com/win32comext/axscript/client/pyscript.py +++ b/com/win32comext/axscript/client/pyscript.py @@ -359,7 +359,7 @@ def DoProcessScriptItemEvent(self, item, event, lcid, wFlags, args): except KeyError: # Not there _exactly_ - do case ins search. funcNameLook = funcName.lower() - for attr in self.globalNameSpaceModule.__dict__.keys(): + for attr in self.globalNameSpaceModule.__dict__: if funcNameLook == attr.lower(): function = self.globalNameSpaceModule.__dict__[attr] # cache back in scriptlets, to avoid this overhead next time diff --git a/com/win32comext/axscript/server/axsite.py b/com/win32comext/axscript/server/axsite.py index f90778939..359ea5e0f 100644 --- a/com/win32comext/axscript/server/axsite.py +++ b/com/win32comext/axscript/server/axsite.py @@ -99,7 +99,7 @@ def AddEngine(self, engine): | axscript.SCRIPTITEM_GLOBALMEMBERS | axscript.SCRIPTITEM_ISPERSISTENT ) - for name in self.objModel.keys(): + for name in self.objModel: newEngine.AddNamedItem(name, flags) newEngine.SetScriptState(axscript.SCRIPTSTATE_INITIALIZED) return newEngine diff --git a/com/win32comext/shell/demos/IFileOperationProgressSink.py b/com/win32comext/shell/demos/IFileOperationProgressSink.py index 9c73f544a..e7665d041 100644 --- a/com/win32comext/shell/demos/IFileOperationProgressSink.py +++ b/com/win32comext/shell/demos/IFileOperationProgressSink.py @@ -5,7 +5,7 @@ from win32com.server.policy import DesignatedWrapPolicy from win32com.shell import shell, shellcon -tsf_flags = [(k, v) for k, v in list(shellcon.__dict__.items()) if k.startswith("TSF_")] +tsf_flags = [(k, v) for k, v in shellcon.__dict__.items() if k.startswith("TSF_")] def decode_flags(flags): diff --git a/com/win32comext/shell/demos/ITransferAdviseSink.py b/com/win32comext/shell/demos/ITransferAdviseSink.py index a0a696e2f..8aed09e7c 100644 --- a/com/win32comext/shell/demos/ITransferAdviseSink.py +++ b/com/win32comext/shell/demos/ITransferAdviseSink.py @@ -4,12 +4,14 @@ from win32com.server.policy import DesignatedWrapPolicy from win32com.shell import shell, shellcon -tsf_flags = [(k, v) for k, v in list(shellcon.__dict__.items()) if k.startswith("TSF_")] - +tsf_flags = [] TRANSFER_ADVISE_STATES = {} -for k, v in list(shellcon.__dict__.items()): + +for k, v in shellcon.__dict__.items(): if k.startswith("TS_"): TRANSFER_ADVISE_STATES[v] = k + elif k.startswith("TSF_"): + tsf_flags.append((k, v)) def decode_flags(flags): diff --git a/com/win32comext/shell/demos/servers/shell_view.py b/com/win32comext/shell/demos/servers/shell_view.py index abd56bd57..cac0e19ad 100644 --- a/com/win32comext/shell/demos/servers/shell_view.py +++ b/com/win32comext/shell/demos/servers/shell_view.py @@ -260,7 +260,7 @@ def __init__(self, path): def EnumObjects(self, hwndOwner, flags): objects = get_clbr_for_file(self.path) pidls = [] - for name, ob in objects.items(): + for name in objects: pidls.append(["object\0" + self.path + "\0" + name]) return NewEnum(pidls, iid=shell.IID_IEnumIDList, useDispatcher=(debug > 0)) @@ -325,7 +325,7 @@ def EnumObjects(self, hwndOwner, flags): mod_objects = get_clbr_for_file(self.path) my_objects = mod_objects[self.class_name] pidls = [] - for func_name, lineno in my_objects.methods.items(): + for func_name in my_objects.methods: pidl = ["object\0" + self.path + "\0" + self.class_name + "." + func_name] pidls.append(pidl) return NewEnum(pidls, iid=shell.IID_IEnumIDList, useDispatcher=(debug > 0)) diff --git a/isapi/install.py b/isapi/install.py index 61462f4f6..8429f41ef 100644 --- a/isapi/install.py +++ b/isapi/install.py @@ -10,6 +10,7 @@ import stat import sys import traceback +from collections.abc import Mapping import pythoncom import win32api @@ -687,15 +688,12 @@ def UninstallModule(conf_module_name, params, options, log=lambda *args: None): } -def build_usage(handler_map): - docstrings = [handler.__doc__ for handler in handler_map.values()] - all_args = dict(zip(iter(handler_map.keys()), docstrings)) - arg_names = "|".join(iter(all_args.keys())) - usage_string = "%prog [options] [" + arg_names + "]\n" - usage_string += "commands:\n" - for arg, desc in all_args.items(): - usage_string += " %-10s: %s" % (arg, desc) + "\n" - return usage_string[:-1] +def build_usage(handler_map: Mapping[str, object]) -> str: + arg_names = "|".join(handler_map) + lines = [ + " %-10s: %s" % (arg, handler.__doc__) for arg, handler in handler_map.items() + ] + return f"%prog [options] [{arg_names}]\ncommands:\n" + "\n".join(lines) def MergeStandardOptions(options, params): diff --git a/win32/Demos/GetSaveFileName.py b/win32/Demos/GetSaveFileName.py index 285875052..bff34dcdd 100644 --- a/win32/Demos/GetSaveFileName.py +++ b/win32/Demos/GetSaveFileName.py @@ -20,7 +20,7 @@ print("save file names:", repr(fname)) print("filter used:", repr(customfilter)) print("Flags:", flags) -for k, v in list(win32con.__dict__.items()): +for k, v in win32con.__dict__.items(): if k.startswith("OFN_") and flags & v: print("\t" + k) @@ -38,6 +38,6 @@ print("open file names:", repr(fname)) print("filter used:", repr(customfilter)) print("Flags:", flags) -for k, v in list(win32con.__dict__.items()): +for k, v in win32con.__dict__.items(): if k.startswith("OFN_") and flags & v: print("\t" + k) diff --git a/win32/Demos/rastest.py b/win32/Demos/rastest.py index 9b2374787..4b6d1b289 100644 --- a/win32/Demos/rastest.py +++ b/win32/Demos/rastest.py @@ -4,18 +4,16 @@ import os import sys +import win32event import win32ras # Build a little dictionary of RAS states to decent strings. # eg win32ras.RASCS_OpenPort -> "OpenPort" -stateMap = {} -for name, val in list(win32ras.__dict__.items()): - if name[:6] == "RASCS_": - stateMap[val] = name[6:] +stateMap = { + val: name[6:] for name, val in win32ras.__dict__.items() if name[:6] == "RASCS_" +} # Use a lock so the callback can tell the main thread when it is finished. -import win32event - callbackEvent = win32event.CreateEvent(None, 0, 0, None) diff --git a/win32/Demos/security/sspi/fetch_url.py b/win32/Demos/security/sspi/fetch_url.py index d6addf9ee..cd9995487 100644 --- a/win32/Demos/security/sspi/fetch_url.py +++ b/win32/Demos/security/sspi/fetch_url.py @@ -36,7 +36,7 @@ def open_url(host, url): print("After redirect response is", resp.status, resp.reason) if options.show_headers: print("Initial response headers:") - for name, val in list(resp.msg.items()): + for name, val in resp.msg.items(): print(f" {name}: {val}") if options.show_body: print(body) @@ -60,7 +60,7 @@ def open_url(host, url): resp = h.getresponse() if options.show_headers: print("Token dance headers:") - for name, val in list(resp.msg.items()): + for name, val in resp.msg.items(): print(f" {name}: {val}") if err == 0: @@ -107,7 +107,7 @@ def open_url(host, url): print("Second fetch response is", resp.status, resp.reason) if options.show_headers: print("Second response headers:") - for name, val in list(resp.msg.items()): + for name, val in resp.msg.items(): print(f" {name}: {val}") resp.read(int(resp.msg.get("content-length", 0))) diff --git a/win32/Demos/security/sspi/simple_auth.py b/win32/Demos/security/sspi/simple_auth.py index 2721ca780..552e9dc59 100644 --- a/win32/Demos/security/sspi/simple_auth.py +++ b/win32/Demos/security/sspi/simple_auth.py @@ -9,7 +9,7 @@ def lookup_ret_code(err): - for k, v in list(sspicon.__dict__.items()): + for k, v in sspicon.__dict__.items(): if k[0:6] in ("SEC_I_", "SEC_E_") and v == err: return k diff --git a/win32/Demos/win32clipboardDemo.py b/win32/Demos/win32clipboardDemo.py index 094c0c852..564233f68 100644 --- a/win32/Demos/win32clipboardDemo.py +++ b/win32/Demos/win32clipboardDemo.py @@ -8,11 +8,12 @@ print("WARNING: The test code in this module uses assert") print("This instance of Python has asserts disabled, so many tests will be skipped") -cf_names = {} # Build map of CF_* constants to names. -for name, val in list(win32con.__dict__.items()): - if name[:3] == "CF_" and name != "CF_SCREENFONTS": # CF_SCREEN_FONTS==CF_TEXT!?!? - cf_names[val] = name +cf_names = { + val: name + for name, val in win32con.__dict__.items() + if name[:3] == "CF_" and name != "CF_SCREENFONTS" # CF_SCREEN_FONTS==CF_TEXT!?!? +} def TestEmptyClipboard(): diff --git a/win32/Demos/win32console_demo.py b/win32/Demos/win32console_demo.py index bb9162bff..7153e54c0 100644 --- a/win32/Demos/win32console_demo.py +++ b/win32/Demos/win32console_demo.py @@ -3,10 +3,7 @@ import win32con import win32console -virtual_keys = {} -for k, v in list(win32con.__dict__.items()): - if k.startswith("VK_"): - virtual_keys[v] = k +virtual_keys = {k: v for k, v in win32con.__dict__.items() if k.startswith("VK_")} free_console = True try: diff --git a/win32/Demos/win32netdemo.py b/win32/Demos/win32netdemo.py index ac5f305db..6c0a55776 100644 --- a/win32/Demos/win32netdemo.py +++ b/win32/Demos/win32netdemo.py @@ -184,7 +184,7 @@ def GetInfo(userName=None): userName = win32api.GetUserName() print("Dumping level 3 information about user") info = win32net.NetUserGetInfo(server, userName, 3) - for key, val in list(info.items()): + for key, val in info.items(): verbose(f"{key}={val}") @@ -228,10 +228,7 @@ def usage(tests): def main(): - tests = [] - for ob in list(globals().values()): - if isinstance(ob, Callable) and ob.__doc__: - tests.append(ob) + tests = [ob for ob in globals().values() if isinstance(ob, Callable) and ob.__doc__] opts, args = getopt.getopt(sys.argv[1:], "s:hvc") create_user = False for opt, val in opts: diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py index d5605a511..07b30284f 100644 --- a/win32/Lib/win32timezone.py +++ b/win32/Lib/win32timezone.py @@ -575,12 +575,14 @@ def _LoadDynamicInfoFromKey(self, key): return del info["FirstEntry"] del info["LastEntry"] - years = map(int, list(info.keys())) - values = map(TimeZoneDefinition, list(info.values())) + + infos = [ + (int(year), TimeZoneDefinition(values)) for year, values in info.items() + ] # create a range mapping that searches by descending year and matches # if the target year is greater or equal. self.dynamicInfo = RangeMap( - zip(years, values), + infos, sort_params={"reverse": True}, key_match_comparator=operator.ge, ) @@ -971,7 +973,7 @@ def __init__(self, source, sort_params={}, key_match_comparator=operator.le): self.match = key_match_comparator def __getitem__(self, item): - sorted_keys = sorted(self.keys(), **self.sort_params) + sorted_keys = sorted(self, **self.sort_params) if isinstance(item, RangeMap.Item): result = self.__getitem__(sorted_keys[item]) else: @@ -1002,7 +1004,7 @@ def is_match(k): raise KeyError(item) def bounds(self): - sorted_keys = sorted(self.keys(), **self.sort_params) + sorted_keys = sorted(self, **self.sort_params) return ( sorted_keys[RangeMap.first_item], sorted_keys[RangeMap.last_item], diff --git a/win32/Lib/win32verstamp.py b/win32/Lib/win32verstamp.py index 7b211303d..9bb321c19 100644 --- a/win32/Lib/win32verstamp.py +++ b/win32/Lib/win32verstamp.py @@ -168,7 +168,7 @@ def stamp(pathname, options): if is_debug is None: is_debug = os.path.splitext(pathname)[0].lower().endswith("_d") # convert None to blank strings - for k, v in list(sdata.items()): + for k, v in sdata.items(): if v is None: sdata[k] = "" vs = VS_VERSION_INFO(vmaj, vmin, vsub, vbuild, sdata, vdata, is_debug, is_dll) diff --git a/win32/test/test_win32api.py b/win32/test/test_win32api.py index 5218d519e..446315f54 100644 --- a/win32/test/test_win32api.py +++ b/win32/test/test_win32api.py @@ -262,7 +262,7 @@ def testGetSystemPowerStatus(self): "BatteryLifeTime", "BatteryFullLifeTime", ) - self.assertEqual(set(test_keys), set(sps.keys())) + self.assertEqual(set(test_keys), set(sps)) if __name__ == "__main__": diff --git a/win32/test/test_win32guistruct.py b/win32/test/test_win32guistruct.py index 2cea9d5fb..d09772c8c 100644 --- a/win32/test/test_win32guistruct.py +++ b/win32/test/test_win32guistruct.py @@ -13,10 +13,8 @@ def assertDictEquals(self, d, **kw): for n, v in kw.items(): self.assertEqual(v, d[n], f"'{n}' doesn't match: {v!r} != {d[n]!r}") checked[n] = True - checked_keys = list(checked.keys()) - passed_keys = list(kw.keys()) - checked_keys.sort() - passed_keys.sort() + checked_keys = sorted(checked) + passed_keys = sorted(kw) self.assertEqual(checked_keys, passed_keys) From 86f22c26d4685b4b4e1dda1c9c79290237fcd5f7 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 13:47:04 -0400 Subject: [PATCH 16/34] Use booleans directly instead of generating by literal comparisons (#2328) --- CHANGES.txt | 2 +- com/win32com/test/testPyComTest.py | 4 ++-- com/win32comext/mapi/mapiutil.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 08f963451..13d8b1da2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -177,7 +177,7 @@ as the .chm file, certain MAPI libraries etc, and .exe installers. * Removed redundant and obsolete references to older python unicode compatibility (#2085, @Avasam) * Use byte-string (`b""`) for constant bytes values instead of superfluous `.encode` calls (#2046, @Avasam) * Cleaned up unused imports (#1986, #2051, #1990, #2124, #2126, @Avasam) - * Removed duplicated declarations, constants and definitions (#2050 , #1950, #1990, @Avasam) + * Removed duplicated declarations, constants and definitions (#2050, #1950, #1990, @Avasam) * Small generalized optimization by using augmented assignements (in-place operators) where possible (#2274, @Avasam) * General speed and size improvements due to all the removed code. (#2046, #1986, #2050, #1950, #2085, #2087, #2051, #1990, #2106, #2127, #2124, #2126, #2177, #2218, #2202, #2205, #2217) diff --git a/com/win32com/test/testPyComTest.py b/com/win32com/test/testPyComTest.py index 4964d0a51..3d0a422db 100644 --- a/com/win32com/test/testPyComTest.py +++ b/com/win32com/test/testPyComTest.py @@ -250,9 +250,9 @@ def TestCommon(o, is_generated): ), f"Property value wrong - got {o.ULongProp} (expected {check})" TestApplyResult(o.Test, ("Unused", 99), 1) # A bool function TestApplyResult(o.Test, ("Unused", -1), 1) # A bool function - TestApplyResult(o.Test, ("Unused", 1 == 1), 1) # A bool function + TestApplyResult(o.Test, ("Unused", True), 1) # A bool function TestApplyResult(o.Test, ("Unused", 0), 0) - TestApplyResult(o.Test, ("Unused", 1 == 0), 0) + TestApplyResult(o.Test, ("Unused", False), 0) assert o.DoubleString("foo") == "foofoo" diff --git a/com/win32comext/mapi/mapiutil.py b/com/win32comext/mapi/mapiutil.py index 896a8b0d0..5ae387f2a 100644 --- a/com/win32comext/mapi/mapiutil.py +++ b/com/win32comext/mapi/mapiutil.py @@ -156,7 +156,7 @@ def SetPropertyValue(obj, prop, val): if not isinstance(prop, int): props = ((mapi.PS_PUBLIC_STRINGS, prop),) propIds = obj.GetIDsFromNames(props, mapi.MAPI_CREATE) - if val == (1 == 1) or val == (1 == 0): + if val == True or val == False: type_tag = mapitags.PT_BOOLEAN else: type_tag = _MapiTypeMap.get(type(val)) From 22b0c0afa2ed0d5f2a990ee737311211f4b21913 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 13:59:53 -0400 Subject: [PATCH 17/34] Re-vendor MAPI headers from microsoft/MapiStubLibrary (#2369) --- .github/workflows/main.yml | 4 +- .pre-commit-config.yaml | 3 +- .../LICENSE | 0 .../mapi/src/MAPIStubLibrary/README.md | 10 + .../src/MAPIStubLibrary/include/EMSABTAG.H | 1191 ++ .../include}/EdkGuid.h | 8 +- .../mapi/src/MAPIStubLibrary/include/EdkMdb.h | 2717 +++++ .../src/MAPIStubLibrary/include/ExchForm.h | 74 + .../MAPIStubLibrary/include/IMSCapabilities.h | 66 + .../src/MAPIStubLibrary/include/IMessage.h | 198 + .../include}/MAPI.h | 735 +- .../include}/MAPIAux.h | 470 +- .../include}/MAPICode.h | 436 +- .../include}/MAPIDbg.h | 985 +- .../include}/MAPIDefS.h | 5587 +++++----- .../include}/MAPIForm.h | 1275 +-- .../include}/MAPIGuid.h | 803 +- .../include}/MAPIHook.h | 166 +- .../include}/MAPINls.h | 394 +- .../include}/MAPIOID.h | 212 +- .../include}/MAPISPI.h | 1863 ++-- .../include}/MAPITags.h | 2109 ++-- .../include}/MAPIUtil.h | 1785 +-- .../include}/MAPIVal.h | 3943 ++++--- .../include}/MAPIWin.h | 552 +- .../include}/MAPIWz.h | 146 +- .../include}/MAPIX.h | 1092 +- .../include}/MSPST.h | 200 +- .../mapi/src/MAPIStubLibrary/include/abhelp.h | 116 + .../src/MAPIStubLibrary/include/actMgmt.h | 321 + .../src/MAPIStubLibrary/include/mimeole.h | 9637 +++++++++++++++++ .../library/mapiStubLibrary.cpp | 2752 +++++ .../src/MAPIStubLibrary/library/stubutils.cpp | 780 ++ .../src/MAPIStubLibrary/library/stubutils.h | 52 + .../src/{mapi_headers => }/extraMAPIDefs.h | 2 +- .../src/{mapi_headers => }/extraMAPIGuids.h | 0 .../mapi/src/mapi_headers/EdkMdb.h | 2400 ---- .../mapi/src/mapi_headers/README.md | 61 - .../src/mapi_stub_library/MapiStubLibrary.cpp | 1219 --- .../mapi/src/mapi_stub_library/StubUtils.cpp | 330 - setup.py | 12 +- 41 files changed, 29440 insertions(+), 15266 deletions(-) rename com/win32comext/mapi/src/{mapi_stub_library => MAPIStubLibrary}/LICENSE (100%) create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/README.md create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/EMSABTAG.H rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/EdkGuid.h (89%) create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/EdkMdb.h create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/ExchForm.h create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/IMSCapabilities.h create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/IMessage.h rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPI.h (95%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIAux.h (96%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPICode.h (94%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIDbg.h (96%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIDefS.h (92%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIForm.h (97%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIGuid.h (78%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIHook.h (96%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPINls.h (92%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIOID.h (95%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPISPI.h (97%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPITags.h (96%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIUtil.h (93%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIVal.h (97%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIWin.h (95%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIWz.h (96%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MAPIX.h (97%) rename com/win32comext/mapi/src/{mapi_headers => MAPIStubLibrary/include}/MSPST.h (97%) create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/abhelp.h create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/actMgmt.h create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/include/mimeole.h create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/library/mapiStubLibrary.cpp create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.cpp create mode 100644 com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.h rename com/win32comext/mapi/src/{mapi_headers => }/extraMAPIDefs.h (86%) rename com/win32comext/mapi/src/{mapi_headers => }/extraMAPIGuids.h (100%) delete mode 100644 com/win32comext/mapi/src/mapi_headers/EdkMdb.h delete mode 100644 com/win32comext/mapi/src/mapi_headers/README.md delete mode 100644 com/win32comext/mapi/src/mapi_stub_library/MapiStubLibrary.cpp delete mode 100644 com/win32comext/mapi/src/mapi_stub_library/StubUtils.cpp diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ccddac84..aa1049f06 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -123,9 +123,9 @@ jobs: - uses: psf/black@stable with: options: "--fast --check --diff --verbose" - - run: | # Too many files to fit in a single command, exclude vendored Scintilla and mapi_headers + - run: | # Too many files to fit in a single command, also exclude vendored Scintilla and MAPIStubLibrary clang-format --Werror --dry-run $(git ls-files '*.cpp') - clang-format --Werror --dry-run $(git ls-files '*.h' ':!:Pythonwin/Scintilla/' ':!:com/win32comext/mapi/src/mapi_headers/') + clang-format --Werror --dry-run $(git ls-files '*.h' ':!:Pythonwin/Scintilla/' ':!:com/win32comext/mapi/src/MAPIStubLibrary/') shell: powershell mypy: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72acb051e..a89a958b7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,9 +42,8 @@ repos: # https://github.com/pre-commit/mirrors-clang-format/blob/main/.pre-commit-hooks.yaml#L6 types: [c++] - # Vendored -exclude: ^(com/win32comext/mapi/src/mapi_headers/|Pythonwin/Scintilla/).*$ +exclude: ^(com/win32comext/mapi/src/MAPIStubLibrary/|Pythonwin/Scintilla/).*$ ci: autoupdate_schedule: quarterly diff --git a/com/win32comext/mapi/src/mapi_stub_library/LICENSE b/com/win32comext/mapi/src/MAPIStubLibrary/LICENSE similarity index 100% rename from com/win32comext/mapi/src/mapi_stub_library/LICENSE rename to com/win32comext/mapi/src/MAPIStubLibrary/LICENSE diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/README.md b/com/win32comext/mapi/src/MAPIStubLibrary/README.md new file mode 100644 index 000000000..2f43e5ed8 --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/README.md @@ -0,0 +1,10 @@ +# MAPIStubLibrary + +The MAPI Stub Library is a drop in replacement for mapi32.lib which supports building both 32 and 64 bit MAPI applications. This library eliminates the need to explicitly link to MAPI. + +**See the [documentation](https://msdn.microsoft.com/en-us/library/office/cc963763.aspx) for information on building the MAPI Stub Library and integrating it into your project.** +**See the [FAQ](https://mapistublibrary.codeplex.com/wikipage?title=FAQ) for questions about this library, such as when and why to use it.** + +--- + +These MAPI headers were downloaded from and enable us to build the MAPI extension. diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/EMSABTAG.H b/com/win32comext/mapi/src/MAPIStubLibrary/include/EMSABTAG.H new file mode 100644 index 000000000..3c268d88f --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/EMSABTAG.H @@ -0,0 +1,1191 @@ +/* +** --emsabtag.h--------------------------------------------------------------- +** +** Property tag definitions for standard properties of Exchange Address +** Book objects. +** +** Note: These proptags are only valid when talking directly to the +** Exchange Server Address Book. They are specifically NOT valid when +** trying to read properties from an object copied into another address +** book provider (the Personal Address Book, for example). +** +** Copyright (c) Microsoft Corp. 1986-1996. All rights reserved. +** --------------------------------------------------------------------------- +*/ + +#ifndef _EMSABTAG_H +#define _EMSABTAG_H + +/* +* Flags for ulInterfaceOptions on OpenProperty +*/ +#define AB_SHOW_PHANTOMS 2 +#define AB_SHOW_OTHERS 4 + +/* +* Flags for ulFlag on ResolveNames +*/ +#define EMS_AB_ADDRESS_LOOKUP 0x01 +// Other valid flags to EMS ABC_ResolveNames: +// #define MAPI_NO_CACHE ((ULONG) 0x00000200) +// #define MAPI_CACHE_ONLY ((ULONG) 0x00004000) +// #define MAPI_UNICODE ((ULONG) 0x80000000) + +/* +* Constructed, but externally visible. +*/ +#define PR_EMS_AB_SERVER PROP_TAG( PT_TSTRING, 0xFFFE) +#define PR_EMS_AB_SERVER_A PROP_TAG( PT_STRING8, 0xFFFE) +#define PR_EMS_AB_SERVER_W PROP_TAG( PT_UNICODE, 0xFFFE) +#define PR_EMS_AB_CONTAINERID PROP_TAG( PT_LONG, 0xFFFD) +#define PR_EMS_AB_DOS_ENTRYID PR_EMS_AB_CONTAINERID +#define PR_EMS_AB_PARENT_ENTRYID PROP_TAG( PT_BINARY, 0xFFFC) +#define PR_EMS_AB_IS_MASTER PROP_TAG(PT_BOOLEAN, 0xFFFB) +#define PR_EMS_AB_OBJECT_OID PROP_TAG(PT_BINARY, 0xFFFA) +#define PR_EMS_AB_HIERARCHY_PATH PROP_TAG(PT_TSTRING, 0xFFF9) +#define PR_EMS_AB_HIERARCHY_PATH_A PROP_TAG(PT_STRING8, 0xFFF9) +#define PR_EMS_AB_HIERARCHY_PATH_W PROP_TAG(PT_UNICODE, 0xFFF9) +#define PR_EMS_AB_CHILD_RDNS PROP_TAG(PT_MV_STRING8, 0xFFF8) + +#define MIN_EMS_AB_CONSTRUCTED_PROP_ID 0xFFF8 + +#define PR_EMS_AB_OTHER_RECIPS PROP_TAG(PT_OBJECT, 0xF000) + +/* + * Conference Room Picking + */ +#define PR_EMS_AB_ROOM_CAPACITY PROP_TAG(PT_LONG, 0x0807) +#define PR_EMS_AB_ROOM_DESCRIPTION PROP_TAG(PT_TSTRING, 0x0809) +#define PR_EMS_AB_ROOM_DESCRIPTION_A PROP_TAG(PT_STRING8, 0x0809) +#define PR_EMS_AB_ROOM_DESCRIPTION_W PROP_TAG(PT_UNICODE, 0x0809) + +/* + * Prop tags defined in the schema. + */ +#define PR_EMS_AB_DISPLAY_NAME_PRINTABLE PROP_TAG(PT_TSTRING, 0x39FF) +#define PR_EMS_AB_DISPLAY_NAME_PRINTABLE_A PROP_TAG(PT_STRING8, 0x39FF) +#define PR_EMS_AB_DISPLAY_NAME_PRINTABLE_W PROP_TAG(PT_UNICODE, 0x39FF) + +#define PR_EMS_AB_ACCESS_CATEGORY PROP_TAG( PT_LONG, 0x8044) +#define PR_EMS_AB_ACTIVATION_SCHEDULE PROP_TAG( PT_BINARY, 0x8045) +#define PR_EMS_AB_ACTIVATION_STYLE PROP_TAG( PT_LONG, 0x8046) +#define PR_EMS_AB_ADC_GLOBAL_NAMES PROP_TAG( PT_MV_TSTRING, 0x8C70) +#define PR_EMS_AB_ADC_GLOBAL_NAMES_A PROP_TAG( PT_MV_STRING8, 0x8C70) +#define PR_EMS_AB_ADC_GLOBAL_NAMES_W PROP_TAG( PT_MV_UNICODE, 0x8C70) +#define PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE PROP_TAG( PT_BINARY, 0x8017) +#define PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE_MSDOS PROP_TAG( PT_BINARY, 0x8047) +#define PR_EMS_AB_ADDRESS_SYNTAX PROP_TAG( PT_BINARY, 0x8018) +#define PR_EMS_AB_ADDRESS_TYPE PROP_TAG( PT_TSTRING, 0x8048) +#define PR_EMS_AB_ADDRESS_TYPE_A PROP_TAG( PT_STRING8, 0x8048) +#define PR_EMS_AB_ADDRESS_TYPE_W PROP_TAG( PT_UNICODE, 0x8048) +#define PR_EMS_AB_ADMD PROP_TAG( PT_TSTRING, 0x8049) +#define PR_EMS_AB_ADMD_A PROP_TAG( PT_STRING8, 0x8049) +#define PR_EMS_AB_ADMD_W PROP_TAG( PT_UNICODE, 0x8049) +#define PR_EMS_AB_ADMIN_DESCRIPTION PROP_TAG( PT_TSTRING, 0x804A) +#define PR_EMS_AB_ADMIN_DESCRIPTION_A PROP_TAG( PT_STRING8, 0x804A) +#define PR_EMS_AB_ADMIN_DESCRIPTION_W PROP_TAG( PT_UNICODE, 0x804A) +#define PR_EMS_AB_ADMIN_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x804B) +#define PR_EMS_AB_ADMIN_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x804B) +#define PR_EMS_AB_ADMIN_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x804B) +#define PR_EMS_AB_ADMIN_EXTENSION_DLL PROP_TAG( PT_TSTRING, 0x804C) +#define PR_EMS_AB_ADMIN_EXTENSION_DLL_A PROP_TAG( PT_STRING8, 0x804C) +#define PR_EMS_AB_ADMIN_EXTENSION_DLL_W PROP_TAG( PT_UNICODE, 0x804C) +#define PR_EMS_AB_ALIASED_OBJECT_NAME PROP_TAG( PT_TSTRING, 0x804D) +#define PR_EMS_AB_ALIASED_OBJECT_NAME_A PROP_TAG( PT_STRING8, 0x804D) +#define PR_EMS_AB_ALIASED_OBJECT_NAME_W PROP_TAG( PT_UNICODE, 0x804D) +#define PR_EMS_AB_ALIASED_OBJECT_NAME_O PROP_TAG( PT_OBJECT, 0x804D) +#define PR_EMS_AB_ALIASED_OBJECT_NAME_T PROP_TAG( PT_TSTRING, 0x804D) +#define PR_EMS_AB_ALT_RECIPIENT PROP_TAG( PT_TSTRING, 0x804E) +#define PR_EMS_AB_ALT_RECIPIENT_A PROP_TAG( PT_STRING8, 0x804E) +#define PR_EMS_AB_ALT_RECIPIENT_W PROP_TAG( PT_UNICODE, 0x804E) +#define PR_EMS_AB_ALT_RECIPIENT_O PROP_TAG( PT_OBJECT, 0x804E) +#define PR_EMS_AB_ALT_RECIPIENT_T PROP_TAG( PT_TSTRING, 0x804E) +#define PR_EMS_AB_ALT_RECIPIENT_BL PROP_TAG( PT_MV_TSTRING, 0x804F) +#define PR_EMS_AB_ALT_RECIPIENT_BL_A PROP_TAG( PT_MV_STRING8, 0x804F) +#define PR_EMS_AB_ALT_RECIPIENT_BL_W PROP_TAG( PT_MV_UNICODE, 0x804F) +#define PR_EMS_AB_ALT_RECIPIENT_BL_O PROP_TAG( PT_OBJECT, 0x804F) +#define PR_EMS_AB_ALT_RECIPIENT_BL_T PROP_TAG( PT_MV_TSTRING, 0x804F) +#define PR_EMS_AB_ANCESTOR_ID PROP_TAG( PT_BINARY, 0x8050) +#define PR_EMS_AB_ANONYMOUS_ACCESS PROP_TAG( PT_BOOLEAN, 0x8187) +#define PR_EMS_AB_ANONYMOUS_ACCOUNT PROP_TAG( PT_TSTRING, 0x8C26) +#define PR_EMS_AB_ANONYMOUS_ACCOUNT_A PROP_TAG( PT_STRING8, 0x8C26) +#define PR_EMS_AB_ANONYMOUS_ACCOUNT_W PROP_TAG( PT_UNICODE, 0x8C26) +#define PR_EMS_AB_ASSOC_NT_ACCOUNT PROP_TAG( PT_BINARY, 0x8027) +#define PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP PROP_TAG( PT_TSTRING, 0x81A5) +#define PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_A PROP_TAG( PT_STRING8, 0x81A5) +#define PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_W PROP_TAG( PT_UNICODE, 0x81A5) +#define PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_O PROP_TAG( PT_OBJECT, 0x81A5) +#define PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_T PROP_TAG( PT_TSTRING, 0x81A5) +#define PR_EMS_AB_ASSOC_REMOTE_DXA PROP_TAG( PT_MV_TSTRING, 0x8051) +#define PR_EMS_AB_ASSOC_REMOTE_DXA_A PROP_TAG( PT_MV_STRING8, 0x8051) +#define PR_EMS_AB_ASSOC_REMOTE_DXA_W PROP_TAG( PT_MV_UNICODE, 0x8051) +#define PR_EMS_AB_ASSOC_REMOTE_DXA_O PROP_TAG( PT_OBJECT, 0x8051) +#define PR_EMS_AB_ASSOC_REMOTE_DXA_T PROP_TAG( PT_MV_TSTRING, 0x8051) +#define PR_EMS_AB_ASSOCIATION_LIFETIME PROP_TAG( PT_LONG, 0x8052) +#define PR_EMS_AB_ATTRIBUTE_CERTIFICATE PROP_TAG( PT_MV_BINARY, 0x8C45) +#define PR_EMS_AB_AUTH_ORIG_BL PROP_TAG( PT_MV_TSTRING, 0x8053) +#define PR_EMS_AB_AUTH_ORIG_BL_A PROP_TAG( PT_MV_STRING8, 0x8053) +#define PR_EMS_AB_AUTH_ORIG_BL_W PROP_TAG( PT_MV_UNICODE, 0x8053) +#define PR_EMS_AB_AUTH_ORIG_BL_O PROP_TAG( PT_OBJECT, 0x8053) +#define PR_EMS_AB_AUTH_ORIG_BL_T PROP_TAG( PT_MV_TSTRING, 0x8053) +#define PR_EMS_AB_AUTHENTICATION_TO_USE PROP_TAG( PT_TSTRING, 0x819A) +#define PR_EMS_AB_AUTHENTICATION_TO_USE_A PROP_TAG( PT_STRING8, 0x819A) +#define PR_EMS_AB_AUTHENTICATION_TO_USE_W PROP_TAG( PT_UNICODE, 0x819A) +#define PR_EMS_AB_AUTHORITY_REVOCATION_LIST PROP_TAG( PT_MV_BINARY, 0x8026) +#define PR_EMS_AB_AUTHORIZED_DOMAIN PROP_TAG( PT_TSTRING, 0x8054) +#define PR_EMS_AB_AUTHORIZED_DOMAIN_A PROP_TAG( PT_STRING8, 0x8054) +#define PR_EMS_AB_AUTHORIZED_DOMAIN_W PROP_TAG( PT_UNICODE, 0x8054) +#define PR_EMS_AB_AUTHORIZED_PASSWORD PROP_TAG( PT_BINARY, 0x8055) +#define PR_EMS_AB_AUTHORIZED_PASSWORD_CONFIRM PROP_TAG( PT_BINARY, 0x8192) +#define PR_EMS_AB_AUTHORIZED_USER PROP_TAG( PT_TSTRING, 0x8056) +#define PR_EMS_AB_AUTHORIZED_USER_A PROP_TAG( PT_STRING8, 0x8056) +#define PR_EMS_AB_AUTHORIZED_USER_W PROP_TAG( PT_UNICODE, 0x8056) +#define PR_EMS_AB_AUTOREPLY PROP_TAG( PT_BOOLEAN, 0x800B) +#define PR_EMS_AB_AUTOREPLY_MESSAGE PROP_TAG( PT_TSTRING, 0x800A) +#define PR_EMS_AB_AUTOREPLY_MESSAGE_A PROP_TAG( PT_STRING8, 0x800A) +#define PR_EMS_AB_AUTOREPLY_MESSAGE_W PROP_TAG( PT_UNICODE, 0x800A) +#define PR_EMS_AB_AUTOREPLY_SUBJECT PROP_TAG( PT_TSTRING, 0x803E) +#define PR_EMS_AB_AUTOREPLY_SUBJECT_A PROP_TAG( PT_STRING8, 0x803E) +#define PR_EMS_AB_AUTOREPLY_SUBJECT_W PROP_TAG( PT_UNICODE, 0x803E) +#define PR_EMS_AB_AVAILABLE_AUTHORIZATION_PACKAGES PROP_TAG( PT_MV_TSTRING, 0x8181) +#define PR_EMS_AB_AVAILABLE_AUTHORIZATION_PACKAGES_A PROP_TAG( PT_MV_STRING8, 0x8181) +#define PR_EMS_AB_AVAILABLE_AUTHORIZATION_PACKAGES_W PROP_TAG( PT_MV_UNICODE, 0x8181) +#define PR_EMS_AB_AVAILABLE_DISTRIBUTIONS PROP_TAG( PT_TSTRING, 0x818B) +#define PR_EMS_AB_AVAILABLE_DISTRIBUTIONS_A PROP_TAG( PT_STRING8, 0x818B) +#define PR_EMS_AB_AVAILABLE_DISTRIBUTIONS_W PROP_TAG( PT_UNICODE, 0x818B) +#define PR_EMS_AB_BRIDGEHEAD_SERVERS PROP_TAG( PT_MV_TSTRING, 0x8174) +#define PR_EMS_AB_BRIDGEHEAD_SERVERS_A PROP_TAG( PT_MV_STRING8, 0x8174) +#define PR_EMS_AB_BRIDGEHEAD_SERVERS_W PROP_TAG( PT_MV_UNICODE, 0x8174) +#define PR_EMS_AB_BRIDGEHEAD_SERVERS_O PROP_TAG( PT_OBJECT, 0x8174) +#define PR_EMS_AB_BRIDGEHEAD_SERVERS_T PROP_TAG( PT_MV_TSTRING, 0x8174) +#define PR_EMS_AB_BUSINESS_CATEGORY PROP_TAG( PT_MV_TSTRING, 0x8057) +#define PR_EMS_AB_BUSINESS_CATEGORY_A PROP_TAG( PT_MV_STRING8, 0x8057) +#define PR_EMS_AB_BUSINESS_CATEGORY_W PROP_TAG( PT_MV_UNICODE, 0x8057) +#define PR_EMS_AB_BUSINESS_ROLES PROP_TAG( PT_BINARY, 0x8023) +#define PR_EMS_AB_CA_CERTIFICATE PROP_TAG( PT_MV_BINARY, 0x8003) +#define PR_EMS_AB_CAN_CREATE_PF PROP_TAG( PT_MV_TSTRING, 0x8058) +#define PR_EMS_AB_CAN_CREATE_PF_A PROP_TAG( PT_MV_STRING8, 0x8058) +#define PR_EMS_AB_CAN_CREATE_PF_W PROP_TAG( PT_MV_UNICODE, 0x8058) +#define PR_EMS_AB_CAN_CREATE_PF_O PROP_TAG( PT_OBJECT, 0x8058) +#define PR_EMS_AB_CAN_CREATE_PF_T PROP_TAG( PT_MV_TSTRING, 0x8058) +#define PR_EMS_AB_CAN_CREATE_PF_BL PROP_TAG( PT_MV_TSTRING, 0x8059) +#define PR_EMS_AB_CAN_CREATE_PF_BL_A PROP_TAG( PT_MV_STRING8, 0x8059) +#define PR_EMS_AB_CAN_CREATE_PF_BL_W PROP_TAG( PT_MV_UNICODE, 0x8059) +#define PR_EMS_AB_CAN_CREATE_PF_BL_O PROP_TAG( PT_OBJECT, 0x8059) +#define PR_EMS_AB_CAN_CREATE_PF_BL_T PROP_TAG( PT_MV_TSTRING, 0x8059) +#define PR_EMS_AB_CAN_CREATE_PF_DL PROP_TAG( PT_MV_TSTRING, 0x805A) +#define PR_EMS_AB_CAN_CREATE_PF_DL_A PROP_TAG( PT_MV_STRING8, 0x805A) +#define PR_EMS_AB_CAN_CREATE_PF_DL_W PROP_TAG( PT_MV_UNICODE, 0x805A) +#define PR_EMS_AB_CAN_CREATE_PF_DL_O PROP_TAG( PT_OBJECT, 0x805A) +#define PR_EMS_AB_CAN_CREATE_PF_DL_T PROP_TAG( PT_MV_TSTRING, 0x805A) +#define PR_EMS_AB_CAN_CREATE_PF_DL_BL PROP_TAG( PT_MV_TSTRING, 0x805B) +#define PR_EMS_AB_CAN_CREATE_PF_DL_BL_A PROP_TAG( PT_MV_STRING8, 0x805B) +#define PR_EMS_AB_CAN_CREATE_PF_DL_BL_W PROP_TAG( PT_MV_UNICODE, 0x805B) +#define PR_EMS_AB_CAN_CREATE_PF_DL_BL_O PROP_TAG( PT_OBJECT, 0x805B) +#define PR_EMS_AB_CAN_CREATE_PF_DL_BL_T PROP_TAG( PT_MV_TSTRING, 0x805B) +#define PR_EMS_AB_CAN_NOT_CREATE_PF PROP_TAG( PT_MV_TSTRING, 0x805C) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_A PROP_TAG( PT_MV_STRING8, 0x805C) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_W PROP_TAG( PT_MV_UNICODE, 0x805C) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_O PROP_TAG( PT_OBJECT, 0x805C) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_T PROP_TAG( PT_MV_TSTRING, 0x805C) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_BL PROP_TAG( PT_MV_TSTRING, 0x805D) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_BL_A PROP_TAG( PT_MV_STRING8, 0x805D) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_BL_W PROP_TAG( PT_MV_UNICODE, 0x805D) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_BL_O PROP_TAG( PT_OBJECT, 0x805D) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_BL_T PROP_TAG( PT_MV_TSTRING, 0x805D) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL PROP_TAG( PT_MV_TSTRING, 0x805E) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_A PROP_TAG( PT_MV_STRING8, 0x805E) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_W PROP_TAG( PT_MV_UNICODE, 0x805E) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_O PROP_TAG( PT_OBJECT, 0x805E) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_T PROP_TAG( PT_MV_TSTRING, 0x805E) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL PROP_TAG( PT_MV_TSTRING, 0x805F) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_A PROP_TAG( PT_MV_STRING8, 0x805F) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_W PROP_TAG( PT_MV_UNICODE, 0x805F) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_O PROP_TAG( PT_OBJECT, 0x805F) +#define PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_T PROP_TAG( PT_MV_TSTRING, 0x805F) +#define PR_EMS_AB_CAN_PRESERVE_DNS PROP_TAG( PT_BOOLEAN, 0x8060) +#define PR_EMS_AB_CERTIFICATE_CHAIN_V3 PROP_TAG( PT_BINARY, 0x8C27) +#define PR_EMS_AB_CERTIFICATE_REVOCATION_LIST PROP_TAG( PT_BINARY, 0x8016) +#define PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V1 PROP_TAG( PT_BINARY, 0x8C29) +#define PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V3 PROP_TAG( PT_BINARY, 0x8C28) +#define PR_EMS_AB_CHARACTER_SET PROP_TAG( PT_TSTRING, 0x8185) +#define PR_EMS_AB_CHARACTER_SET_A PROP_TAG( PT_STRING8, 0x8185) +#define PR_EMS_AB_CHARACTER_SET_W PROP_TAG( PT_UNICODE, 0x8185) +#define PR_EMS_AB_CHARACTER_SET_LIST PROP_TAG( PT_MV_TSTRING, 0x8182) +#define PR_EMS_AB_CHARACTER_SET_LIST_A PROP_TAG( PT_MV_STRING8, 0x8182) +#define PR_EMS_AB_CHARACTER_SET_LIST_W PROP_TAG( PT_MV_UNICODE, 0x8182) +#define PR_EMS_AB_CLIENT_ACCESS_ENABLED PROP_TAG( PT_BOOLEAN, 0x8C24) +#define PR_EMS_AB_CLOCK_ALERT_OFFSET PROP_TAG( PT_LONG, 0x8061) +#define PR_EMS_AB_CLOCK_ALERT_REPAIR PROP_TAG( PT_BOOLEAN, 0x8062) +#define PR_EMS_AB_CLOCK_WARNING_OFFSET PROP_TAG( PT_LONG, 0x8063) +#define PR_EMS_AB_CLOCK_WARNING_REPAIR PROP_TAG( PT_BOOLEAN, 0x8064) +#define PR_EMS_AB_COMPROMISED_KEY_LIST PROP_TAG( PT_BINARY, 0x81C4) +#define PR_EMS_AB_COMPUTER_NAME PROP_TAG( PT_TSTRING, 0x8065) +#define PR_EMS_AB_COMPUTER_NAME_A PROP_TAG( PT_STRING8, 0x8065) +#define PR_EMS_AB_COMPUTER_NAME_W PROP_TAG( PT_UNICODE, 0x8065) +#define PR_EMS_AB_CONNECTED_DOMAINS PROP_TAG( PT_MV_TSTRING, 0x8066) +#define PR_EMS_AB_CONNECTED_DOMAINS_A PROP_TAG( PT_MV_STRING8, 0x8066) +#define PR_EMS_AB_CONNECTED_DOMAINS_W PROP_TAG( PT_MV_UNICODE, 0x8066) +#define PR_EMS_AB_CONNECTION_LIST_FILTER PROP_TAG( PT_BINARY, 0x8180) +#define PR_EMS_AB_CONNECTION_LIST_FILTER_TYPE PROP_TAG( PT_LONG, 0x81B4) +#define PR_EMS_AB_CONNECTION_TYPE PROP_TAG( PT_BOOLEAN, 0x81B3) +#define PR_EMS_AB_CONTAINER_INFO PROP_TAG( PT_LONG, 0x8067) +#define PR_EMS_AB_CONTENT_TYPE PROP_TAG( PT_LONG, 0x8186) +#define PR_EMS_AB_CONTROL_MSG_FOLDER_ID PROP_TAG( PT_BINARY, 0x8188) +#define PR_EMS_AB_CONTROL_MSG_RULES PROP_TAG( PT_BINARY, 0x818A) +#define PR_EMS_AB_COST PROP_TAG( PT_LONG, 0x8068) +#define PR_EMS_AB_COUNTRY_NAME PROP_TAG( PT_TSTRING, 0x8069) +#define PR_EMS_AB_COUNTRY_NAME_A PROP_TAG( PT_STRING8, 0x8069) +#define PR_EMS_AB_COUNTRY_NAME_W PROP_TAG( PT_UNICODE, 0x8069) +#define PR_EMS_AB_CROSS_CERTIFICATE_CRL PROP_TAG( PT_MV_BINARY, 0x8C30) +#define PR_EMS_AB_CROSS_CERTIFICATE_PAIR PROP_TAG( PT_MV_BINARY, 0x8025) +#define PR_EMS_AB_DEFAULT_MESSAGE_FORMAT PROP_TAG( PT_BOOLEAN, 0x8C37) +#define PR_EMS_AB_DELEGATE_USER PROP_TAG( PT_BOOLEAN, 0x8C49) +#define PR_EMS_AB_DELIV_CONT_LENGTH PROP_TAG( PT_LONG, 0x806A) +#define PR_EMS_AB_DELIV_EITS PROP_TAG( PT_MV_BINARY, 0x806B) +#define PR_EMS_AB_DELIV_EXT_CONT_TYPES PROP_TAG( PT_MV_BINARY, 0x806C) +#define PR_EMS_AB_DELIVER_AND_REDIRECT PROP_TAG( PT_BOOLEAN, 0x806D) +#define PR_EMS_AB_DELIVERY_MECHANISM PROP_TAG( PT_LONG, 0x806E) +#define PR_EMS_AB_DELTA_REVOCATION_LIST PROP_TAG( PT_MV_BINARY, 0x8C46) +#define PR_EMS_AB_DESCRIPTION PROP_TAG( PT_MV_TSTRING, 0x806F) +#define PR_EMS_AB_DESCRIPTION_A PROP_TAG( PT_MV_STRING8, 0x806F) +#define PR_EMS_AB_DESCRIPTION_W PROP_TAG( PT_MV_UNICODE, 0x806F) +#define PR_EMS_AB_DESTINATION_INDICATOR PROP_TAG( PT_MV_TSTRING, 0x8070) +#define PR_EMS_AB_DESTINATION_INDICATOR_A PROP_TAG( PT_MV_STRING8, 0x8070) +#define PR_EMS_AB_DESTINATION_INDICATOR_W PROP_TAG( PT_MV_UNICODE, 0x8070) +#define PR_EMS_AB_DIAGNOSTIC_REG_KEY PROP_TAG( PT_TSTRING, 0x8071) +#define PR_EMS_AB_DIAGNOSTIC_REG_KEY_A PROP_TAG( PT_STRING8, 0x8071) +#define PR_EMS_AB_DIAGNOSTIC_REG_KEY_W PROP_TAG( PT_UNICODE, 0x8071) +#define PR_EMS_AB_DISABLE_DEFERRED_COMMIT PROP_TAG( PT_BOOLEAN, 0x8C23) +#define PR_EMS_AB_DISABLED_GATEWAY_PROXY PROP_TAG( PT_MV_TSTRING, 0x81C3) +#define PR_EMS_AB_DISABLED_GATEWAY_PROXY_A PROP_TAG( PT_MV_STRING8, 0x81C3) +#define PR_EMS_AB_DISABLED_GATEWAY_PROXY_W PROP_TAG( PT_MV_UNICODE, 0x81C3) +#define PR_EMS_AB_DISPLAY_NAME_OVERRIDE PROP_TAG( PT_BOOLEAN, 0x8001) +#define PR_EMS_AB_DISPLAY_NAME_SUFFIX PROP_TAG( PT_TSTRING, 0x8C44) +#define PR_EMS_AB_DISPLAY_NAME_SUFFIX_A PROP_TAG( PT_STRING8, 0x8C44) +#define PR_EMS_AB_DISPLAY_NAME_SUFFIX_W PROP_TAG( PT_UNICODE, 0x8C44) +#define PR_EMS_AB_DL_MEM_REJECT_PERMS_BL PROP_TAG( PT_MV_TSTRING, 0x8072) +#define PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_A PROP_TAG( PT_MV_STRING8, 0x8072) +#define PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_W PROP_TAG( PT_MV_UNICODE, 0x8072) +#define PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_O PROP_TAG( PT_OBJECT, 0x8072) +#define PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_T PROP_TAG( PT_MV_TSTRING, 0x8072) +#define PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL PROP_TAG( PT_MV_TSTRING, 0x8073) +#define PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_A PROP_TAG( PT_MV_STRING8, 0x8073) +#define PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_W PROP_TAG( PT_MV_UNICODE, 0x8073) +#define PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_O PROP_TAG( PT_OBJECT, 0x8073) +#define PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_T PROP_TAG( PT_MV_TSTRING, 0x8073) +#define PR_EMS_AB_DL_MEMBER_RULE PROP_TAG( PT_MV_BINARY, 0x8074) +#define PR_EMS_AB_DMD_NAME PROP_TAG( PT_TSTRING, 0x8C56) +#define PR_EMS_AB_DMD_NAME_A PROP_TAG( PT_STRING8, 0x8C56) +#define PR_EMS_AB_DMD_NAME_W PROP_TAG( PT_UNICODE, 0x8C56) +#define PR_EMS_AB_DO_OAB_VERSION PROP_TAG( PT_LONG, 0x8C3A) +#define PR_EMS_AB_DOMAIN_DEF_ALT_RECIP PROP_TAG( PT_TSTRING, 0x8075) +#define PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_A PROP_TAG( PT_STRING8, 0x8075) +#define PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_W PROP_TAG( PT_UNICODE, 0x8075) +#define PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_O PROP_TAG( PT_OBJECT, 0x8075) +#define PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_T PROP_TAG( PT_TSTRING, 0x8075) +#define PR_EMS_AB_DOMAIN_NAME PROP_TAG( PT_TSTRING, 0x8076) +#define PR_EMS_AB_DOMAIN_NAME_A PROP_TAG( PT_STRING8, 0x8076) +#define PR_EMS_AB_DOMAIN_NAME_W PROP_TAG( PT_UNICODE, 0x8076) +#define PR_EMS_AB_DSA_SIGNATURE PROP_TAG( PT_BINARY, 0x8077) +#define PR_EMS_AB_DXA_ADMIN_COPY PROP_TAG( PT_BOOLEAN, 0x8078) +#define PR_EMS_AB_DXA_ADMIN_FORWARD PROP_TAG( PT_BOOLEAN, 0x8079) +#define PR_EMS_AB_DXA_ADMIN_UPDATE PROP_TAG( PT_LONG, 0x807A) +#define PR_EMS_AB_DXA_APPEND_REQCN PROP_TAG( PT_BOOLEAN, 0x807B) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST PROP_TAG( PT_MV_TSTRING, 0x807C) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_A PROP_TAG( PT_MV_STRING8, 0x807C) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_W PROP_TAG( PT_MV_UNICODE, 0x807C) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_O PROP_TAG( PT_OBJECT, 0x807C) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_T PROP_TAG( PT_MV_TSTRING, 0x807C) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_BL PROP_TAG( PT_MV_TSTRING, 0x8C76) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_BL_A PROP_TAG( PT_MV_STRING8, 0x8C76) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_BL_W PROP_TAG( PT_MV_UNICODE, 0x8C76) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_BL_O PROP_TAG( PT_OBJECT, 0x8C76) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_BL_T PROP_TAG( PT_MV_TSTRING, 0x8C76) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_LINKED PROP_TAG( PT_MV_TSTRING, 0x8C71) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_LINKED_A PROP_TAG( PT_MV_STRING8, 0x8C71) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_LINKED_W PROP_TAG( PT_MV_UNICODE, 0x8C71) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_LINKED_O PROP_TAG( PT_OBJECT, 0x8C71) +#define PR_EMS_AB_DXA_CONF_CONTAINER_LIST_LINKED_T PROP_TAG( PT_MV_TSTRING, 0x8C71) +#define PR_EMS_AB_DXA_CONF_REQ_TIME PROP_TAG( PT_SYSTIME, 0x807D) +#define PR_EMS_AB_DXA_CONF_SEQ PROP_TAG( PT_TSTRING, 0x807E) +#define PR_EMS_AB_DXA_CONF_SEQ_A PROP_TAG( PT_STRING8, 0x807E) +#define PR_EMS_AB_DXA_CONF_SEQ_W PROP_TAG( PT_UNICODE, 0x807E) +#define PR_EMS_AB_DXA_CONF_SEQ_USN PROP_TAG( PT_LONG, 0x807F) +#define PR_EMS_AB_DXA_EXCHANGE_OPTIONS PROP_TAG( PT_LONG, 0x8080) +#define PR_EMS_AB_DXA_EXPORT_NOW PROP_TAG( PT_BOOLEAN, 0x8081) +#define PR_EMS_AB_DXA_FLAGS PROP_TAG( PT_LONG, 0x8082) +#define PR_EMS_AB_DXA_IMP_SEQ PROP_TAG( PT_TSTRING, 0x8083) +#define PR_EMS_AB_DXA_IMP_SEQ_A PROP_TAG( PT_STRING8, 0x8083) +#define PR_EMS_AB_DXA_IMP_SEQ_W PROP_TAG( PT_UNICODE, 0x8083) +#define PR_EMS_AB_DXA_IMP_SEQ_TIME PROP_TAG( PT_SYSTIME, 0x8084) +#define PR_EMS_AB_DXA_IMP_SEQ_USN PROP_TAG( PT_LONG, 0x8085) +#define PR_EMS_AB_DXA_IMPORT_NOW PROP_TAG( PT_BOOLEAN, 0x8086) +#define PR_EMS_AB_DXA_IN_TEMPLATE_MAP PROP_TAG( PT_MV_TSTRING, 0x8087) +#define PR_EMS_AB_DXA_IN_TEMPLATE_MAP_A PROP_TAG( PT_MV_STRING8, 0x8087) +#define PR_EMS_AB_DXA_IN_TEMPLATE_MAP_W PROP_TAG( PT_MV_UNICODE, 0x8087) +#define PR_EMS_AB_DXA_LOCAL_ADMIN PROP_TAG( PT_TSTRING, 0x8088) +#define PR_EMS_AB_DXA_LOCAL_ADMIN_A PROP_TAG( PT_STRING8, 0x8088) +#define PR_EMS_AB_DXA_LOCAL_ADMIN_W PROP_TAG( PT_UNICODE, 0x8088) +#define PR_EMS_AB_DXA_LOCAL_ADMIN_O PROP_TAG( PT_OBJECT, 0x8088) +#define PR_EMS_AB_DXA_LOCAL_ADMIN_T PROP_TAG( PT_TSTRING, 0x8088) +#define PR_EMS_AB_DXA_LOGGING_LEVEL PROP_TAG( PT_LONG, 0x8089) +#define PR_EMS_AB_DXA_NATIVE_ADDRESS_TYPE PROP_TAG( PT_TSTRING, 0x808A) +#define PR_EMS_AB_DXA_NATIVE_ADDRESS_TYPE_A PROP_TAG( PT_STRING8, 0x808A) +#define PR_EMS_AB_DXA_NATIVE_ADDRESS_TYPE_W PROP_TAG( PT_UNICODE, 0x808A) +#define PR_EMS_AB_DXA_OUT_TEMPLATE_MAP PROP_TAG( PT_MV_TSTRING, 0x808B) +#define PR_EMS_AB_DXA_OUT_TEMPLATE_MAP_A PROP_TAG( PT_MV_STRING8, 0x808B) +#define PR_EMS_AB_DXA_OUT_TEMPLATE_MAP_W PROP_TAG( PT_MV_UNICODE, 0x808B) +#define PR_EMS_AB_DXA_PASSWORD PROP_TAG( PT_TSTRING, 0x808C) +#define PR_EMS_AB_DXA_PASSWORD_A PROP_TAG( PT_STRING8, 0x808C) +#define PR_EMS_AB_DXA_PASSWORD_W PROP_TAG( PT_UNICODE, 0x808C) +#define PR_EMS_AB_DXA_PREV_EXCHANGE_OPTIONS PROP_TAG( PT_LONG, 0x808D) +#define PR_EMS_AB_DXA_PREV_EXPORT_NATIVE_ONLY PROP_TAG( PT_BOOLEAN, 0x808E) +#define PR_EMS_AB_DXA_PREV_IN_EXCHANGE_SENSITIVITY PROP_TAG( PT_LONG, 0x808F) +#define PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES PROP_TAG( PT_TSTRING, 0x8090) +#define PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_A PROP_TAG( PT_STRING8, 0x8090) +#define PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_W PROP_TAG( PT_UNICODE, 0x8090) +#define PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_O PROP_TAG( PT_OBJECT, 0x8090) +#define PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_T PROP_TAG( PT_TSTRING, 0x8090) +#define PR_EMS_AB_DXA_PREV_REPLICATION_SENSITIVITY PROP_TAG( PT_LONG, 0x8091) +#define PR_EMS_AB_DXA_PREV_TEMPLATE_OPTIONS PROP_TAG( PT_LONG, 0x8092) +#define PR_EMS_AB_DXA_PREV_TYPES PROP_TAG( PT_LONG, 0x8093) +#define PR_EMS_AB_DXA_RECIPIENT_CP PROP_TAG( PT_TSTRING, 0x8094) +#define PR_EMS_AB_DXA_RECIPIENT_CP_A PROP_TAG( PT_STRING8, 0x8094) +#define PR_EMS_AB_DXA_RECIPIENT_CP_W PROP_TAG( PT_UNICODE, 0x8094) +#define PR_EMS_AB_DXA_REMOTE_CLIENT PROP_TAG( PT_TSTRING, 0x8095) +#define PR_EMS_AB_DXA_REMOTE_CLIENT_A PROP_TAG( PT_STRING8, 0x8095) +#define PR_EMS_AB_DXA_REMOTE_CLIENT_W PROP_TAG( PT_UNICODE, 0x8095) +#define PR_EMS_AB_DXA_REMOTE_CLIENT_O PROP_TAG( PT_OBJECT, 0x8095) +#define PR_EMS_AB_DXA_REMOTE_CLIENT_T PROP_TAG( PT_TSTRING, 0x8095) +#define PR_EMS_AB_DXA_REQ_SEQ PROP_TAG( PT_TSTRING, 0x8096) +#define PR_EMS_AB_DXA_REQ_SEQ_A PROP_TAG( PT_STRING8, 0x8096) +#define PR_EMS_AB_DXA_REQ_SEQ_W PROP_TAG( PT_UNICODE, 0x8096) +#define PR_EMS_AB_DXA_REQ_SEQ_TIME PROP_TAG( PT_SYSTIME, 0x8097) +#define PR_EMS_AB_DXA_REQ_SEQ_USN PROP_TAG( PT_LONG, 0x8098) +#define PR_EMS_AB_DXA_REQNAME PROP_TAG( PT_TSTRING, 0x8099) +#define PR_EMS_AB_DXA_REQNAME_A PROP_TAG( PT_STRING8, 0x8099) +#define PR_EMS_AB_DXA_REQNAME_W PROP_TAG( PT_UNICODE, 0x8099) +#define PR_EMS_AB_DXA_SVR_SEQ PROP_TAG( PT_TSTRING, 0x809A) +#define PR_EMS_AB_DXA_SVR_SEQ_A PROP_TAG( PT_STRING8, 0x809A) +#define PR_EMS_AB_DXA_SVR_SEQ_W PROP_TAG( PT_UNICODE, 0x809A) +#define PR_EMS_AB_DXA_SVR_SEQ_TIME PROP_TAG( PT_SYSTIME, 0x809B) +#define PR_EMS_AB_DXA_SVR_SEQ_USN PROP_TAG( PT_LONG, 0x809C) +#define PR_EMS_AB_DXA_TASK PROP_TAG( PT_LONG, 0x809D) +#define PR_EMS_AB_DXA_TEMPLATE_OPTIONS PROP_TAG( PT_LONG, 0x809E) +#define PR_EMS_AB_DXA_TEMPLATE_TIMESTAMP PROP_TAG( PT_SYSTIME, 0x809F) +#define PR_EMS_AB_DXA_TYPES PROP_TAG( PT_LONG, 0x80A0) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST PROP_TAG( PT_MV_TSTRING, 0x80A1) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_A PROP_TAG( PT_MV_STRING8, 0x80A1) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_W PROP_TAG( PT_MV_UNICODE, 0x80A1) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_O PROP_TAG( PT_OBJECT, 0x80A1) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_T PROP_TAG( PT_MV_TSTRING, 0x80A1) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_BL PROP_TAG( PT_MV_TSTRING, 0x8C77) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_BL_A PROP_TAG( PT_MV_STRING8, 0x8C77) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_BL_W PROP_TAG( PT_MV_UNICODE, 0x8C77) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_BL_O PROP_TAG( PT_OBJECT, 0x8C77) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_BL_T PROP_TAG( PT_MV_TSTRING, 0x8C77) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_LINKED PROP_TAG( PT_MV_TSTRING, 0x8C72) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_LINKED_A PROP_TAG( PT_MV_STRING8, 0x8C72) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_LINKED_W PROP_TAG( PT_MV_UNICODE, 0x8C72) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_LINKED_O PROP_TAG( PT_OBJECT, 0x8C72) +#define PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_LINKED_T PROP_TAG( PT_MV_TSTRING, 0x8C72) +#define PR_EMS_AB_EMPLOYEE_NUMBER PROP_TAG( PT_TSTRING, 0x8C67) +#define PR_EMS_AB_EMPLOYEE_NUMBER_A PROP_TAG( PT_STRING8, 0x8C67) +#define PR_EMS_AB_EMPLOYEE_NUMBER_W PROP_TAG( PT_UNICODE, 0x8C67) +#define PR_EMS_AB_EMPLOYEE_TYPE PROP_TAG( PT_TSTRING, 0x8C69) +#define PR_EMS_AB_EMPLOYEE_TYPE_A PROP_TAG( PT_STRING8, 0x8C69) +#define PR_EMS_AB_EMPLOYEE_TYPE_W PROP_TAG( PT_UNICODE, 0x8C69) +#define PR_EMS_AB_ENABLE_COMPATIBILITY PROP_TAG( PT_BOOLEAN, 0x8C32) +#define PR_EMS_AB_ENABLED PROP_TAG( PT_BOOLEAN, 0x8C21) +#define PR_EMS_AB_ENABLED_AUTHORIZATION_PACKAGES PROP_TAG( PT_MV_TSTRING, 0x8184) +#define PR_EMS_AB_ENABLED_AUTHORIZATION_PACKAGES_A PROP_TAG( PT_MV_STRING8, 0x8184) +#define PR_EMS_AB_ENABLED_AUTHORIZATION_PACKAGES_W PROP_TAG( PT_MV_UNICODE, 0x8184) +#define PR_EMS_AB_ENABLED_PROTOCOL_CFG PROP_TAG( PT_BOOLEAN, 0x81A8) +#define PR_EMS_AB_ENABLED_PROTOCOLS PROP_TAG( PT_LONG, 0x817F) +#define PR_EMS_AB_ENCAPSULATION_METHOD PROP_TAG( PT_LONG, 0x80A2) +#define PR_EMS_AB_ENCRYPT PROP_TAG( PT_BOOLEAN, 0x80A3) +#define PR_EMS_AB_ENCRYPT_ALG_LIST_NA PROP_TAG( PT_MV_TSTRING, 0x8040) +#define PR_EMS_AB_ENCRYPT_ALG_LIST_NA_A PROP_TAG( PT_MV_STRING8, 0x8040) +#define PR_EMS_AB_ENCRYPT_ALG_LIST_NA_W PROP_TAG( PT_MV_UNICODE, 0x8040) +#define PR_EMS_AB_ENCRYPT_ALG_LIST_OTHER PROP_TAG( PT_MV_TSTRING, 0x8041) +#define PR_EMS_AB_ENCRYPT_ALG_LIST_OTHER_A PROP_TAG( PT_MV_STRING8, 0x8041) +#define PR_EMS_AB_ENCRYPT_ALG_LIST_OTHER_W PROP_TAG( PT_MV_UNICODE, 0x8041) +#define PR_EMS_AB_ENCRYPT_ALG_SELECTED_NA PROP_TAG( PT_TSTRING, 0x8043) +#define PR_EMS_AB_ENCRYPT_ALG_SELECTED_NA_A PROP_TAG( PT_STRING8, 0x8043) +#define PR_EMS_AB_ENCRYPT_ALG_SELECTED_NA_W PROP_TAG( PT_UNICODE, 0x8043) +#define PR_EMS_AB_ENCRYPT_ALG_SELECTED_OTHER PROP_TAG( PT_TSTRING, 0x803D) +#define PR_EMS_AB_ENCRYPT_ALG_SELECTED_OTHER_A PROP_TAG( PT_STRING8, 0x803D) +#define PR_EMS_AB_ENCRYPT_ALG_SELECTED_OTHER_W PROP_TAG( PT_UNICODE, 0x803D) +#define PR_EMS_AB_EXPAND_DLS_LOCALLY PROP_TAG( PT_BOOLEAN, 0x80A4) +#define PR_EMS_AB_EXPIRATION_TIME PROP_TAG( PT_SYSTIME, 0x8028) +#define PR_EMS_AB_EXPORT_CONTAINERS PROP_TAG( PT_MV_TSTRING, 0x80A5) +#define PR_EMS_AB_EXPORT_CONTAINERS_A PROP_TAG( PT_MV_STRING8, 0x80A5) +#define PR_EMS_AB_EXPORT_CONTAINERS_W PROP_TAG( PT_MV_UNICODE, 0x80A5) +#define PR_EMS_AB_EXPORT_CONTAINERS_O PROP_TAG( PT_OBJECT, 0x80A5) +#define PR_EMS_AB_EXPORT_CONTAINERS_T PROP_TAG( PT_MV_TSTRING, 0x80A5) +#define PR_EMS_AB_EXPORT_CUSTOM_RECIPIENTS PROP_TAG( PT_BOOLEAN, 0x80A6) +#define PR_EMS_AB_EXTENDED_CHARS_ALLOWED PROP_TAG( PT_BOOLEAN, 0x80A7) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_1 PROP_TAG( PT_TSTRING, 0x802D) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_1_A PROP_TAG( PT_STRING8, 0x802D) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_1_W PROP_TAG( PT_UNICODE, 0x802D) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_10 PROP_TAG( PT_TSTRING, 0x8036) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_10_A PROP_TAG( PT_STRING8, 0x8036) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_10_W PROP_TAG( PT_UNICODE, 0x8036) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_11 PROP_TAG( PT_TSTRING, 0x8C57) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_11_A PROP_TAG( PT_STRING8, 0x8C57) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_11_W PROP_TAG( PT_UNICODE, 0x8C57) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_12 PROP_TAG( PT_TSTRING, 0x8C58) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_12_A PROP_TAG( PT_STRING8, 0x8C58) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_12_W PROP_TAG( PT_UNICODE, 0x8C58) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_13 PROP_TAG( PT_TSTRING, 0x8C59) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_13_A PROP_TAG( PT_STRING8, 0x8C59) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_13_W PROP_TAG( PT_UNICODE, 0x8C59) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_14 PROP_TAG( PT_TSTRING, 0x8C60) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_14_A PROP_TAG( PT_STRING8, 0x8C60) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_14_W PROP_TAG( PT_UNICODE, 0x8C60) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_15 PROP_TAG( PT_TSTRING, 0x8C61) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_15_A PROP_TAG( PT_STRING8, 0x8C61) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_15_W PROP_TAG( PT_UNICODE, 0x8C61) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_2 PROP_TAG( PT_TSTRING, 0x802E) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_2_A PROP_TAG( PT_STRING8, 0x802E) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_2_W PROP_TAG( PT_UNICODE, 0x802E) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_3 PROP_TAG( PT_TSTRING, 0x802F) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_3_A PROP_TAG( PT_STRING8, 0x802F) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_3_W PROP_TAG( PT_UNICODE, 0x802F) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_4 PROP_TAG( PT_TSTRING, 0x8030) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_4_A PROP_TAG( PT_STRING8, 0x8030) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_4_W PROP_TAG( PT_UNICODE, 0x8030) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_5 PROP_TAG( PT_TSTRING, 0x8031) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_5_A PROP_TAG( PT_STRING8, 0x8031) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_5_W PROP_TAG( PT_UNICODE, 0x8031) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_6 PROP_TAG( PT_TSTRING, 0x8032) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_6_A PROP_TAG( PT_STRING8, 0x8032) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_6_W PROP_TAG( PT_UNICODE, 0x8032) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_7 PROP_TAG( PT_TSTRING, 0x8033) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_7_A PROP_TAG( PT_STRING8, 0x8033) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_7_W PROP_TAG( PT_UNICODE, 0x8033) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_8 PROP_TAG( PT_TSTRING, 0x8034) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_8_A PROP_TAG( PT_STRING8, 0x8034) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_8_W PROP_TAG( PT_UNICODE, 0x8034) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_9 PROP_TAG( PT_TSTRING, 0x8035) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_9_A PROP_TAG( PT_STRING8, 0x8035) +#define PR_EMS_AB_EXTENSION_ATTRIBUTE_9_W PROP_TAG( PT_UNICODE, 0x8035) +#define PR_EMS_AB_EXTENSION_DATA PROP_TAG( PT_MV_BINARY, 0x80A8) +#define PR_EMS_AB_EXTENSION_NAME PROP_TAG( PT_MV_TSTRING, 0x80A9) +#define PR_EMS_AB_EXTENSION_NAME_A PROP_TAG( PT_MV_STRING8, 0x80A9) +#define PR_EMS_AB_EXTENSION_NAME_W PROP_TAG( PT_MV_UNICODE, 0x80A9) +#define PR_EMS_AB_EXTENSION_NAME_INHERITED PROP_TAG( PT_MV_TSTRING, 0x80AA) +#define PR_EMS_AB_EXTENSION_NAME_INHERITED_A PROP_TAG( PT_MV_STRING8, 0x80AA) +#define PR_EMS_AB_EXTENSION_NAME_INHERITED_W PROP_TAG( PT_MV_UNICODE, 0x80AA) +#define PR_EMS_AB_FACSIMILE_TELEPHONE_NUMBER PROP_TAG( PT_MV_BINARY, 0x80AB) +#define PR_EMS_AB_FILE_VERSION PROP_TAG( PT_BINARY, 0x80AC) +#define PR_EMS_AB_FILTER_LOCAL_ADDRESSES PROP_TAG( PT_BOOLEAN, 0x80AD) +#define PR_EMS_AB_FOLDER_PATHNAME PROP_TAG( PT_TSTRING, 0x8004) +#define PR_EMS_AB_FOLDER_PATHNAME_A PROP_TAG( PT_STRING8, 0x8004) +#define PR_EMS_AB_FOLDER_PATHNAME_W PROP_TAG( PT_UNICODE, 0x8004) +#define PR_EMS_AB_FOLDERS_CONTAINER PROP_TAG( PT_TSTRING, 0x80AE) +#define PR_EMS_AB_FOLDERS_CONTAINER_A PROP_TAG( PT_STRING8, 0x80AE) +#define PR_EMS_AB_FOLDERS_CONTAINER_W PROP_TAG( PT_UNICODE, 0x80AE) +#define PR_EMS_AB_FOLDERS_CONTAINER_O PROP_TAG( PT_OBJECT, 0x80AE) +#define PR_EMS_AB_FOLDERS_CONTAINER_T PROP_TAG( PT_TSTRING, 0x80AE) +#define PR_EMS_AB_FORM_DATA PROP_TAG( PT_BINARY, 0x8C65) +#define PR_EMS_AB_FORWARDING_ADDRESS PROP_TAG( PT_TSTRING, 0x8C64) +#define PR_EMS_AB_FORWARDING_ADDRESS_A PROP_TAG( PT_STRING8, 0x8C64) +#define PR_EMS_AB_FORWARDING_ADDRESS_W PROP_TAG( PT_UNICODE, 0x8C64) +#define PR_EMS_AB_GARBAGE_COLL_PERIOD PROP_TAG( PT_LONG, 0x80AF) +#define PR_EMS_AB_GATEWAY_LOCAL_CRED PROP_TAG( PT_TSTRING, 0x80B0) +#define PR_EMS_AB_GATEWAY_LOCAL_CRED_A PROP_TAG( PT_STRING8, 0x80B0) +#define PR_EMS_AB_GATEWAY_LOCAL_CRED_W PROP_TAG( PT_UNICODE, 0x80B0) +#define PR_EMS_AB_GATEWAY_LOCAL_DESIG PROP_TAG( PT_TSTRING, 0x80B1) +#define PR_EMS_AB_GATEWAY_LOCAL_DESIG_A PROP_TAG( PT_STRING8, 0x80B1) +#define PR_EMS_AB_GATEWAY_LOCAL_DESIG_W PROP_TAG( PT_UNICODE, 0x80B1) +#define PR_EMS_AB_GATEWAY_PROXY PROP_TAG( PT_MV_TSTRING, 0x80B2) +#define PR_EMS_AB_GATEWAY_PROXY_A PROP_TAG( PT_MV_STRING8, 0x80B2) +#define PR_EMS_AB_GATEWAY_PROXY_W PROP_TAG( PT_MV_UNICODE, 0x80B2) +#define PR_EMS_AB_GATEWAY_ROUTING_TREE PROP_TAG( PT_BINARY, 0x80B3) +#define PR_EMS_AB_GENERATION_QUALIFIER PROP_TAG( PT_TSTRING, 0x8C53) +#define PR_EMS_AB_GENERATION_QUALIFIER_A PROP_TAG( PT_STRING8, 0x8C53) +#define PR_EMS_AB_GENERATION_QUALIFIER_W PROP_TAG( PT_UNICODE, 0x8C53) +#define PR_EMS_AB_GROUP_BY_ATTR_1 PROP_TAG( PT_TSTRING, 0x81B7) +#define PR_EMS_AB_GROUP_BY_ATTR_1_A PROP_TAG( PT_STRING8, 0x81B7) +#define PR_EMS_AB_GROUP_BY_ATTR_1_W PROP_TAG( PT_UNICODE, 0x81B7) +#define PR_EMS_AB_GROUP_BY_ATTR_2 PROP_TAG( PT_TSTRING, 0x81B8) +#define PR_EMS_AB_GROUP_BY_ATTR_2_A PROP_TAG( PT_STRING8, 0x81B8) +#define PR_EMS_AB_GROUP_BY_ATTR_2_W PROP_TAG( PT_UNICODE, 0x81B8) +#define PR_EMS_AB_GROUP_BY_ATTR_3 PROP_TAG( PT_TSTRING, 0x81B9) +#define PR_EMS_AB_GROUP_BY_ATTR_3_A PROP_TAG( PT_STRING8, 0x81B9) +#define PR_EMS_AB_GROUP_BY_ATTR_3_W PROP_TAG( PT_UNICODE, 0x81B9) +#define PR_EMS_AB_GROUP_BY_ATTR_4 PROP_TAG( PT_TSTRING, 0x81BA) +#define PR_EMS_AB_GROUP_BY_ATTR_4_A PROP_TAG( PT_STRING8, 0x81BA) +#define PR_EMS_AB_GROUP_BY_ATTR_4_W PROP_TAG( PT_UNICODE, 0x81BA) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN PROP_TAG( PT_TSTRING, 0x8C1A) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_A PROP_TAG( PT_STRING8, 0x8C1A) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_W PROP_TAG( PT_UNICODE, 0x8C1A) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_O PROP_TAG( PT_OBJECT, 0x8C1A) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_T PROP_TAG( PT_TSTRING, 0x8C1A) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_STR PROP_TAG( PT_TSTRING, 0x8C19) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_STR_A PROP_TAG( PT_STRING8, 0x8C19) +#define PR_EMS_AB_GROUP_BY_ATTR_VALUE_STR_W PROP_TAG( PT_UNICODE, 0x8C19) +#define PR_EMS_AB_GWART_LAST_MODIFIED PROP_TAG( PT_SYSTIME, 0x80B4) +#define PR_EMS_AB_HAS_FULL_REPLICA_NCS PROP_TAG( PT_MV_TSTRING, 0x80B5) +#define PR_EMS_AB_HAS_FULL_REPLICA_NCS_A PROP_TAG( PT_MV_STRING8, 0x80B5) +#define PR_EMS_AB_HAS_FULL_REPLICA_NCS_W PROP_TAG( PT_MV_UNICODE, 0x80B5) +#define PR_EMS_AB_HAS_FULL_REPLICA_NCS_O PROP_TAG( PT_OBJECT, 0x80B5) +#define PR_EMS_AB_HAS_FULL_REPLICA_NCS_T PROP_TAG( PT_MV_TSTRING, 0x80B5) +#define PR_EMS_AB_HAS_MASTER_NCS PROP_TAG( PT_MV_TSTRING, 0x80B6) +#define PR_EMS_AB_HAS_MASTER_NCS_A PROP_TAG( PT_MV_STRING8, 0x80B6) +#define PR_EMS_AB_HAS_MASTER_NCS_W PROP_TAG( PT_MV_UNICODE, 0x80B6) +#define PR_EMS_AB_HAS_MASTER_NCS_O PROP_TAG( PT_OBJECT, 0x80B6) +#define PR_EMS_AB_HAS_MASTER_NCS_T PROP_TAG( PT_MV_TSTRING, 0x80B6) +#define PR_EMS_AB_HELP_DATA16 PROP_TAG( PT_BINARY, 0x803A) +#define PR_EMS_AB_HELP_DATA32 PROP_TAG( PT_BINARY, 0x8010) +#define PR_EMS_AB_HELP_FILE_NAME PROP_TAG( PT_TSTRING, 0x803B) +#define PR_EMS_AB_HELP_FILE_NAME_A PROP_TAG( PT_STRING8, 0x803B) +#define PR_EMS_AB_HELP_FILE_NAME_W PROP_TAG( PT_UNICODE, 0x803B) +#define PR_EMS_AB_HEURISTICS PROP_TAG( PT_LONG, 0x80B7) +#define PR_EMS_AB_HIDE_DL_MEMBERSHIP PROP_TAG( PT_BOOLEAN, 0x80B8) +#define PR_EMS_AB_HIDE_FROM_ADDRESS_BOOK PROP_TAG( PT_BOOLEAN, 0x80B9) +#define PR_EMS_AB_HOME_MDB PROP_TAG( PT_TSTRING, 0x8006) +#define PR_EMS_AB_HOME_MDB_A PROP_TAG( PT_STRING8, 0x8006) +#define PR_EMS_AB_HOME_MDB_W PROP_TAG( PT_UNICODE, 0x8006) +#define PR_EMS_AB_HOME_MDB_O PROP_TAG( PT_OBJECT, 0x8006) +#define PR_EMS_AB_HOME_MDB_T PROP_TAG( PT_TSTRING, 0x8006) +#define PR_EMS_AB_HOME_MDB_BL PROP_TAG( PT_MV_TSTRING, 0x8014) +#define PR_EMS_AB_HOME_MDB_BL_A PROP_TAG( PT_MV_STRING8, 0x8014) +#define PR_EMS_AB_HOME_MDB_BL_W PROP_TAG( PT_MV_UNICODE, 0x8014) +#define PR_EMS_AB_HOME_MDB_BL_O PROP_TAG( PT_OBJECT, 0x8014) +#define PR_EMS_AB_HOME_MDB_BL_T PROP_TAG( PT_MV_TSTRING, 0x8014) +#define PR_EMS_AB_HOME_MTA PROP_TAG( PT_TSTRING, 0x8007) +#define PR_EMS_AB_HOME_MTA_A PROP_TAG( PT_STRING8, 0x8007) +#define PR_EMS_AB_HOME_MTA_W PROP_TAG( PT_UNICODE, 0x8007) +#define PR_EMS_AB_HOME_MTA_O PROP_TAG( PT_OBJECT, 0x8007) +#define PR_EMS_AB_HOME_MTA_T PROP_TAG( PT_TSTRING, 0x8007) +#define PR_EMS_AB_HOME_PUBLIC_SERVER PROP_TAG( PT_TSTRING, 0x803F) +#define PR_EMS_AB_HOME_PUBLIC_SERVER_A PROP_TAG( PT_STRING8, 0x803F) +#define PR_EMS_AB_HOME_PUBLIC_SERVER_W PROP_TAG( PT_UNICODE, 0x803F) +#define PR_EMS_AB_HOME_PUBLIC_SERVER_O PROP_TAG( PT_OBJECT, 0x803F) +#define PR_EMS_AB_HOME_PUBLIC_SERVER_T PROP_TAG( PT_TSTRING, 0x803F) +#define PR_EMS_AB_HOUSE_IDENTIFIER PROP_TAG( PT_TSTRING, 0x8C54) +#define PR_EMS_AB_HOUSE_IDENTIFIER_A PROP_TAG( PT_STRING8, 0x8C54) +#define PR_EMS_AB_HOUSE_IDENTIFIER_W PROP_TAG( PT_UNICODE, 0x8C54) +#define PR_EMS_AB_HTTP_PUB_AB_ATTRIBUTES PROP_TAG( PT_MV_TSTRING, 0x81A9) +#define PR_EMS_AB_HTTP_PUB_AB_ATTRIBUTES_A PROP_TAG( PT_MV_STRING8, 0x81A9) +#define PR_EMS_AB_HTTP_PUB_AB_ATTRIBUTES_W PROP_TAG( PT_MV_UNICODE, 0x81A9) +#define PR_EMS_AB_HTTP_PUB_GAL PROP_TAG( PT_BOOLEAN, 0x819B) +#define PR_EMS_AB_HTTP_PUB_GAL_LIMIT PROP_TAG( PT_LONG, 0x819C) +#define PR_EMS_AB_HTTP_PUB_PF PROP_TAG( PT_MV_BINARY, 0x819E) +#define PR_EMS_AB_HTTP_SERVERS PROP_TAG( PT_MV_TSTRING, 0x81AB) +#define PR_EMS_AB_HTTP_SERVERS_A PROP_TAG( PT_MV_STRING8, 0x81AB) +#define PR_EMS_AB_HTTP_SERVERS_W PROP_TAG( PT_MV_UNICODE, 0x81AB) +#define PR_EMS_AB_IMPORT_CONTAINER PROP_TAG( PT_TSTRING, 0x80BA) +#define PR_EMS_AB_IMPORT_CONTAINER_A PROP_TAG( PT_STRING8, 0x80BA) +#define PR_EMS_AB_IMPORT_CONTAINER_W PROP_TAG( PT_UNICODE, 0x80BA) +#define PR_EMS_AB_IMPORT_CONTAINER_O PROP_TAG( PT_OBJECT, 0x80BA) +#define PR_EMS_AB_IMPORT_CONTAINER_T PROP_TAG( PT_TSTRING, 0x80BA) +#define PR_EMS_AB_IMPORT_SENSITIVITY PROP_TAG( PT_LONG, 0x80BB) +#define PR_EMS_AB_IMPORTED_FROM PROP_TAG( PT_TSTRING, 0x8042) +#define PR_EMS_AB_IMPORTED_FROM_A PROP_TAG( PT_STRING8, 0x8042) +#define PR_EMS_AB_IMPORTED_FROM_W PROP_TAG( PT_UNICODE, 0x8042) +#define PR_EMS_AB_INBOUND_ACCEPT_ALL PROP_TAG( PT_BOOLEAN, 0x8C20) +#define PR_EMS_AB_INBOUND_DN PROP_TAG( PT_TSTRING, 0x8C1E) +#define PR_EMS_AB_INBOUND_DN_A PROP_TAG( PT_STRING8, 0x8C1E) +#define PR_EMS_AB_INBOUND_DN_W PROP_TAG( PT_UNICODE, 0x8C1E) +#define PR_EMS_AB_INBOUND_DN_O PROP_TAG( PT_OBJECT, 0x8C1E) +#define PR_EMS_AB_INBOUND_DN_T PROP_TAG( PT_TSTRING, 0x8C1E) +#define PR_EMS_AB_INBOUND_HOST PROP_TAG( PT_MV_TSTRING, 0x818E) +#define PR_EMS_AB_INBOUND_HOST_A PROP_TAG( PT_MV_STRING8, 0x818E) +#define PR_EMS_AB_INBOUND_HOST_W PROP_TAG( PT_MV_UNICODE, 0x818E) +#define PR_EMS_AB_INBOUND_NEWSFEED PROP_TAG( PT_TSTRING, 0x8193) +#define PR_EMS_AB_INBOUND_NEWSFEED_A PROP_TAG( PT_STRING8, 0x8193) +#define PR_EMS_AB_INBOUND_NEWSFEED_W PROP_TAG( PT_UNICODE, 0x8193) +#define PR_EMS_AB_INBOUND_NEWSFEED_TYPE PROP_TAG( PT_BOOLEAN, 0x8C1F) +#define PR_EMS_AB_INBOUND_SITES PROP_TAG( PT_MV_TSTRING, 0x80BC) +#define PR_EMS_AB_INBOUND_SITES_A PROP_TAG( PT_MV_STRING8, 0x80BC) +#define PR_EMS_AB_INBOUND_SITES_W PROP_TAG( PT_MV_UNICODE, 0x80BC) +#define PR_EMS_AB_INBOUND_SITES_O PROP_TAG( PT_OBJECT, 0x80BC) +#define PR_EMS_AB_INBOUND_SITES_T PROP_TAG( PT_MV_TSTRING, 0x80BC) +#define PR_EMS_AB_INCOMING_MSG_SIZE_LIMIT PROP_TAG( PT_LONG, 0x8190) +#define PR_EMS_AB_INCOMING_PASSWORD PROP_TAG( PT_BINARY, 0x81AF) +#define PR_EMS_AB_INSADMIN PROP_TAG( PT_TSTRING, 0x81C5) +#define PR_EMS_AB_INSADMIN_A PROP_TAG( PT_STRING8, 0x81C5) +#define PR_EMS_AB_INSADMIN_W PROP_TAG( PT_UNICODE, 0x81C5) +#define PR_EMS_AB_INSADMIN_O PROP_TAG( PT_OBJECT, 0x81C5) +#define PR_EMS_AB_INSADMIN_T PROP_TAG( PT_TSTRING, 0x81C5) +#define PR_EMS_AB_INSTANCE_TYPE PROP_TAG( PT_LONG, 0x80BD) +#define PR_EMS_AB_INTERNATIONAL_ISDN_NUMBER PROP_TAG( PT_MV_TSTRING, 0x80BE) +#define PR_EMS_AB_INTERNATIONAL_ISDN_NUMBER_A PROP_TAG( PT_MV_STRING8, 0x80BE) +#define PR_EMS_AB_INTERNATIONAL_ISDN_NUMBER_W PROP_TAG( PT_MV_UNICODE, 0x80BE) +#define PR_EMS_AB_INVOCATION_ID PROP_TAG( PT_BINARY, 0x80BF) +#define PR_EMS_AB_IS_DELETED PROP_TAG( PT_BOOLEAN, 0x80C0) +#define PR_EMS_AB_IS_MEMBER_OF_DL PROP_TAG( PT_OBJECT, 0x8008) +#define PR_EMS_AB_IS_MEMBER_OF_DL_A PROP_TAG( PT_MV_STRING8, 0x8008) +#define PR_EMS_AB_IS_MEMBER_OF_DL_W PROP_TAG( PT_MV_UNICODE, 0x8008) +#define PR_EMS_AB_IS_MEMBER_OF_DL_O PROP_TAG( PT_OBJECT, 0x8008) +#define PR_EMS_AB_IS_MEMBER_OF_DL_T PROP_TAG( PT_MV_TSTRING, 0x8008) +#define PR_EMS_AB_IS_SINGLE_VALUED PROP_TAG( PT_BOOLEAN, 0x80C1) +#define PR_EMS_AB_KCC_STATUS PROP_TAG( PT_MV_BINARY, 0x80C2) +#define PR_EMS_AB_KM_SERVER PROP_TAG( PT_TSTRING, 0x800D) +#define PR_EMS_AB_KM_SERVER_A PROP_TAG( PT_STRING8, 0x800D) +#define PR_EMS_AB_KM_SERVER_W PROP_TAG( PT_UNICODE, 0x800D) +#define PR_EMS_AB_KM_SERVER_O PROP_TAG( PT_OBJECT, 0x800D) +#define PR_EMS_AB_KM_SERVER_T PROP_TAG( PT_TSTRING, 0x800D) +#define PR_EMS_AB_KNOWLEDGE_INFORMATION PROP_TAG( PT_MV_TSTRING, 0x80C3) +#define PR_EMS_AB_KNOWLEDGE_INFORMATION_A PROP_TAG( PT_MV_STRING8, 0x80C3) +#define PR_EMS_AB_KNOWLEDGE_INFORMATION_W PROP_TAG( PT_MV_UNICODE, 0x80C3) +#define PR_EMS_AB_LABELEDURI PROP_TAG( PT_TSTRING, 0x8C51) +#define PR_EMS_AB_LABELEDURI_A PROP_TAG( PT_STRING8, 0x8C51) +#define PR_EMS_AB_LABELEDURI_W PROP_TAG( PT_UNICODE, 0x8C51) +#define PR_EMS_AB_LANGUAGE PROP_TAG( PT_LONG, 0x8178) +#define PR_EMS_AB_LANGUAGE_ISO639 PROP_TAG( PT_TSTRING, 0x8C6C) +#define PR_EMS_AB_LANGUAGE_ISO639_A PROP_TAG( PT_STRING8, 0x8C6C) +#define PR_EMS_AB_LANGUAGE_ISO639_W PROP_TAG( PT_UNICODE, 0x8C6C) +#define PR_EMS_AB_LDAP_DISPLAY_NAME PROP_TAG( PT_MV_TSTRING, 0x8171) +#define PR_EMS_AB_LDAP_DISPLAY_NAME_A PROP_TAG( PT_MV_STRING8, 0x8171) +#define PR_EMS_AB_LDAP_DISPLAY_NAME_W PROP_TAG( PT_MV_UNICODE, 0x8171) +#define PR_EMS_AB_LDAP_SEARCH_CFG PROP_TAG( PT_LONG, 0x8C1D) +#define PR_EMS_AB_LINE_WRAP PROP_TAG( PT_LONG, 0x80C4) +#define PR_EMS_AB_LINK_ID PROP_TAG( PT_LONG, 0x80C5) +#define PR_EMS_AB_LIST_PUBLIC_FOLDERS PROP_TAG( PT_BOOLEAN, 0x8C50) +#define PR_EMS_AB_LOCAL_BRIDGE_HEAD PROP_TAG( PT_TSTRING, 0x80C6) +#define PR_EMS_AB_LOCAL_BRIDGE_HEAD_A PROP_TAG( PT_STRING8, 0x80C6) +#define PR_EMS_AB_LOCAL_BRIDGE_HEAD_W PROP_TAG( PT_UNICODE, 0x80C6) +#define PR_EMS_AB_LOCAL_BRIDGE_HEAD_ADDRESS PROP_TAG( PT_TSTRING, 0x80C7) +#define PR_EMS_AB_LOCAL_BRIDGE_HEAD_ADDRESS_A PROP_TAG( PT_STRING8, 0x80C7) +#define PR_EMS_AB_LOCAL_BRIDGE_HEAD_ADDRESS_W PROP_TAG( PT_UNICODE, 0x80C7) +#define PR_EMS_AB_LOCAL_INITIAL_TURN PROP_TAG( PT_BOOLEAN, 0x80C8) +#define PR_EMS_AB_LOCAL_SCOPE PROP_TAG( PT_MV_TSTRING, 0x80C9) +#define PR_EMS_AB_LOCAL_SCOPE_A PROP_TAG( PT_MV_STRING8, 0x80C9) +#define PR_EMS_AB_LOCAL_SCOPE_W PROP_TAG( PT_MV_UNICODE, 0x80C9) +#define PR_EMS_AB_LOCAL_SCOPE_O PROP_TAG( PT_OBJECT, 0x80C9) +#define PR_EMS_AB_LOCAL_SCOPE_T PROP_TAG( PT_MV_TSTRING, 0x80C9) +#define PR_EMS_AB_LOG_FILENAME PROP_TAG( PT_TSTRING, 0x80CA) +#define PR_EMS_AB_LOG_FILENAME_A PROP_TAG( PT_STRING8, 0x80CA) +#define PR_EMS_AB_LOG_FILENAME_W PROP_TAG( PT_UNICODE, 0x80CA) +#define PR_EMS_AB_LOG_ROLLOVER_INTERVAL PROP_TAG( PT_LONG, 0x80CB) +#define PR_EMS_AB_MAIL_DROP PROP_TAG( PT_TSTRING, 0x8C63) +#define PR_EMS_AB_MAIL_DROP_A PROP_TAG( PT_STRING8, 0x8C63) +#define PR_EMS_AB_MAIL_DROP_W PROP_TAG( PT_UNICODE, 0x8C63) +#define PR_EMS_AB_MAINTAIN_AUTOREPLY_HISTORY PROP_TAG( PT_BOOLEAN, 0x80CC) +#define PR_EMS_AB_MANAGER PROP_TAG( PT_OBJECT, 0x8005) +#define PR_EMS_AB_MANAGER_A PROP_TAG( PT_STRING8, 0x8005) +#define PR_EMS_AB_MANAGER_W PROP_TAG( PT_UNICODE, 0x8005) +#define PR_EMS_AB_MANAGER_O PROP_TAG( PT_OBJECT, 0x8005) +#define PR_EMS_AB_MANAGER_T PROP_TAG( PT_TSTRING, 0x8005) +#define PR_EMS_AB_MAPI_DISPLAY_TYPE PROP_TAG( PT_LONG, 0x80CD) +#define PR_EMS_AB_MAPI_ID PROP_TAG( PT_LONG, 0x80CE) +#define PR_EMS_AB_MAXIMUM_OBJECT_ID PROP_TAG( PT_BINARY, 0x8169) +#define PR_EMS_AB_MDB_BACKOFF_INTERVAL PROP_TAG( PT_LONG, 0x80CF) +#define PR_EMS_AB_MDB_MSG_TIME_OUT_PERIOD PROP_TAG( PT_LONG, 0x80D0) +#define PR_EMS_AB_MDB_OVER_QUOTA_LIMIT PROP_TAG( PT_LONG, 0x80D1) +#define PR_EMS_AB_MDB_STORAGE_QUOTA PROP_TAG( PT_LONG, 0x80D2) +#define PR_EMS_AB_MDB_UNREAD_LIMIT PROP_TAG( PT_LONG, 0x80D3) +#define PR_EMS_AB_MDB_USE_DEFAULTS PROP_TAG( PT_BOOLEAN, 0x80D4) +#define PR_EMS_AB_MEMBER PROP_TAG( PT_OBJECT, 0x8009) +#define PR_EMS_AB_MEMBER_A PROP_TAG( PT_MV_STRING8, 0x8009) +#define PR_EMS_AB_MEMBER_W PROP_TAG( PT_MV_UNICODE, 0x8009) +#define PR_EMS_AB_MEMBER_O PROP_TAG( PT_OBJECT, 0x8009) +#define PR_EMS_AB_MEMBER_T PROP_TAG( PT_MV_TSTRING, 0x8009) +#define PR_EMS_AB_MESSAGE_TRACKING_ENABLED PROP_TAG( PT_BOOLEAN, 0x80D5) +#define PR_EMS_AB_MIME_TYPES PROP_TAG( PT_BINARY, 0x8C1C) +#define PR_EMS_AB_MODERATED PROP_TAG( PT_BOOLEAN, 0x81AC) +#define PR_EMS_AB_MODERATOR PROP_TAG( PT_TSTRING, 0x8199) +#define PR_EMS_AB_MODERATOR_A PROP_TAG( PT_STRING8, 0x8199) +#define PR_EMS_AB_MODERATOR_W PROP_TAG( PT_UNICODE, 0x8199) +#define PR_EMS_AB_MONITOR_CLOCK PROP_TAG( PT_BOOLEAN, 0x80D6) +#define PR_EMS_AB_MONITOR_SERVERS PROP_TAG( PT_BOOLEAN, 0x80D7) +#define PR_EMS_AB_MONITOR_SERVICES PROP_TAG( PT_BOOLEAN, 0x80D8) +#define PR_EMS_AB_MONITORED_CONFIGURATIONS PROP_TAG( PT_MV_TSTRING, 0x80D9) +#define PR_EMS_AB_MONITORED_CONFIGURATIONS_A PROP_TAG( PT_MV_STRING8, 0x80D9) +#define PR_EMS_AB_MONITORED_CONFIGURATIONS_W PROP_TAG( PT_MV_UNICODE, 0x80D9) +#define PR_EMS_AB_MONITORED_CONFIGURATIONS_O PROP_TAG( PT_OBJECT, 0x80D9) +#define PR_EMS_AB_MONITORED_CONFIGURATIONS_T PROP_TAG( PT_MV_TSTRING, 0x80D9) +#define PR_EMS_AB_MONITORED_SERVERS PROP_TAG( PT_MV_TSTRING, 0x80DA) +#define PR_EMS_AB_MONITORED_SERVERS_A PROP_TAG( PT_MV_STRING8, 0x80DA) +#define PR_EMS_AB_MONITORED_SERVERS_W PROP_TAG( PT_MV_UNICODE, 0x80DA) +#define PR_EMS_AB_MONITORED_SERVERS_O PROP_TAG( PT_OBJECT, 0x80DA) +#define PR_EMS_AB_MONITORED_SERVERS_T PROP_TAG( PT_MV_TSTRING, 0x80DA) +#define PR_EMS_AB_MONITORED_SERVICES PROP_TAG( PT_MV_TSTRING, 0x80DB) +#define PR_EMS_AB_MONITORED_SERVICES_A PROP_TAG( PT_MV_STRING8, 0x80DB) +#define PR_EMS_AB_MONITORED_SERVICES_W PROP_TAG( PT_MV_UNICODE, 0x80DB) +#define PR_EMS_AB_MONITORING_ALERT_DELAY PROP_TAG( PT_LONG, 0x80DC) +#define PR_EMS_AB_MONITORING_ALERT_UNITS PROP_TAG( PT_LONG, 0x80DD) +#define PR_EMS_AB_MONITORING_AVAILABILITY_STYLE PROP_TAG( PT_LONG, 0x80DE) +#define PR_EMS_AB_MONITORING_AVAILABILITY_WINDOW PROP_TAG( PT_BINARY, 0x80DF) +#define PR_EMS_AB_MONITORING_CACHED_VIA_MAIL PROP_TAG( PT_MV_TSTRING, 0x80E0) +#define PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_A PROP_TAG( PT_MV_STRING8, 0x80E0) +#define PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_W PROP_TAG( PT_MV_UNICODE, 0x80E0) +#define PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_O PROP_TAG( PT_OBJECT, 0x80E0) +#define PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_T PROP_TAG( PT_MV_TSTRING, 0x80E0) +#define PR_EMS_AB_MONITORING_CACHED_VIA_RPC PROP_TAG( PT_MV_TSTRING, 0x80E1) +#define PR_EMS_AB_MONITORING_CACHED_VIA_RPC_A PROP_TAG( PT_MV_STRING8, 0x80E1) +#define PR_EMS_AB_MONITORING_CACHED_VIA_RPC_W PROP_TAG( PT_MV_UNICODE, 0x80E1) +#define PR_EMS_AB_MONITORING_CACHED_VIA_RPC_O PROP_TAG( PT_OBJECT, 0x80E1) +#define PR_EMS_AB_MONITORING_CACHED_VIA_RPC_T PROP_TAG( PT_MV_TSTRING, 0x80E1) +#define PR_EMS_AB_MONITORING_ESCALATION_PROCEDURE PROP_TAG( PT_MV_BINARY, 0x80E2) +#define PR_EMS_AB_MONITORING_HOTSITE_POLL_INTERVAL PROP_TAG( PT_LONG, 0x80E3) +#define PR_EMS_AB_MONITORING_HOTSITE_POLL_UNITS PROP_TAG( PT_LONG, 0x80E4) +#define PR_EMS_AB_MONITORING_MAIL_UPDATE_INTERVAL PROP_TAG( PT_LONG, 0x80E5) +#define PR_EMS_AB_MONITORING_MAIL_UPDATE_UNITS PROP_TAG( PT_LONG, 0x80E6) +#define PR_EMS_AB_MONITORING_NORMAL_POLL_INTERVAL PROP_TAG( PT_LONG, 0x80E7) +#define PR_EMS_AB_MONITORING_NORMAL_POLL_UNITS PROP_TAG( PT_LONG, 0x80E8) +#define PR_EMS_AB_MONITORING_RECIPIENTS PROP_TAG( PT_MV_TSTRING, 0x80E9) +#define PR_EMS_AB_MONITORING_RECIPIENTS_A PROP_TAG( PT_MV_STRING8, 0x80E9) +#define PR_EMS_AB_MONITORING_RECIPIENTS_W PROP_TAG( PT_MV_UNICODE, 0x80E9) +#define PR_EMS_AB_MONITORING_RECIPIENTS_O PROP_TAG( PT_OBJECT, 0x80E9) +#define PR_EMS_AB_MONITORING_RECIPIENTS_T PROP_TAG( PT_MV_TSTRING, 0x80E9) +#define PR_EMS_AB_MONITORING_RECIPIENTS_NDR PROP_TAG( PT_MV_TSTRING, 0x80EA) +#define PR_EMS_AB_MONITORING_RECIPIENTS_NDR_A PROP_TAG( PT_MV_STRING8, 0x80EA) +#define PR_EMS_AB_MONITORING_RECIPIENTS_NDR_W PROP_TAG( PT_MV_UNICODE, 0x80EA) +#define PR_EMS_AB_MONITORING_RECIPIENTS_NDR_O PROP_TAG( PT_OBJECT, 0x80EA) +#define PR_EMS_AB_MONITORING_RECIPIENTS_NDR_T PROP_TAG( PT_MV_TSTRING, 0x80EA) +#define PR_EMS_AB_MONITORING_RPC_UPDATE_INTERVAL PROP_TAG( PT_LONG, 0x80EB) +#define PR_EMS_AB_MONITORING_RPC_UPDATE_UNITS PROP_TAG( PT_LONG, 0x80EC) +#define PR_EMS_AB_MONITORING_WARNING_DELAY PROP_TAG( PT_LONG, 0x80ED) +#define PR_EMS_AB_MONITORING_WARNING_UNITS PROP_TAG( PT_LONG, 0x80EE) +#define PR_EMS_AB_MTA_LOCAL_CRED PROP_TAG( PT_TSTRING, 0x80EF) +#define PR_EMS_AB_MTA_LOCAL_CRED_A PROP_TAG( PT_STRING8, 0x80EF) +#define PR_EMS_AB_MTA_LOCAL_CRED_W PROP_TAG( PT_UNICODE, 0x80EF) +#define PR_EMS_AB_MTA_LOCAL_DESIG PROP_TAG( PT_TSTRING, 0x80F0) +#define PR_EMS_AB_MTA_LOCAL_DESIG_A PROP_TAG( PT_STRING8, 0x80F0) +#define PR_EMS_AB_MTA_LOCAL_DESIG_W PROP_TAG( PT_UNICODE, 0x80F0) +#define PR_EMS_AB_N_ADDRESS PROP_TAG( PT_BINARY, 0x80F1) +#define PR_EMS_AB_N_ADDRESS_TYPE PROP_TAG( PT_LONG, 0x80F2) +#define PR_EMS_AB_NETWORK_ADDRESS PROP_TAG( PT_MV_TSTRING, 0x8170) +#define PR_EMS_AB_NETWORK_ADDRESS_A PROP_TAG( PT_MV_STRING8, 0x8170) +#define PR_EMS_AB_NETWORK_ADDRESS_W PROP_TAG( PT_MV_UNICODE, 0x8170) +#define PR_EMS_AB_NEWSFEED_TYPE PROP_TAG( PT_LONG, 0x8194) +#define PR_EMS_AB_NEWSGROUP PROP_TAG( PT_TSTRING, 0x8198) +#define PR_EMS_AB_NEWSGROUP_A PROP_TAG( PT_STRING8, 0x8198) +#define PR_EMS_AB_NEWSGROUP_W PROP_TAG( PT_UNICODE, 0x8198) +#define PR_EMS_AB_NEWSGROUP_LIST PROP_TAG( PT_BINARY, 0x8196) +#define PR_EMS_AB_NNTP_CHARACTER_SET PROP_TAG( PT_TSTRING, 0x817D) +#define PR_EMS_AB_NNTP_CHARACTER_SET_A PROP_TAG( PT_STRING8, 0x817D) +#define PR_EMS_AB_NNTP_CHARACTER_SET_W PROP_TAG( PT_UNICODE, 0x817D) +#define PR_EMS_AB_NNTP_CONTENT_FORMAT PROP_TAG( PT_TSTRING, 0x8176) +#define PR_EMS_AB_NNTP_CONTENT_FORMAT_A PROP_TAG( PT_STRING8, 0x8176) +#define PR_EMS_AB_NNTP_CONTENT_FORMAT_W PROP_TAG( PT_UNICODE, 0x8176) +#define PR_EMS_AB_NNTP_DISTRIBUTIONS PROP_TAG( PT_MV_TSTRING, 0x8197) +#define PR_EMS_AB_NNTP_DISTRIBUTIONS_A PROP_TAG( PT_MV_STRING8, 0x8197) +#define PR_EMS_AB_NNTP_DISTRIBUTIONS_W PROP_TAG( PT_MV_UNICODE, 0x8197) +#define PR_EMS_AB_NNTP_DISTRIBUTIONS_FLAG PROP_TAG( PT_BOOLEAN, 0x81A4) +#define PR_EMS_AB_NNTP_NEWSFEEDS PROP_TAG( PT_MV_TSTRING, 0x81A6) +#define PR_EMS_AB_NNTP_NEWSFEEDS_A PROP_TAG( PT_MV_STRING8, 0x81A6) +#define PR_EMS_AB_NNTP_NEWSFEEDS_W PROP_TAG( PT_MV_UNICODE, 0x81A6) +#define PR_EMS_AB_NNTP_NEWSFEEDS_O PROP_TAG( PT_OBJECT, 0x81A6) +#define PR_EMS_AB_NNTP_NEWSFEEDS_T PROP_TAG( PT_MV_TSTRING, 0x81A6) +#define PR_EMS_AB_NT_MACHINE_NAME PROP_TAG( PT_TSTRING, 0x80F3) +#define PR_EMS_AB_NT_MACHINE_NAME_A PROP_TAG( PT_STRING8, 0x80F3) +#define PR_EMS_AB_NT_MACHINE_NAME_W PROP_TAG( PT_UNICODE, 0x80F3) +#define PR_EMS_AB_NT_SECURITY_DESCRIPTOR PROP_TAG( PT_BINARY, 0x8013) +#define PR_EMS_AB_NUM_OF_OPEN_RETRIES PROP_TAG( PT_LONG, 0x80F4) +#define PR_EMS_AB_NUM_OF_TRANSFER_RETRIES PROP_TAG( PT_LONG, 0x80F5) +#define PR_EMS_AB_OBJ_DIST_NAME PROP_TAG( PT_TSTRING, 0x803C) +#define PR_EMS_AB_OBJ_DIST_NAME_A PROP_TAG( PT_STRING8, 0x803C) +#define PR_EMS_AB_OBJ_DIST_NAME_W PROP_TAG( PT_UNICODE, 0x803C) +#define PR_EMS_AB_OBJ_DIST_NAME_O PROP_TAG( PT_OBJECT, 0x803C) +#define PR_EMS_AB_OBJ_DIST_NAME_T PROP_TAG( PT_TSTRING, 0x803C) +#define PR_EMS_AB_OBJ_VIEW_CONTAINERS PROP_TAG( PT_MV_TSTRING, 0x81C7) +#define PR_EMS_AB_OBJ_VIEW_CONTAINERS_A PROP_TAG( PT_MV_STRING8, 0x81C7) +#define PR_EMS_AB_OBJ_VIEW_CONTAINERS_W PROP_TAG( PT_MV_UNICODE, 0x81C7) +#define PR_EMS_AB_OBJ_VIEW_CONTAINERS_O PROP_TAG( PT_OBJECT, 0x81C7) +#define PR_EMS_AB_OBJ_VIEW_CONTAINERS_T PROP_TAG( PT_MV_TSTRING, 0x81C7) +#define PR_EMS_AB_OBJECT_CLASS_CATEGORY PROP_TAG( PT_LONG, 0x80F6) +#define PR_EMS_AB_OBJECT_GUID PROP_TAG( PT_BINARY, 0x8C6D) +#define PR_EMS_AB_OBJECT_VERSION PROP_TAG( PT_LONG, 0x80F7) +#define PR_EMS_AB_OFF_LINE_AB_CONTAINERS PROP_TAG( PT_MV_TSTRING, 0x80F8) +#define PR_EMS_AB_OFF_LINE_AB_CONTAINERS_A PROP_TAG( PT_MV_STRING8, 0x80F8) +#define PR_EMS_AB_OFF_LINE_AB_CONTAINERS_W PROP_TAG( PT_MV_UNICODE, 0x80F8) +#define PR_EMS_AB_OFF_LINE_AB_CONTAINERS_O PROP_TAG( PT_OBJECT, 0x80F8) +#define PR_EMS_AB_OFF_LINE_AB_CONTAINERS_T PROP_TAG( PT_MV_TSTRING, 0x80F8) +#define PR_EMS_AB_OFF_LINE_AB_SCHEDULE PROP_TAG( PT_BINARY, 0x80F9) +#define PR_EMS_AB_OFF_LINE_AB_SERVER PROP_TAG( PT_TSTRING, 0x80FA) +#define PR_EMS_AB_OFF_LINE_AB_SERVER_A PROP_TAG( PT_STRING8, 0x80FA) +#define PR_EMS_AB_OFF_LINE_AB_SERVER_W PROP_TAG( PT_UNICODE, 0x80FA) +#define PR_EMS_AB_OFF_LINE_AB_SERVER_O PROP_TAG( PT_OBJECT, 0x80FA) +#define PR_EMS_AB_OFF_LINE_AB_SERVER_T PROP_TAG( PT_TSTRING, 0x80FA) +#define PR_EMS_AB_OFF_LINE_AB_STYLE PROP_TAG( PT_LONG, 0x80FB) +#define PR_EMS_AB_OID_TYPE PROP_TAG( PT_LONG, 0x80FC) +#define PR_EMS_AB_OM_OBJECT_CLASS PROP_TAG( PT_BINARY, 0x80FD) +#define PR_EMS_AB_OM_SYNTAX PROP_TAG( PT_LONG, 0x80FE) +#define PR_EMS_AB_OOF_REPLY_TO_ORIGINATOR PROP_TAG( PT_BOOLEAN, 0x80FF) +#define PR_EMS_AB_OPEN_RETRY_INTERVAL PROP_TAG( PT_LONG, 0x8100) +#define PR_EMS_AB_ORGANIZATION_NAME PROP_TAG( PT_MV_TSTRING, 0x8101) +#define PR_EMS_AB_ORGANIZATION_NAME_A PROP_TAG( PT_MV_STRING8, 0x8101) +#define PR_EMS_AB_ORGANIZATION_NAME_W PROP_TAG( PT_MV_UNICODE, 0x8101) +#define PR_EMS_AB_ORGANIZATIONAL_UNIT_NAME PROP_TAG( PT_MV_TSTRING, 0x8102) +#define PR_EMS_AB_ORGANIZATIONAL_UNIT_NAME_A PROP_TAG( PT_MV_STRING8, 0x8102) +#define PR_EMS_AB_ORGANIZATIONAL_UNIT_NAME_W PROP_TAG( PT_MV_UNICODE, 0x8102) +#define PR_EMS_AB_ORIGINAL_DISPLAY_TABLE PROP_TAG( PT_BINARY, 0x8103) +#define PR_EMS_AB_ORIGINAL_DISPLAY_TABLE_MSDOS PROP_TAG( PT_BINARY, 0x8104) +#define PR_EMS_AB_OUTBOUND_HOST PROP_TAG( PT_BINARY, 0x818D) +#define PR_EMS_AB_OUTBOUND_HOST_TYPE PROP_TAG( PT_BOOLEAN, 0x81B0) +#define PR_EMS_AB_OUTBOUND_NEWSFEED PROP_TAG( PT_TSTRING, 0x8195) +#define PR_EMS_AB_OUTBOUND_NEWSFEED_A PROP_TAG( PT_STRING8, 0x8195) +#define PR_EMS_AB_OUTBOUND_NEWSFEED_W PROP_TAG( PT_UNICODE, 0x8195) +#define PR_EMS_AB_OUTBOUND_SITES PROP_TAG( PT_MV_TSTRING, 0x8105) +#define PR_EMS_AB_OUTBOUND_SITES_A PROP_TAG( PT_MV_STRING8, 0x8105) +#define PR_EMS_AB_OUTBOUND_SITES_W PROP_TAG( PT_MV_UNICODE, 0x8105) +#define PR_EMS_AB_OUTBOUND_SITES_O PROP_TAG( PT_OBJECT, 0x8105) +#define PR_EMS_AB_OUTBOUND_SITES_T PROP_TAG( PT_MV_TSTRING, 0x8105) +#define PR_EMS_AB_OUTGOING_MSG_SIZE_LIMIT PROP_TAG( PT_LONG, 0x818F) +#define PR_EMS_AB_OVERRIDE_NNTP_CONTENT_FORMAT PROP_TAG( PT_BOOLEAN, 0x81C6) +#define PR_EMS_AB_OWA_SERVER PROP_TAG( PT_TSTRING, 0x8C66) +#define PR_EMS_AB_OWA_SERVER_A PROP_TAG( PT_STRING8, 0x8C66) +#define PR_EMS_AB_OWA_SERVER_W PROP_TAG( PT_UNICODE, 0x8C66) +#define PR_EMS_AB_OWNER PROP_TAG( PT_TSTRING, 0x800C) +#define PR_EMS_AB_OWNER_A PROP_TAG( PT_STRING8, 0x800C) +#define PR_EMS_AB_OWNER_W PROP_TAG( PT_UNICODE, 0x800C) +#define PR_EMS_AB_OWNER_O PROP_TAG( PT_OBJECT, 0x800C) +#define PR_EMS_AB_OWNER_T PROP_TAG( PT_TSTRING, 0x800C) +#define PR_EMS_AB_OWNER_BL PROP_TAG( PT_MV_TSTRING, 0x8024) +#define PR_EMS_AB_OWNER_BL_A PROP_TAG( PT_MV_STRING8, 0x8024) +#define PR_EMS_AB_OWNER_BL_W PROP_TAG( PT_MV_UNICODE, 0x8024) +#define PR_EMS_AB_OWNER_BL_O PROP_TAG( PT_OBJECT, 0x8024) +#define PR_EMS_AB_OWNER_BL_T PROP_TAG( PT_MV_TSTRING, 0x8024) +#define PR_EMS_AB_P_SELECTOR PROP_TAG( PT_BINARY, 0x8106) +#define PR_EMS_AB_P_SELECTOR_INBOUND PROP_TAG( PT_BINARY, 0x8107) +#define PR_EMS_AB_PER_MSG_DIALOG_DISPLAY_TABLE PROP_TAG( PT_BINARY, 0x8108) +#define PR_EMS_AB_PER_RECIP_DIALOG_DISPLAY_TABLE PROP_TAG( PT_BINARY, 0x8109) +#define PR_EMS_AB_PERIOD_REP_SYNC_TIMES PROP_TAG( PT_BINARY, 0x810A) +#define PR_EMS_AB_PERIOD_REPL_STAGGER PROP_TAG( PT_LONG, 0x810B) +#define PR_EMS_AB_PERSONAL_TITLE PROP_TAG( PT_TSTRING, 0x8C6B) +#define PR_EMS_AB_PERSONAL_TITLE_A PROP_TAG( PT_STRING8, 0x8C6B) +#define PR_EMS_AB_PERSONAL_TITLE_W PROP_TAG( PT_UNICODE, 0x8C6B) +#define PR_EMS_AB_PF_CONTACTS PROP_TAG( PT_MV_TSTRING, 0x8038) +#define PR_EMS_AB_PF_CONTACTS_A PROP_TAG( PT_MV_STRING8, 0x8038) +#define PR_EMS_AB_PF_CONTACTS_W PROP_TAG( PT_MV_UNICODE, 0x8038) +#define PR_EMS_AB_PF_CONTACTS_O PROP_TAG( PT_OBJECT, 0x8038) +#define PR_EMS_AB_PF_CONTACTS_T PROP_TAG( PT_MV_TSTRING, 0x8038) +#define PR_EMS_AB_POP_CHARACTER_SET PROP_TAG( PT_TSTRING, 0x8179) +#define PR_EMS_AB_POP_CHARACTER_SET_A PROP_TAG( PT_STRING8, 0x8179) +#define PR_EMS_AB_POP_CHARACTER_SET_W PROP_TAG( PT_UNICODE, 0x8179) +#define PR_EMS_AB_POP_CONTENT_FORMAT PROP_TAG( PT_TSTRING, 0x8177) +#define PR_EMS_AB_POP_CONTENT_FORMAT_A PROP_TAG( PT_STRING8, 0x8177) +#define PR_EMS_AB_POP_CONTENT_FORMAT_W PROP_TAG( PT_UNICODE, 0x8177) +#define PR_EMS_AB_PORT_NUMBER PROP_TAG( PT_LONG, 0x81B5) +#define PR_EMS_AB_POSTAL_ADDRESS PROP_TAG( PT_MV_BINARY, 0x810C) +#define PR_EMS_AB_PREFERRED_DELIVERY_METHOD PROP_TAG( PT_MV_LONG, 0x810D) +#define PR_EMS_AB_PRESERVE_INTERNET_CONTENT PROP_TAG( PT_BOOLEAN, 0x8C22) +#define PR_EMS_AB_PRMD PROP_TAG( PT_TSTRING, 0x810E) +#define PR_EMS_AB_PRMD_A PROP_TAG( PT_STRING8, 0x810E) +#define PR_EMS_AB_PRMD_W PROP_TAG( PT_UNICODE, 0x810E) +#define PR_EMS_AB_PROMO_EXPIRATION PROP_TAG( PT_SYSTIME, 0x81C2) +#define PR_EMS_AB_PROTOCOL_SETTINGS PROP_TAG( PT_MV_TSTRING, 0x81B6) +#define PR_EMS_AB_PROTOCOL_SETTINGS_A PROP_TAG( PT_MV_STRING8, 0x81B6) +#define PR_EMS_AB_PROTOCOL_SETTINGS_W PROP_TAG( PT_MV_UNICODE, 0x81B6) +#define PR_EMS_AB_PROXY_ADDRESSES PROP_TAG( PT_MV_TSTRING, 0x800F) +#define PR_EMS_AB_PROXY_ADDRESSES_A PROP_TAG( PT_MV_STRING8, 0x800F) +#define PR_EMS_AB_PROXY_ADDRESSES_W PROP_TAG( PT_MV_UNICODE, 0x800F) +#define PR_EMS_AB_PROXY_GENERATION_ENABLED PROP_TAG( PT_BOOLEAN, 0x81B1) +#define PR_EMS_AB_PROXY_GENERATOR_DLL PROP_TAG( PT_TSTRING, 0x810F) +#define PR_EMS_AB_PROXY_GENERATOR_DLL_A PROP_TAG( PT_STRING8, 0x810F) +#define PR_EMS_AB_PROXY_GENERATOR_DLL_W PROP_TAG( PT_UNICODE, 0x810F) +#define PR_EMS_AB_PUBLIC_DELEGATES PROP_TAG( PT_OBJECT, 0x8015) +#define PR_EMS_AB_PUBLIC_DELEGATES_A PROP_TAG( PT_MV_STRING8, 0x8015) +#define PR_EMS_AB_PUBLIC_DELEGATES_W PROP_TAG( PT_MV_UNICODE, 0x8015) +#define PR_EMS_AB_PUBLIC_DELEGATES_O PROP_TAG( PT_OBJECT, 0x8015) +#define PR_EMS_AB_PUBLIC_DELEGATES_T PROP_TAG( PT_MV_TSTRING, 0x8015) +#define PR_EMS_AB_PUBLIC_DELEGATES_BL PROP_TAG( PT_MV_TSTRING, 0x8110) +#define PR_EMS_AB_PUBLIC_DELEGATES_BL_A PROP_TAG( PT_MV_STRING8, 0x8110) +#define PR_EMS_AB_PUBLIC_DELEGATES_BL_W PROP_TAG( PT_MV_UNICODE, 0x8110) +#define PR_EMS_AB_PUBLIC_DELEGATES_BL_O PROP_TAG( PT_OBJECT, 0x8110) +#define PR_EMS_AB_PUBLIC_DELEGATES_BL_T PROP_TAG( PT_MV_TSTRING, 0x8110) +#define PR_EMS_AB_QUOTA_NOTIFICATION_SCHEDULE PROP_TAG( PT_BINARY, 0x8111) +#define PR_EMS_AB_QUOTA_NOTIFICATION_STYLE PROP_TAG( PT_LONG, 0x8112) +#define PR_EMS_AB_RANGE_LOWER PROP_TAG( PT_LONG, 0x8113) +#define PR_EMS_AB_RANGE_UPPER PROP_TAG( PT_LONG, 0x8114) +#define PR_EMS_AB_RAS_ACCOUNT PROP_TAG( PT_TSTRING, 0x81AD) +#define PR_EMS_AB_RAS_ACCOUNT_A PROP_TAG( PT_STRING8, 0x81AD) +#define PR_EMS_AB_RAS_ACCOUNT_W PROP_TAG( PT_UNICODE, 0x81AD) +#define PR_EMS_AB_RAS_CALLBACK_NUMBER PROP_TAG( PT_TSTRING, 0x8115) +#define PR_EMS_AB_RAS_CALLBACK_NUMBER_A PROP_TAG( PT_STRING8, 0x8115) +#define PR_EMS_AB_RAS_CALLBACK_NUMBER_W PROP_TAG( PT_UNICODE, 0x8115) +#define PR_EMS_AB_RAS_PASSWORD PROP_TAG( PT_BINARY, 0x81AE) +#define PR_EMS_AB_RAS_PHONE_NUMBER PROP_TAG( PT_TSTRING, 0x8116) +#define PR_EMS_AB_RAS_PHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x8116) +#define PR_EMS_AB_RAS_PHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x8116) +#define PR_EMS_AB_RAS_PHONEBOOK_ENTRY_NAME PROP_TAG( PT_TSTRING, 0x8117) +#define PR_EMS_AB_RAS_PHONEBOOK_ENTRY_NAME_A PROP_TAG( PT_STRING8, 0x8117) +#define PR_EMS_AB_RAS_PHONEBOOK_ENTRY_NAME_W PROP_TAG( PT_UNICODE, 0x8117) +#define PR_EMS_AB_RAS_REMOTE_SRVR_NAME PROP_TAG( PT_TSTRING, 0x8118) +#define PR_EMS_AB_RAS_REMOTE_SRVR_NAME_A PROP_TAG( PT_STRING8, 0x8118) +#define PR_EMS_AB_RAS_REMOTE_SRVR_NAME_W PROP_TAG( PT_UNICODE, 0x8118) +#define PR_EMS_AB_REFERRAL_LIST PROP_TAG( PT_MV_TSTRING, 0x81A3) +#define PR_EMS_AB_REFERRAL_LIST_A PROP_TAG( PT_MV_STRING8, 0x81A3) +#define PR_EMS_AB_REFERRAL_LIST_W PROP_TAG( PT_MV_UNICODE, 0x81A3) +#define PR_EMS_AB_REGISTERED_ADDRESS PROP_TAG( PT_MV_BINARY, 0x8119) +#define PR_EMS_AB_REMOTE_BRIDGE_HEAD PROP_TAG( PT_TSTRING, 0x811A) +#define PR_EMS_AB_REMOTE_BRIDGE_HEAD_A PROP_TAG( PT_STRING8, 0x811A) +#define PR_EMS_AB_REMOTE_BRIDGE_HEAD_W PROP_TAG( PT_UNICODE, 0x811A) +#define PR_EMS_AB_REMOTE_BRIDGE_HEAD_ADDRESS PROP_TAG( PT_TSTRING, 0x811B) +#define PR_EMS_AB_REMOTE_BRIDGE_HEAD_ADDRESS_A PROP_TAG( PT_STRING8, 0x811B) +#define PR_EMS_AB_REMOTE_BRIDGE_HEAD_ADDRESS_W PROP_TAG( PT_UNICODE, 0x811B) +#define PR_EMS_AB_REMOTE_OUT_BH_SERVER PROP_TAG( PT_TSTRING, 0x811C) +#define PR_EMS_AB_REMOTE_OUT_BH_SERVER_A PROP_TAG( PT_STRING8, 0x811C) +#define PR_EMS_AB_REMOTE_OUT_BH_SERVER_W PROP_TAG( PT_UNICODE, 0x811C) +#define PR_EMS_AB_REMOTE_OUT_BH_SERVER_O PROP_TAG( PT_OBJECT, 0x811C) +#define PR_EMS_AB_REMOTE_OUT_BH_SERVER_T PROP_TAG( PT_TSTRING, 0x811C) +#define PR_EMS_AB_REMOTE_SITE PROP_TAG( PT_TSTRING, 0x811D) +#define PR_EMS_AB_REMOTE_SITE_A PROP_TAG( PT_STRING8, 0x811D) +#define PR_EMS_AB_REMOTE_SITE_W PROP_TAG( PT_UNICODE, 0x811D) +#define PR_EMS_AB_REMOTE_SITE_O PROP_TAG( PT_OBJECT, 0x811D) +#define PR_EMS_AB_REMOTE_SITE_T PROP_TAG( PT_TSTRING, 0x811D) +#define PR_EMS_AB_REPLICATED_OBJECT_VERSION PROP_TAG( PT_LONG, 0x8C62) +#define PR_EMS_AB_REPLICATION_MAIL_MSG_SIZE PROP_TAG( PT_LONG, 0x8168) +#define PR_EMS_AB_REPLICATION_SENSITIVITY PROP_TAG( PT_LONG, 0x811E) +#define PR_EMS_AB_REPLICATION_SIGNATURE PROP_TAG( PT_BINARY, 0x8C6E) +#define PR_EMS_AB_REPLICATION_STAGGER PROP_TAG( PT_LONG, 0x811F) +#define PR_EMS_AB_REPORT_TO_ORIGINATOR PROP_TAG( PT_BOOLEAN, 0x8120) +#define PR_EMS_AB_REPORT_TO_OWNER PROP_TAG( PT_BOOLEAN, 0x8121) +#define PR_EMS_AB_REPORTS PROP_TAG( PT_OBJECT, 0x800E) +#define PR_EMS_AB_REPORTS_A PROP_TAG( PT_MV_STRING8, 0x800E) +#define PR_EMS_AB_REPORTS_W PROP_TAG( PT_MV_UNICODE, 0x800E) +#define PR_EMS_AB_REPORTS_O PROP_TAG( PT_OBJECT, 0x800E) +#define PR_EMS_AB_REPORTS_T PROP_TAG( PT_MV_TSTRING, 0x800E) +#define PR_EMS_AB_REQ_SEQ PROP_TAG( PT_LONG, 0x8122) +#define PR_EMS_AB_REQUIRE_SSL PROP_TAG( PT_BOOLEAN, 0x8C25) +#define PR_EMS_AB_RESPONSIBLE_LOCAL_DXA PROP_TAG( PT_TSTRING, 0x8123) +#define PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_A PROP_TAG( PT_STRING8, 0x8123) +#define PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_W PROP_TAG( PT_UNICODE, 0x8123) +#define PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_O PROP_TAG( PT_OBJECT, 0x8123) +#define PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_T PROP_TAG( PT_TSTRING, 0x8123) +#define PR_EMS_AB_RETURN_EXACT_MSG_SIZE PROP_TAG( PT_BOOLEAN, 0x8C52) +#define PR_EMS_AB_RID_SERVER PROP_TAG( PT_TSTRING, 0x8124) +#define PR_EMS_AB_RID_SERVER_A PROP_TAG( PT_STRING8, 0x8124) +#define PR_EMS_AB_RID_SERVER_W PROP_TAG( PT_UNICODE, 0x8124) +#define PR_EMS_AB_RID_SERVER_O PROP_TAG( PT_OBJECT, 0x8124) +#define PR_EMS_AB_RID_SERVER_T PROP_TAG( PT_TSTRING, 0x8124) +#define PR_EMS_AB_ROLE_OCCUPANT PROP_TAG( PT_MV_TSTRING, 0x8125) +#define PR_EMS_AB_ROLE_OCCUPANT_A PROP_TAG( PT_MV_STRING8, 0x8125) +#define PR_EMS_AB_ROLE_OCCUPANT_W PROP_TAG( PT_MV_UNICODE, 0x8125) +#define PR_EMS_AB_ROLE_OCCUPANT_O PROP_TAG( PT_OBJECT, 0x8125) +#define PR_EMS_AB_ROLE_OCCUPANT_T PROP_TAG( PT_MV_TSTRING, 0x8125) +#define PR_EMS_AB_ROOT_NEWSGROUPS_FOLDER_ID PROP_TAG( PT_BINARY, 0x81B2) +#define PR_EMS_AB_ROUTING_LIST PROP_TAG( PT_MV_TSTRING, 0x8126) +#define PR_EMS_AB_ROUTING_LIST_A PROP_TAG( PT_MV_STRING8, 0x8126) +#define PR_EMS_AB_ROUTING_LIST_W PROP_TAG( PT_MV_UNICODE, 0x8126) +#define PR_EMS_AB_RTS_CHECKPOINT_SIZE PROP_TAG( PT_LONG, 0x8127) +#define PR_EMS_AB_RTS_RECOVERY_TIMEOUT PROP_TAG( PT_LONG, 0x8128) +#define PR_EMS_AB_RTS_WINDOW_SIZE PROP_TAG( PT_LONG, 0x8129) +#define PR_EMS_AB_RUNS_ON PROP_TAG( PT_MV_TSTRING, 0x812A) +#define PR_EMS_AB_RUNS_ON_A PROP_TAG( PT_MV_STRING8, 0x812A) +#define PR_EMS_AB_RUNS_ON_W PROP_TAG( PT_MV_UNICODE, 0x812A) +#define PR_EMS_AB_RUNS_ON_O PROP_TAG( PT_OBJECT, 0x812A) +#define PR_EMS_AB_RUNS_ON_T PROP_TAG( PT_MV_TSTRING, 0x812A) +#define PR_EMS_AB_S_SELECTOR PROP_TAG( PT_BINARY, 0x812B) +#define PR_EMS_AB_S_SELECTOR_INBOUND PROP_TAG( PT_BINARY, 0x812C) +#define PR_EMS_AB_SCHEMA_FLAGS PROP_TAG( PT_LONG, 0x8173) +#define PR_EMS_AB_SCHEMA_VERSION PROP_TAG( PT_MV_LONG, 0x817C) +#define PR_EMS_AB_SEARCH_FLAGS PROP_TAG( PT_LONG, 0x812D) +#define PR_EMS_AB_SEARCH_GUIDE PROP_TAG( PT_MV_BINARY, 0x812E) +#define PR_EMS_AB_SECURITY_POLICY PROP_TAG( PT_MV_BINARY, 0x8C47) +#define PR_EMS_AB_SECURITY_PROTOCOL PROP_TAG( PT_MV_BINARY, 0x8037) +#define PR_EMS_AB_SEE_ALSO PROP_TAG( PT_MV_TSTRING, 0x812F) +#define PR_EMS_AB_SEE_ALSO_A PROP_TAG( PT_MV_STRING8, 0x812F) +#define PR_EMS_AB_SEE_ALSO_W PROP_TAG( PT_MV_UNICODE, 0x812F) +#define PR_EMS_AB_SEE_ALSO_O PROP_TAG( PT_OBJECT, 0x812F) +#define PR_EMS_AB_SEE_ALSO_T PROP_TAG( PT_MV_TSTRING, 0x812F) +#define PR_EMS_AB_SEND_EMAIL_MESSAGE PROP_TAG( PT_BOOLEAN, 0x8C31) +#define PR_EMS_AB_SEND_TNEF PROP_TAG( PT_BOOLEAN, 0x8191) +#define PR_EMS_AB_SERIAL_NUMBER PROP_TAG( PT_MV_TSTRING, 0x8130) +#define PR_EMS_AB_SERIAL_NUMBER_A PROP_TAG( PT_MV_STRING8, 0x8130) +#define PR_EMS_AB_SERIAL_NUMBER_W PROP_TAG( PT_MV_UNICODE, 0x8130) +#define PR_EMS_AB_SERVICE_ACTION_FIRST PROP_TAG( PT_LONG, 0x8131) +#define PR_EMS_AB_SERVICE_ACTION_OTHER PROP_TAG( PT_LONG, 0x8132) +#define PR_EMS_AB_SERVICE_ACTION_SECOND PROP_TAG( PT_LONG, 0x8133) +#define PR_EMS_AB_SERVICE_RESTART_DELAY PROP_TAG( PT_LONG, 0x8134) +#define PR_EMS_AB_SERVICE_RESTART_MESSAGE PROP_TAG( PT_TSTRING, 0x8135) +#define PR_EMS_AB_SERVICE_RESTART_MESSAGE_A PROP_TAG( PT_STRING8, 0x8135) +#define PR_EMS_AB_SERVICE_RESTART_MESSAGE_W PROP_TAG( PT_UNICODE, 0x8135) +#define PR_EMS_AB_SESSION_DISCONNECT_TIMER PROP_TAG( PT_LONG, 0x8136) +#define PR_EMS_AB_SITE_AFFINITY PROP_TAG( PT_MV_TSTRING, 0x8137) +#define PR_EMS_AB_SITE_AFFINITY_A PROP_TAG( PT_MV_STRING8, 0x8137) +#define PR_EMS_AB_SITE_AFFINITY_W PROP_TAG( PT_MV_UNICODE, 0x8137) +#define PR_EMS_AB_SITE_FOLDER_GUID PROP_TAG( PT_BINARY, 0x8166) +#define PR_EMS_AB_SITE_FOLDER_SERVER PROP_TAG( PT_TSTRING, 0x8167) +#define PR_EMS_AB_SITE_FOLDER_SERVER_A PROP_TAG( PT_STRING8, 0x8167) +#define PR_EMS_AB_SITE_FOLDER_SERVER_W PROP_TAG( PT_UNICODE, 0x8167) +#define PR_EMS_AB_SITE_FOLDER_SERVER_O PROP_TAG( PT_OBJECT, 0x8167) +#define PR_EMS_AB_SITE_FOLDER_SERVER_T PROP_TAG( PT_TSTRING, 0x8167) +#define PR_EMS_AB_SITE_PROXY_SPACE PROP_TAG( PT_MV_TSTRING, 0x8138) +#define PR_EMS_AB_SITE_PROXY_SPACE_A PROP_TAG( PT_MV_STRING8, 0x8138) +#define PR_EMS_AB_SITE_PROXY_SPACE_W PROP_TAG( PT_MV_UNICODE, 0x8138) +#define PR_EMS_AB_SMIME_ALG_LIST_NA PROP_TAG( PT_MV_TSTRING, 0x8C33) +#define PR_EMS_AB_SMIME_ALG_LIST_NA_A PROP_TAG( PT_MV_STRING8, 0x8C33) +#define PR_EMS_AB_SMIME_ALG_LIST_NA_W PROP_TAG( PT_MV_UNICODE, 0x8C33) +#define PR_EMS_AB_SMIME_ALG_LIST_OTHER PROP_TAG( PT_MV_TSTRING, 0x8C34) +#define PR_EMS_AB_SMIME_ALG_LIST_OTHER_A PROP_TAG( PT_MV_STRING8, 0x8C34) +#define PR_EMS_AB_SMIME_ALG_LIST_OTHER_W PROP_TAG( PT_MV_UNICODE, 0x8C34) +#define PR_EMS_AB_SMIME_ALG_SELECTED_NA PROP_TAG( PT_TSTRING, 0x8C35) +#define PR_EMS_AB_SMIME_ALG_SELECTED_NA_A PROP_TAG( PT_STRING8, 0x8C35) +#define PR_EMS_AB_SMIME_ALG_SELECTED_NA_W PROP_TAG( PT_UNICODE, 0x8C35) +#define PR_EMS_AB_SMIME_ALG_SELECTED_OTHER PROP_TAG( PT_TSTRING, 0x8C36) +#define PR_EMS_AB_SMIME_ALG_SELECTED_OTHER_A PROP_TAG( PT_STRING8, 0x8C36) +#define PR_EMS_AB_SMIME_ALG_SELECTED_OTHER_W PROP_TAG( PT_UNICODE, 0x8C36) +#define PR_EMS_AB_SPACE_LAST_COMPUTED PROP_TAG( PT_SYSTIME, 0x8139) +#define PR_EMS_AB_STREET_ADDRESS PROP_TAG( PT_TSTRING, 0x813A) +#define PR_EMS_AB_STREET_ADDRESS_A PROP_TAG( PT_STRING8, 0x813A) +#define PR_EMS_AB_STREET_ADDRESS_W PROP_TAG( PT_UNICODE, 0x813A) +#define PR_EMS_AB_SUB_REFS PROP_TAG( PT_MV_TSTRING, 0x813B) +#define PR_EMS_AB_SUB_REFS_A PROP_TAG( PT_MV_STRING8, 0x813B) +#define PR_EMS_AB_SUB_REFS_W PROP_TAG( PT_MV_UNICODE, 0x813B) +#define PR_EMS_AB_SUB_REFS_O PROP_TAG( PT_OBJECT, 0x813B) +#define PR_EMS_AB_SUB_REFS_T PROP_TAG( PT_MV_TSTRING, 0x813B) +#define PR_EMS_AB_SUB_SITE PROP_TAG( PT_TSTRING, 0x817B) +#define PR_EMS_AB_SUB_SITE_A PROP_TAG( PT_STRING8, 0x817B) +#define PR_EMS_AB_SUB_SITE_W PROP_TAG( PT_UNICODE, 0x817B) +#define PR_EMS_AB_SUBMISSION_CONT_LENGTH PROP_TAG( PT_LONG, 0x813C) +#define PR_EMS_AB_SUPPORT_SMIME_SIGNATURES PROP_TAG( PT_BOOLEAN, 0x8C48) +#define PR_EMS_AB_SUPPORTED_ALGORITHMS PROP_TAG( PT_BINARY, 0x8C55) +#define PR_EMS_AB_SUPPORTED_APPLICATION_CONTEXT PROP_TAG( PT_MV_BINARY, 0x813D) +#define PR_EMS_AB_SUPPORTING_STACK PROP_TAG( PT_MV_TSTRING, 0x813E) +#define PR_EMS_AB_SUPPORTING_STACK_A PROP_TAG( PT_MV_STRING8, 0x813E) +#define PR_EMS_AB_SUPPORTING_STACK_W PROP_TAG( PT_MV_UNICODE, 0x813E) +#define PR_EMS_AB_SUPPORTING_STACK_O PROP_TAG( PT_OBJECT, 0x813E) +#define PR_EMS_AB_SUPPORTING_STACK_T PROP_TAG( PT_MV_TSTRING, 0x813E) +#define PR_EMS_AB_SUPPORTING_STACK_BL PROP_TAG( PT_MV_TSTRING, 0x813F) +#define PR_EMS_AB_SUPPORTING_STACK_BL_A PROP_TAG( PT_MV_STRING8, 0x813F) +#define PR_EMS_AB_SUPPORTING_STACK_BL_W PROP_TAG( PT_MV_UNICODE, 0x813F) +#define PR_EMS_AB_SUPPORTING_STACK_BL_O PROP_TAG( PT_OBJECT, 0x813F) +#define PR_EMS_AB_SUPPORTING_STACK_BL_T PROP_TAG( PT_MV_TSTRING, 0x813F) +#define PR_EMS_AB_T_SELECTOR PROP_TAG( PT_BINARY, 0x8140) +#define PR_EMS_AB_T_SELECTOR_INBOUND PROP_TAG( PT_BINARY, 0x8141) +#define PR_EMS_AB_TARGET_ADDRESS PROP_TAG( PT_TSTRING, 0x8011) +#define PR_EMS_AB_TARGET_ADDRESS_A PROP_TAG( PT_STRING8, 0x8011) +#define PR_EMS_AB_TARGET_ADDRESS_W PROP_TAG( PT_UNICODE, 0x8011) +#define PR_EMS_AB_TARGET_MTAS PROP_TAG( PT_MV_TSTRING, 0x8142) +#define PR_EMS_AB_TARGET_MTAS_A PROP_TAG( PT_MV_STRING8, 0x8142) +#define PR_EMS_AB_TARGET_MTAS_W PROP_TAG( PT_MV_UNICODE, 0x8142) +#define PR_EMS_AB_TELEPHONE_NUMBER PROP_TAG( PT_MV_TSTRING, 0x8012) +#define PR_EMS_AB_TELEPHONE_NUMBER_A PROP_TAG( PT_MV_STRING8, 0x8012) +#define PR_EMS_AB_TELEPHONE_NUMBER_W PROP_TAG( PT_MV_UNICODE, 0x8012) +#define PR_EMS_AB_TELEPHONE_PERSONAL_PAGER PROP_TAG( PT_TSTRING, 0x8C68) +#define PR_EMS_AB_TELEPHONE_PERSONAL_PAGER_A PROP_TAG( PT_STRING8, 0x8C68) +#define PR_EMS_AB_TELEPHONE_PERSONAL_PAGER_W PROP_TAG( PT_UNICODE, 0x8C68) +#define PR_EMS_AB_TELETEX_TERMINAL_IDENTIFIER PROP_TAG( PT_MV_BINARY, 0x8143) +#define PR_EMS_AB_TEMP_ASSOC_THRESHOLD PROP_TAG( PT_LONG, 0x8144) +#define PR_EMS_AB_TOMBSTONE_LIFETIME PROP_TAG( PT_LONG, 0x8145) +#define PR_EMS_AB_TRACKING_LOG_PATH_NAME PROP_TAG( PT_TSTRING, 0x8146) +#define PR_EMS_AB_TRACKING_LOG_PATH_NAME_A PROP_TAG( PT_STRING8, 0x8146) +#define PR_EMS_AB_TRACKING_LOG_PATH_NAME_W PROP_TAG( PT_UNICODE, 0x8146) +#define PR_EMS_AB_TRANS_RETRY_MINS PROP_TAG( PT_LONG, 0x8147) +#define PR_EMS_AB_TRANS_TIMEOUT_MINS PROP_TAG( PT_LONG, 0x8148) +#define PR_EMS_AB_TRANSFER_RETRY_INTERVAL PROP_TAG( PT_LONG, 0x8149) +#define PR_EMS_AB_TRANSFER_TIMEOUT_NON_URGENT PROP_TAG( PT_LONG, 0x814A) +#define PR_EMS_AB_TRANSFER_TIMEOUT_NORMAL PROP_TAG( PT_LONG, 0x814B) +#define PR_EMS_AB_TRANSFER_TIMEOUT_URGENT PROP_TAG( PT_LONG, 0x814C) +#define PR_EMS_AB_TRANSLATION_TABLE_USED PROP_TAG( PT_LONG, 0x814D) +#define PR_EMS_AB_TRANSPORT_EXPEDITED_DATA PROP_TAG( PT_BOOLEAN, 0x814E) +#define PR_EMS_AB_TRUST_LEVEL PROP_TAG( PT_LONG, 0x814F) +#define PR_EMS_AB_TURN_REQUEST_THRESHOLD PROP_TAG( PT_LONG, 0x8150) +#define PR_EMS_AB_TWO_WAY_ALTERNATE_FACILITY PROP_TAG( PT_BOOLEAN, 0x8151) +#define PR_EMS_AB_TYPE PROP_TAG( PT_TSTRING, 0x8C38) +#define PR_EMS_AB_TYPE_A PROP_TAG( PT_STRING8, 0x8C38) +#define PR_EMS_AB_TYPE_W PROP_TAG( PT_UNICODE, 0x8C38) +#define PR_EMS_AB_UNAUTH_ORIG_BL PROP_TAG( PT_MV_TSTRING, 0x8152) +#define PR_EMS_AB_UNAUTH_ORIG_BL_A PROP_TAG( PT_MV_STRING8, 0x8152) +#define PR_EMS_AB_UNAUTH_ORIG_BL_W PROP_TAG( PT_MV_UNICODE, 0x8152) +#define PR_EMS_AB_UNAUTH_ORIG_BL_O PROP_TAG( PT_OBJECT, 0x8152) +#define PR_EMS_AB_UNAUTH_ORIG_BL_T PROP_TAG( PT_MV_TSTRING, 0x8152) +#define PR_EMS_AB_UNMERGED_ATTRIBUTES PROP_TAG( PT_MV_BINARY, 0x8C6F) +#define PR_EMS_AB_USE_SERVER_VALUES PROP_TAG( PT_BOOLEAN, 0x817E) +#define PR_EMS_AB_USE_SITE_VALUES PROP_TAG( PT_BOOLEAN, 0x8183) +#define PR_EMS_AB_USENET_SITE_NAME PROP_TAG( PT_TSTRING, 0x8189) +#define PR_EMS_AB_USENET_SITE_NAME_A PROP_TAG( PT_STRING8, 0x8189) +#define PR_EMS_AB_USENET_SITE_NAME_W PROP_TAG( PT_UNICODE, 0x8189) +#define PR_EMS_AB_USER_PASSWORD PROP_TAG( PT_MV_BINARY, 0x8153) +#define PR_EMS_AB_USN_CHANGED PROP_TAG( PT_LONG, 0x8029) +#define PR_EMS_AB_USN_CREATED PROP_TAG( PT_LONG, 0x8154) +#define PR_EMS_AB_USN_DSA_LAST_OBJ_REMOVED PROP_TAG( PT_LONG, 0x8155) +#define PR_EMS_AB_USN_INTERSITE PROP_TAG( PT_LONG, 0x817A) +#define PR_EMS_AB_USN_LAST_OBJ_REM PROP_TAG( PT_LONG, 0x8156) +#define PR_EMS_AB_USN_SOURCE PROP_TAG( PT_LONG, 0x8157) +#define PR_EMS_AB_VIEW_CONTAINER_1 PROP_TAG( PT_TSTRING, 0x81BF) +#define PR_EMS_AB_VIEW_CONTAINER_1_A PROP_TAG( PT_STRING8, 0x81BF) +#define PR_EMS_AB_VIEW_CONTAINER_1_W PROP_TAG( PT_UNICODE, 0x81BF) +#define PR_EMS_AB_VIEW_CONTAINER_2 PROP_TAG( PT_TSTRING, 0x81C0) +#define PR_EMS_AB_VIEW_CONTAINER_2_A PROP_TAG( PT_STRING8, 0x81C0) +#define PR_EMS_AB_VIEW_CONTAINER_2_W PROP_TAG( PT_UNICODE, 0x81C0) +#define PR_EMS_AB_VIEW_CONTAINER_3 PROP_TAG( PT_TSTRING, 0x81C1) +#define PR_EMS_AB_VIEW_CONTAINER_3_A PROP_TAG( PT_STRING8, 0x81C1) +#define PR_EMS_AB_VIEW_CONTAINER_3_W PROP_TAG( PT_UNICODE, 0x81C1) +#define PR_EMS_AB_VIEW_DEFINITION PROP_TAG( PT_MV_BINARY, 0x8C1B) +#define PR_EMS_AB_VIEW_FLAGS PROP_TAG( PT_LONG, 0x8C18) +#define PR_EMS_AB_VIEW_SITE PROP_TAG( PT_TSTRING, 0x81BE) +#define PR_EMS_AB_VIEW_SITE_A PROP_TAG( PT_STRING8, 0x81BE) +#define PR_EMS_AB_VIEW_SITE_W PROP_TAG( PT_UNICODE, 0x81BE) +#define PR_EMS_AB_VOICE_MAIL_FLAGS PROP_TAG( PT_MV_BINARY, 0x8C40) +#define PR_EMS_AB_VOICE_MAIL_GREETINGS PROP_TAG( PT_MV_TSTRING, 0x8C3F) +#define PR_EMS_AB_VOICE_MAIL_GREETINGS_A PROP_TAG( PT_MV_STRING8, 0x8C3F) +#define PR_EMS_AB_VOICE_MAIL_GREETINGS_W PROP_TAG( PT_MV_UNICODE, 0x8C3F) +#define PR_EMS_AB_VOICE_MAIL_PASSWORD PROP_TAG( PT_TSTRING, 0x8C3D) +#define PR_EMS_AB_VOICE_MAIL_PASSWORD_A PROP_TAG( PT_STRING8, 0x8C3D) +#define PR_EMS_AB_VOICE_MAIL_PASSWORD_W PROP_TAG( PT_UNICODE, 0x8C3D) +#define PR_EMS_AB_VOICE_MAIL_RECORDED_NAME PROP_TAG( PT_BINARY, 0x8C3E) +#define PR_EMS_AB_VOICE_MAIL_RECORDING_LENGTH PROP_TAG( PT_MV_LONG, 0x8C43) +#define PR_EMS_AB_VOICE_MAIL_SPEED PROP_TAG( PT_LONG, 0x8C42) +#define PR_EMS_AB_VOICE_MAIL_SYSTEM_GUID PROP_TAG( PT_BINARY, 0x8C3B) +#define PR_EMS_AB_VOICE_MAIL_USER_ID PROP_TAG( PT_TSTRING, 0x8C3C) +#define PR_EMS_AB_VOICE_MAIL_USER_ID_A PROP_TAG( PT_STRING8, 0x8C3C) +#define PR_EMS_AB_VOICE_MAIL_USER_ID_W PROP_TAG( PT_UNICODE, 0x8C3C) +#define PR_EMS_AB_VOICE_MAIL_VOLUME PROP_TAG( PT_LONG, 0x8C41) +#define PR_EMS_AB_WWW_HOME_PAGE PROP_TAG( PT_TSTRING, 0x8175) +#define PR_EMS_AB_WWW_HOME_PAGE_A PROP_TAG( PT_STRING8, 0x8175) +#define PR_EMS_AB_WWW_HOME_PAGE_W PROP_TAG( PT_UNICODE, 0x8175) +#define PR_EMS_AB_X121_ADDRESS PROP_TAG( PT_MV_TSTRING, 0x8158) +#define PR_EMS_AB_X121_ADDRESS_A PROP_TAG( PT_MV_STRING8, 0x8158) +#define PR_EMS_AB_X121_ADDRESS_W PROP_TAG( PT_MV_UNICODE, 0x8158) +#define PR_EMS_AB_X25_CALL_USER_DATA_INCOMING PROP_TAG( PT_BINARY, 0x8159) +#define PR_EMS_AB_X25_CALL_USER_DATA_OUTGOING PROP_TAG( PT_BINARY, 0x815A) +#define PR_EMS_AB_X25_FACILITIES_DATA_INCOMING PROP_TAG( PT_BINARY, 0x815B) +#define PR_EMS_AB_X25_FACILITIES_DATA_OUTGOING PROP_TAG( PT_BINARY, 0x815C) +#define PR_EMS_AB_X25_LEASED_LINE_PORT PROP_TAG( PT_BINARY, 0x815D) +#define PR_EMS_AB_X25_LEASED_OR_SWITCHED PROP_TAG( PT_BOOLEAN, 0x815E) +#define PR_EMS_AB_X25_REMOTE_MTA_PHONE PROP_TAG( PT_TSTRING, 0x815F) +#define PR_EMS_AB_X25_REMOTE_MTA_PHONE_A PROP_TAG( PT_STRING8, 0x815F) +#define PR_EMS_AB_X25_REMOTE_MTA_PHONE_W PROP_TAG( PT_UNICODE, 0x815F) +#define PR_EMS_AB_X400_ATTACHMENT_TYPE PROP_TAG( PT_BINARY, 0x8160) +#define PR_EMS_AB_X400_SELECTOR_SYNTAX PROP_TAG( PT_LONG, 0x8161) +#define PR_EMS_AB_X500_ACCESS_CONTROL_LIST PROP_TAG( PT_BINARY, 0x8162) +#define PR_EMS_AB_X500_NC PROP_TAG( PT_TSTRING, 0x81A2) +#define PR_EMS_AB_X500_NC_A PROP_TAG( PT_STRING8, 0x81A2) +#define PR_EMS_AB_X500_NC_W PROP_TAG( PT_UNICODE, 0x81A2) +#define PR_EMS_AB_X500_RDN PROP_TAG( PT_TSTRING, 0x81A1) +#define PR_EMS_AB_X500_RDN_A PROP_TAG( PT_STRING8, 0x81A1) +#define PR_EMS_AB_X500_RDN_W PROP_TAG( PT_UNICODE, 0x81A1) +#define PR_EMS_AB_X509_CERT PROP_TAG( PT_MV_BINARY, 0x8C6A) +#define PR_EMS_AB_XMIT_TIMEOUT_NON_URGENT PROP_TAG( PT_LONG, 0x8163) +#define PR_EMS_AB_XMIT_TIMEOUT_NORMAL PROP_TAG( PT_LONG, 0x8164) +#define PR_EMS_AB_XMIT_TIMEOUT_URGENT PROP_TAG( PT_LONG, 0x8165) +#define PR_EMS_AB_PHONETIC_GIVEN_NAME PROP_TAG( PT_TSTRING, 0x8C8E) +#define PR_EMS_AB_PHONETIC_GIVEN_NAME_A PROP_TAG( PT_STRING8, 0x8C8E) +#define PR_EMS_AB_PHONETIC_GIVEN_NAME_W PROP_TAG( PT_UNICODE, 0x8C8E) +#define PR_EMS_AB_PHONETIC_SURNAME PROP_TAG( PT_TSTRING, 0x8C8F) +#define PR_EMS_AB_PHONETIC_SURNAME_A PROP_TAG( PT_STRING8, 0x8C8F) +#define PR_EMS_AB_PHONETIC_SURNAME_W PROP_TAG( PT_UNICODE, 0x8C8F) +#define PR_EMS_AB_PHONETIC_DEPARTMENT_NAME PROP_TAG( PT_TSTRING, 0x8C90) +#define PR_EMS_AB_PHONETIC_DEPARTMENT_NAME_A PROP_TAG( PT_STRING8, 0x8C90) +#define PR_EMS_AB_PHONETIC_DEPARTMENT_NAME_W PROP_TAG( PT_UNICODE, 0x8C90) +#define PR_EMS_AB_PHONETIC_COMPANY_NAME PROP_TAG( PT_TSTRING, 0x8C91) +#define PR_EMS_AB_PHONETIC_COMPANY_NAME_A PROP_TAG( PT_STRING8, 0x8C91) +#define PR_EMS_AB_PHONETIC_COMPANY_NAME_W PROP_TAG( PT_UNICODE, 0x8C91) +#define PR_EMS_AB_PHONETIC_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x8C92) +#define PR_EMS_AB_PHONETIC_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x8C92) +#define PR_EMS_AB_PHONETIC_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x8C92) +#define PR_EMS_AB_HAB_SHOW_IN_DEPARTMENTS PROP_TAG( PT_OBJECT, 0x8C94) +#define PR_EMS_AB_ROOM_CONTAINERS PROP_TAG( PT_MV_TSTRING, 0x8c96) +#define PR_EMS_AB_ROOM_CONTAINERS_A PROP_TAG( PT_MV_STRING8, 0x8c96) +#define PR_EMS_AB_ROOM_CONTAINERS_W PROP_TAG( PT_MV_UNICODE, 0x8c96) +#define PR_EMS_AB_HAB_DEPARTMENT_MEMBERS PROP_TAG( PT_OBJECT, 0x8C97) +#define PR_EMS_AB_HAB_ROOT_DEPARTMENT PROP_TAG( PT_OBJECT, 0x8C98) +#define PR_EMS_AB_HAB_PARENT_DEPARTMENT PROP_TAG( PT_OBJECT, 0x8C99) +#define PR_EMS_AB_HAB_CHILD_DEPARTMENTS PROP_TAG( PT_OBJECT, 0x8C9A) +#define PR_EMS_AB_SENIORITY_INDEX PROP_TAG( PT_LONG, 0x8CA0) // ms-DS-HAB-Seniority-Index +// DN of the Org Unit root for the Hierarchical Address Book for this user. If not present, use the user's DN up to the section '/' +#define PR_EMS_AB_ORG_UNIT_ROOT_DN PROP_TAG( PT_STRING8, 0x8CA8) // msExchOURoot +// PR_EMS_AB_HAB_IS_HIERARCHICAL_GROUP Indicates that a group DL represents a department. +#define PR_EMS_AB_HAB_IS_HIERARCHICAL_GROUP PROP_TAG( PT_BOOLEAN, 0x8CDD) +#define PR_EMS_AB_DL_EXTERNAL_MEMBER_COUNT PROP_TAG( PT_LONG, 0x8CE3) +#endif /* W16 requires one more line after endif */ + diff --git a/com/win32comext/mapi/src/mapi_headers/EdkGuid.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/EdkGuid.h similarity index 89% rename from com/win32comext/mapi/src/mapi_headers/EdkGuid.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/EdkGuid.h index 6d7ad45fc..efaa17142 100644 --- a/com/win32comext/mapi/src/mapi_headers/EdkGuid.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/EdkGuid.h @@ -15,13 +15,15 @@ DEFINE_GUID(IID_IExchangeManageStore, 0x559d10b0,0xa772,0x11cd,0x9b,0xc8,0x00,0x DEFINE_GUID(IID_IExchangeManageStore2,0xb6dca470, 0xff3, 0x11d0, 0xa4, 0x9, 0x0, 0xc0, 0x4f, 0xd7, 0xbd, 0x87); DEFINE_GUID(IID_IExchangeManageStore3,0x166d9bc2, 0xdb75, 0x44a9, 0x8a, 0x93, 0x9f, 0x3f, 0xfc, 0x99, 0x4d, 0x76) ; DEFINE_GUID(IID_IExchangeManageStore4,0x2590ff87, 0xc431, 0x4f9c, 0xb1, 0xa8, 0xcd, 0x69, 0xd7, 0x60, 0xcd, 0x10); // {2590FF87-C431-4f9c-B1A8-CD69D760CD10} +DEFINE_GUID(IID_IExchangeManageStoreEx, 0x7fe3c629, 0x4d9a, 0x4510, 0xa4, 0x79, 0x56, 0x96, 0x2b, 0x24, 0x6d, 0xc6); DEFINE_GUID(IID_IExchangeModifyTable, 0x2d734cb0,0x53fd,0x101b,0xb1,0x9d,0x08,0x00,0x2b,0x30,0x56,0xe3); DEFINE_GUID(IID_IExchangeRuleAction, 0x74bba840,0xc93a,0x11ce,0x95,0x81,0x00,0xaa,0x00,0x57,0x42,0xf7); + DEFINE_GUID(IID_IExchangeFastTransfer, 0xff7db070,0xa88a,0x11cd,0x9b,0xc8,0x00,0xaa,0x00,0x2f,0xc4,0x5a); -DEFINE_GUID(IID_IExchangeExportChanges, 0xa3ea9cc0,0xd1b2,0x11cd,0x80,0xfc,0x00,0xaa,0x00,0x4b,0xba,0x0b); -DEFINE_GUID(IID_IExchangeExportChanges2, 0x387cebe0,0xf53f,0x11cf,0xa4,0x8f,0x00,0xc0,0x4f, 0xd6, 0x55, 0x95); -DEFINE_GUID(IID_IExchangeExportChanges3, 0x702e7f86,0x50a6,0x11d1,0xab,0xd6,0x00,0xa0,0xc9, 0x05, 0x66, 0x0a); +DEFINE_GUID(IID_IExchangeExportChanges, 0xa3ea9cc0,0xd1b2,0x11cd,0x80,0xfc,0x00,0xaa,0x00,0x4b,0xba,0x0b); +DEFINE_GUID(IID_IExchangeExportChanges2, 0x387cebe0,0xf53f,0x11cf,0xa4,0x8f,0x00,0xc0,0x4f,0xd6,0x55,0x95); +DEFINE_GUID(IID_IExchangeExportChanges3, 0x702e7f86,0x50a6,0x11d1,0xab,0xd6,0x00,0xa0,0xc9,0x05,0x66,0x0a); DEFINE_GUID(IID_IExchangeImportHierarchyChanges, 0x85a66cf0,0xd0e0,0x11cd,0x80,0xfc,0x00,0xaa,0x00,0x4b,0xba,0x0b); DEFINE_GUID(IID_IExchangeImportContentsChanges, 0xf75abfa0,0xd0e0,0x11cd,0x80,0xfc,0x00,0xaa,0x00,0x4b,0xba,0x0b); DEFINE_GUID(IID_IExchangeImportContentsChanges2, 0x7dfdd720,0xf53f,0x11cf,0xa4,0x8f,0x00,0xc0,0x4f,0xd6,0x55,0x95); diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/EdkMdb.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/EdkMdb.h new file mode 100644 index 000000000..3f7d16495 --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/EdkMdb.h @@ -0,0 +1,2717 @@ +/* + * EDKMDB.H + * + * Microsoft Exchange Information Store + * Copyright (C) 1986-1996, Microsoft Corporation + * + * Contains declarations of additional properties and interfaces + * offered by Microsoft Exchange Information Store + */ + +#ifndef EDKMDB_INCLUDED +#define EDKMDB_INCLUDED + +/* + * WARNING: Many of the property id values contained within this + * file are subject to change. For best results please use the + * literals declared here instead of the numerical values. + */ + +#define pidStoreNonTransMin 0x0E40 +#define pidExchangeXmitReservedMin 0x3FE0 +#define pidExchangeNonXmitReservedMin 0x65E0 +#define pidProfileMin 0x6600 +#define pidStoreMin 0x6618 +#define pidFolderMin 0x6638 +#define pidMessageReadOnlyMin 0x6640 +#define pidMessageWriteableMin 0x6658 +#define pidAttachReadOnlyMin 0x666C +#define pidSpecialMin 0x6670 +#define pidAdminMin 0x6690 +#define pidSecureProfileMin PROP_ID_SECURE_MIN +#define pidRenMsgFldMin 0x1080 +#define pidLocalStoreInternalMin 0x6500 // Using a portion of the user-defined non-tranmittable prop for local store +#define pidLocalStoreInternalMax 0x65C0 +#define pidMAPIMin 0x3000 + +/*------------------------------------------------------------------------ + * + * PROFILE properties + * + * These are used in profiles which contain the Exchange Messaging + * Service. These profiles contain a "global section" used to store + * common data, plus individual sections for the transport provider, + * one store provider for the user, one store provider for the public + * store, and one store provider for each additional mailbox the user + * has delegate access to. + * + *-----------------------------------------------------------------------*/ + +/* GUID of the global section */ + +#define pbGlobalProfileSectionGuid "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A" + + +/* Properties in the global section */ + +#define PR_PROFILE_VERSION PROP_TAG( PT_LONG, pidProfileMin+0x00) // 0x6600 +#define PR_PROFILE_CONFIG_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x01) // 0x6601 +#define PR_PROFILE_HOME_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x02) // 0x6602 +#define PR_PROFILE_USER PROP_TAG( PT_STRING8, pidProfileMin+0x03) // 0x6603 +#define PR_PROFILE_CONNECT_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x04) // 0x6604 +#define PR_PROFILE_TRANSPORT_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x05) // 0x6605 +#define PR_PROFILE_UI_STATE PROP_TAG( PT_LONG, pidProfileMin+0x06) // 0x6606 +#define PR_PROFILE_UNRESOLVED_NAME PROP_TAG( PT_STRING8, pidProfileMin+0x07) // 0x6607 +#define PR_PROFILE_UNRESOLVED_NAME_A PROP_TAG( PT_STRING8, pidProfileMin+0x07) +#define PR_PROFILE_UNRESOLVED_NAME_W PROP_TAG( PT_UNICODE, pidProfileMin+0x07) +#define PR_PROFILE_UNRESOLVED_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x08) // 0x6608 +#define PR_PROFILE_BINDING_ORDER PROP_TAG( PT_STRING8, pidProfileMin+0x09) // 0x6609 +#define PR_PROFILE_MAX_RESTRICT PROP_TAG( PT_LONG, pidProfileMin+0x0D) // 0x660D +#define PR_PROFILE_AB_FILES_PATH PROP_TAG( PT_STRING8, pidProfileMin+0x0E) // 0x660E +#define PR_PROFILE_AB_FILES_PATH_W PROP_TAG( PT_UNICODE, pidProfileMin+0x0E) +#define PR_PROFILE_OFFLINE_STORE_PATH PROP_TAG( PT_STRING8, pidProfileMin+0x10) // 0x6610 +#define PR_PROFILE_OFFLINE_STORE_PATH_W PROP_TAG( PT_UNICODE, pidProfileMin+0x10) +#define PR_PROFILE_OFFLINE_INFO PROP_TAG( PT_BINARY, pidProfileMin+0x11) // 0x6611 +#define PR_PROFILE_HOME_SERVER_DN PROP_TAG( PT_STRING8, pidProfileMin+0x12) // 0x6612 +#define PR_PROFILE_HOME_SERVER_ADDRS PROP_TAG( PT_MV_STRING8, pidProfileMin+0x13) // 0x6613 +//ptag.h: #define PR_PROFILE_ADDR_TIMESTAMP PROP_TAG( PT_I8, pidSpecialMin+0x16) // 0x6686 +#define PR_PROFILE_ADDR_INFO PROP_TAG( PT_BINARY, pidSpecialMin+0x17) // 0x6687 +//ptag.h: #define PR_PROFILE_DISPLAYNAME_SET PROP_TAG( PT_LONG, pidSpecialMin+0x18) // 0x6688 +#define PR_PROFILE_OPTIONS_DATA PROP_TAG( PT_BINARY, pidSpecialMin+0x19) // 0x6689 +// PR_PROFILE_OPTIONS_DATA+1, +2, ... has more options data. See Ec{Set,Get}OptionsData. +#define PR_PROFILE_SECURE_MAILBOX PROP_TAG( PT_BINARY, pidSecureProfileMin+0) // 0x67F0 +// Profile properties below this point collide with prop tags after pidStoreMin. This +// doesn't appear to be a problem since these apply to entirely different objects. +#define PR_DISABLE_WINSOCK PROP_TAG( PT_LONG, pidProfileMin+0x18) // 0x6618 +#define PR_PROFILE_AUTH_PACKAGE PROP_TAG( PT_LONG, pidProfileMin+0x19) // dup tag of PR_USER_ENTRYID 0x6619 +#define PR_PROFILE_RECONNECT_INTERVAL PROP_TAG( PT_LONG, pidProfileMin+0x1a) // dup tag of PR_USER_NAME 0x661a +#define PR_PROFILE_SERVER_VERSION PROP_TAG( PT_LONG, pidProfileMin+0x1b) + +/* SE 233155 - MarkH: EMSABP DCR /* +/* Properties in the abp section - I got these values from AlecDun (Outlook team) */ +#define PR_PROFILE_SERVER_FULL_VERSION PROP_TAG( PT_BINARY, pidProfileMin+0x3b) + +#define PR_PROFILE_USER_SMTP_EMAIL_ADDRESS PROP_TAG(PT_TSTRING, pidProfileMin+0x41) +#define PR_PROFILE_USER_SMTP_EMAIL_ADDRESS_A PROP_TAG(PT_STRING8, pidProfileMin+0x41) +#define PR_PROFILE_USER_SMTP_EMAIL_ADDRESS_W PROP_TAG(PT_UNICODE, pidProfileMin+0x41) + +// ABP profile stuff. +#define PR_PROFILE_ABP_ALLOW_RECONNECT PROP_TAG( PT_LONG, pidProfileMin+0x39) +#define PR_PROFILE_ABP_MTHREAD_TIMEOUT_SECS PROP_TAG( PT_LONG, pidProfileMin+0x3a) + +/* Properties passed through the Service Entry to the OST */ +#define PR_OST_ENCRYPTION PROP_TAG(PT_LONG, 0x6702) + +/* Values for PR_OST_ENCRYPTION */ +#define OSTF_NO_ENCRYPTION ((DWORD)0x80000000) +#define OSTF_COMPRESSABLE_ENCRYPTION ((DWORD)0x40000000) +#define OSTF_BEST_ENCRYPTION ((DWORD)0x20000000) + +/* Properties in each profile section */ + +#define PR_PROFILE_OPEN_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x09) +#define PR_PROFILE_TYPE PROP_TAG( PT_LONG, pidProfileMin+0x0A) +#define PR_PROFILE_MAILBOX PROP_TAG( PT_STRING8, pidProfileMin+0x0B) +#define PR_PROFILE_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x0C) +#define PR_PROFILE_SERVER_DN PROP_TAG( PT_STRING8, pidProfileMin+0x14) + +/* Properties in the Public Folders section */ + +#define PR_PROFILE_FAVFLD_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x0F) +#define PR_PROFILE_FAVFLD_DISPLAY_NAME_W PROP_TAG(PT_UNICODE, pidProfileMin+0x0F) +#define PR_PROFILE_FAVFLD_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x15) +#define PR_PROFILE_FAVFLD_COMMENT_W PROP_TAG(PT_UNICODE, pidProfileMin+0x15) +#define PR_PROFILE_ALLPUB_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x16) +#define PR_PROFILE_ALLPUB_DISPLAY_NAME_W PROP_TAG(PT_UNICODE, pidProfileMin+0x16) +#define PR_PROFILE_ALLPUB_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x17) +#define PR_PROFILE_ALLPUB_COMMENT_W PROP_TAG(PT_UNICODE, pidProfileMin+0x17) + +/* Properties for Multiple Offline Address Book support (MOAB) */ + +#define PR_PROFILE_MOAB PROP_TAG( PT_STRING8, pidSpecialMin + 0x0B ) +#define PR_PROFILE_MOAB_W PROP_TAG( PT_UNICODE, pidSpecialMin + 0x0B ) +#define PR_PROFILE_MOAB_GUID PROP_TAG( PT_STRING8, pidSpecialMin + 0x0C ) +#define PR_PROFILE_MOAB_SEQ PROP_TAG( PT_LONG, pidSpecialMin + 0x0D ) + +#define PR_PROFILE_ALTERNATE_STORE_TYPE_W PROP_TAG(PT_UNICODE,0x6500+0xD0) +// Property for setting a list of prop_ids to be excluded +// from the GetProps(NULL) call. +#define PR_GET_PROPS_EXCLUDE_PROP_ID_LIST PROP_TAG( PT_BINARY, pidSpecialMin + 0x0E ) + +// Current value for PR_PROFILE_VERSION +#define PROFILE_VERSION ((ULONG)0x501) + +// Bit values for PR_PROFILE_CONFIG_FLAGS + +#define CONFIG_SERVICE ((ULONG)0x00000001) +#define CONFIG_SHOW_STARTUP_UI ((ULONG)0x00000002) +#define CONFIG_SHOW_CONNECT_UI ((ULONG)0x00000004) +#define CONFIG_PROMPT_FOR_CREDENTIALS ((ULONG)0x00000008) +#define CONFIG_NO_AUTO_DETECT ((ULONG)0x00000010) +#define CONFIG_OST_CACHE_ONLY ((ULONG)0x00000020) + +// Bit values for PR_PROFILE_CONNECT_FLAGS + +#define CONNECT_USE_ADMIN_PRIVILEGE ((ULONG)1) +#define CONNECT_NO_RPC_ENCRYPTION ((ULONG)2) +#define CONNECT_USE_SEPARATE_CONNECTION ((ULONG)4) +#define CONNECT_NO_UNDER_COVER_CONNECTION ((ULONG)8) +#define CONNECT_ANONYMOUS_ACCESS ((ULONG)16) +#define CONNECT_NO_NOTIFICATIONS ((ULONG)32) +#define CONNECT_NO_TABLE_NOTIFICATIONS ((ULONG)32) /* BUGBUG: TEMPORARY */ +#define CONNECT_NO_ADDRESS_RESOLUTION ((ULONG)64) +#define CONNECT_RESTORE_DATABASE ((ULONG)128) + + +// Bit values for PR_PROFILE_TRANSPORT_FLAGS + +#define TRANSPORT_DOWNLOAD ((ULONG)1) +#define TRANSPORT_UPLOAD ((ULONG)2) + +// Bit values for PR_PROFILE_OPEN_FLAGS + +#define OPENSTORE_USE_ADMIN_PRIVILEGE ((ULONG)0x00000001) +#define OPENSTORE_PUBLIC ((ULONG)0x00000002) +#define OPENSTORE_HOME_LOGON ((ULONG)0x00000004) +#define OPENSTORE_TAKE_OWNERSHIP ((ULONG)0x00000008) +#define OPENSTORE_OVERRIDE_HOME_MDB ((ULONG)0x00000010) +#define OPENSTORE_TRANSPORT ((ULONG)0x00000020) +#define OPENSTORE_REMOTE_TRANSPORT ((ULONG)0x00000040) +#define OPENSTORE_INTERNET_ANONYMOUS ((ULONG)0x00000080) +#define OPENSTORE_ALTERNATE_SERVER ((ULONG)0x00000100) /* reserved for internal use */ +#define OPENSTORE_IGNORE_HOME_MDB ((ULONG)0x00000200) /* reserved for internal use */ +#define OPENSTORE_NO_MAIL ((ULONG)0x00000400) /* reserved for internal use */ +#define OPENSTORE_OVERRIDE_LAST_MODIFIER ((ULONG)0x00000800) +#define OPENSTORE_CALLBACK_LOGON ((ULONG)0x00001000) /* reserved for internal use */ +#define OPENSTORE_LOCAL ((ULONG)0x00002000) +#define OPENSTORE_FAIL_IF_NO_MAILBOX ((ULONG)0x00004000) /* reserved for internal use */ +#define OPENSTORE_CACHE_EXCHANGE ((ULONG)0x00008000) +#define OPENSTORE_CLI_WITH_NAMEDPROP_FIX ((ULONG)0x00010000) /* reserved for internal use */ +#define OPENSTORE_ENABLE_LAZY_LOGGING ((ULONG)0x00020000) /* reserved for internal use */ +#define OPENSTORE_CLI_WITH_REPLID_GUID_MAPPING_FIX ((ULONG)0x00040000) /* reserved for internal use */ +#define OPENSTORE_NO_LOCALIZATION ((ULONG)0x00080000) /* reserved for internal use */ +#define OPENSTORE_RESTORE_DATABASE ((ULONG)0x00100000) +#define OPENSTORE_XFOREST_MOVE ((ULONG)0x00200000) /* reserved for internal use */ + + +// Values for PR_PROFILE_TYPE + +#define PROFILE_PRIMARY_USER ((ULONG)1) +#define PROFILE_DELEGATE ((ULONG)2) +#define PROFILE_PUBLIC_STORE ((ULONG)3) +#define PROFILE_SUBSCRIPTION ((ULONG)4) + + +/*------------------------------------------------------------------------ + * + * MDB object properties + * + *-----------------------------------------------------------------------*/ + +/* PR_MDB_PROVIDER GUID in stores table */ + +#define pbExchangeProviderPrimaryUserGuid "\x54\x94\xA1\xC0\x29\x7F\x10\x1B\xA5\x87\x08\x00\x2B\x2A\x25\x17" +#define pbExchangeProviderDelegateGuid "\x9e\xb4\x77\x00\x74\xe4\x11\xce\x8c\x5e\x00\xaa\x00\x42\x54\xe2" +#define pbExchangeProviderPublicGuid "\x78\xb2\xfa\x70\xaf\xf7\x11\xcd\x9b\xc8\x00\xaa\x00\x2f\xc4\x5a" +#define pbExchangeProviderXportGuid "\xa9\x06\x40\xe0\xd6\x93\x11\xcd\xaf\x95\x00\xaa\x00\x4a\x35\xc3" +#define pbExchangeProviderLocalStoreGuid "\x2D\xE5\x6B\xA1\x64\x6E\x11\xd2\x8D\x4E\x00\xC0\x4F\xAE\x23\x71" +#define pbExchangeProviderPersistStoreGuid "\x98\xA2\x3D\x67\x62\xCF\x4d\x34\x82\x79\xDB\xFA\x6A\x50\x8B\x31" + + +// All properties in this section are readonly + +// Identity of store + // All stores +#define PR_USER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x01) +#define PR_USER_NAME PROP_TAG( PT_STRING8, pidStoreMin+0x02) + + // All mailbox stores +#define PR_MAILBOX_OWNER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x03) +#define PR_MAILBOX_OWNER_NAME PROP_TAG( PT_TSTRING, pidStoreMin+0x04) +#define PR_MAILBOX_OWNER_NAME_A PROP_TAG( PT_STRING8, pidStoreMin+0x04) +#define PR_MAILBOX_OWNER_NAME_W PROP_TAG( PT_UNICODE, pidStoreMin+0x04) +#define PR_OOF_STATE PROP_TAG( PT_BOOLEAN, pidStoreMin+0x05) + + // Public stores -- name of hierarchy server +#define PR_HIERARCHY_SERVER PROP_TAG( PT_TSTRING, pidStoreMin+0x1B) + +// Entryids of special folders + // All mailbox stores +#define PR_SCHEDULE_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x06) + + // All mailbox and gateway stores +#define PR_IPM_DAF_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x07) + + // Public store +#define PR_NON_IPM_SUBTREE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x08) +#define PR_EFORMS_REGISTRY_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x09) +#define PR_SPLUS_FREE_BUSY_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0A) +#define PR_OFFLINE_ADDRBOOK_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0B) +#define PR_NNTP_CONTROL_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0x1B) +#define PR_EFORMS_FOR_LOCALE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0C) +#define PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0D) +#define PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0E) +#define PR_NEWSGROUP_ROOT_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0x1C) +#define PR_OFFLINE_MESSAGE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0F) +#define PR_IPM_FAVORITES_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x18) +#define PR_IPM_PUBLIC_FOLDERS_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x19) +#define PR_FAVORITES_DEFAULT_NAME PROP_TAG( PT_STRING8, pidStoreMin+0x1D) +#define PR_FAVORITES_DEFAULT_NAME_W PROP_TAG( PT_UNICODE, pidStoreMin+0x1D) +#define PR_SYS_CONFIG_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x1E) +#define PR_NNTP_ARTICLE_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0x1A) +#define PR_EVENTS_ROOT_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0x0A) + + // Gateway stores +#define PR_GW_MTSIN_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x10) +#define PR_GW_MTSOUT_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x11) +#define PR_TRANSFER_ENABLED PROP_TAG( PT_BOOLEAN, pidStoreMin+0x12) + +// This property is preinitialized to 256 bytes of zeros +// GetProp on this property is guaranteed to RPC. May be used +// to determine line speed of connection to server. +#define PR_TEST_LINE_SPEED PROP_TAG( PT_BINARY, pidStoreMin+0x13) + +// Used with OpenProperty to get interface, also on folders +#define PR_HIERARCHY_SYNCHRONIZER PROP_TAG( PT_OBJECT, pidStoreMin+0x14) +#define PR_CONTENTS_SYNCHRONIZER PROP_TAG( PT_OBJECT, pidStoreMin+0x15) +#define PR_COLLECTOR PROP_TAG( PT_OBJECT, pidStoreMin+0x16) + +// Used with OpenProperty to get interface for folders, messages, attachmentson +#define PR_FAST_TRANSFER PROP_TAG( PT_OBJECT, pidStoreMin+0x17) + +// Used with OpenProperty to get interface for store object +#define PR_CHANGE_ADVISOR PROP_TAG( PT_OBJECT, pidStoreMin+0x1C) + +// used to set the ics notification suppression guid +#define PR_CHANGE_NOTIFICATION_GUID PROP_TAG( PT_CLSID, pidStoreMin+0x1F) + +// This property is available on mailbox and public stores. If it exists +// and its value is TRUE, the store is connected to the offline store provider. +#define PR_STORE_OFFLINE PROP_TAG( PT_BOOLEAN, pidStoreMin+0x1A) + +// Quota information on the store in KB (yes, it overlaps props, but it's OK) +#define PR_MAX_SUBMIT_MESSAGE_SIZE PROP_TAG( PT_LONG, 0x666D) +#define PR_PROHIBIT_SEND_QUOTA PROP_TAG( PT_LONG, 0x666E) +#define PR_PROHIBIT_RECEIVE_QUOTA PROP_TAG( PT_LONG, 0x666A) + +// In transit state for store object. This state is +// set when mail is being moved and it pauses mail delivery +// to the mail box +#define PR_IN_TRANSIT PROP_TAG( PT_BOOLEAN, pidStoreMin) + +// Writable only with Admin rights, available on public stores and folders +#define PR_REPLICATION_STYLE PROP_TAG( PT_LONG, pidAdminMin) +#define PR_REPLICATION_SCHEDULE PROP_TAG( PT_BINARY, pidAdminMin+0x01) +#define PR_REPLICATION_MESSAGE_PRIORITY PROP_TAG( PT_LONG, pidAdminMin+0x02) + +// Writable only with Admin rights, available on public stores +#define PR_OVERALL_MSG_AGE_LIMIT PROP_TAG( PT_LONG, pidAdminMin+0x03 ) +#define PR_REPLICATION_ALWAYS_INTERVAL PROP_TAG( PT_LONG, pidAdminMin+0x04 ) +#define PR_REPLICATION_MSG_SIZE PROP_TAG( PT_LONG, pidAdminMin+0x05 ) + +// default replication style=always interval (minutes) +#define STYLE_ALWAYS_INTERVAL_DEFAULT (ULONG) 15 + +// default replication message size limit (KB) +#define REPLICATION_MESSAGE_SIZE_LIMIT_DEFAULT (ULONG) 300 + +// Values for PR_REPLICATION_STYLE +#define STYLE_NEVER (ULONG) 0 // never replicate +#define STYLE_NORMAL (ULONG) 1 // use 84 byte schedule TIB +#define STYLE_ALWAYS (ULONG) 2 // replicate at fastest rate +#define STYLE_DEFAULT (ULONG) -1 // default value + +/*------------------------------------------------------------------------ + * + * INCREMENTAL CHANGE SYNCHRONIZATION + * folder and message properties + * + *-----------------------------------------------------------------------*/ + +#define PR_SOURCE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x0) +#define PR_PARENT_SOURCE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x1) +#define PR_CHANGE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x2) +#define PR_PREDECESSOR_CHANGE_LIST PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x3) + +/*------------------------------------------------------------------------ + * + * FOLDER object properties + * + *-----------------------------------------------------------------------*/ + +// folders table property used by PKM to define the catalog guid for content +// indexing and searching; doubles as index enable/disable +#define PR_CATALOG PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x1B) + +// Is CI searching enabled on this folder? +#define PR_CI_SEARCH_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x1C) + +// Is notification-based indexing enabled on this folder? +#define PR_CI_NOTIFICATION_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x1D) + +// msg-folder only property +// actual FID for a msg-folder row +// ptagFID for message rows +// ptagInstanceID for subfolder rows +#define PR_SOURCE_FID PROP_TAG(PT_I8, pidStoreNonTransMin+0x1F) + +// Max number of cached view allowed +#define PR_MAX_CACHED_VIEWS PROP_TAG(PT_LONG, pidStoreNonTransMin+0x28) + +// Max number of indices allowed +// Review : this ptag is used for PR_MIME_HANDLER_CLASSIDS, but because the context +// is different I am reusing it here. +#define PR_MAX_INDICES PROP_TAG(PT_LONG, pidStoreNonTransMin+0x1E) + +// folders table property containing list of guid/restriction pairs +#define PR_IMPLIED_RESTRICTIONS PROP_TAG( PT_MV_BINARY, pidSpecialMin+0x0F) + +// Read only, available on all folders +#define PR_FOLDER_CHILD_COUNT PROP_TAG( PT_LONG, pidFolderMin) +#define PR_RIGHTS PROP_TAG( PT_LONG, pidFolderMin+0x01) +#define PR_ACL_TABLE PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin) +#define PR_RULES_TABLE PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin+0x1) +#define PR_HAS_RULES PROP_TAG( PT_BOOLEAN, pidFolderMin+0x02) +#define PR_HAS_MODERATOR_RULES PROP_TAG( PT_BOOLEAN, pidFolderMin+0x07 ) + +//Read only, available only for public folders +#define PR_ADDRESS_BOOK_ENTRYID PROP_TAG( PT_BINARY, pidFolderMin+0x03) + +//Writable, available on folders in all stores +#define PR_ACL_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin) +#define PR_RULES_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x01) +#define PR_EXTENDED_ACL_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x1E) +#define PR_FOLDER_DESIGN_FLAGS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x02) +#define PR_DESIGN_IN_PROGRESS PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x04) +#define PR_SECURE_ORIGINATION PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x05) + +//Writable, available only for public folders +#define PR_PUBLISH_IN_ADDRESS_BOOK PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x06) +#define PR_RESOLVE_METHOD PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x07) +#define PR_ADDRESS_BOOK_DISPLAY_NAME PROP_TAG( PT_TSTRING, pidExchangeXmitReservedMin+0x08) + +//Writable, used to indicate locale id for eforms registry subfolders +#define PR_EFORMS_LOCALE_ID PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x9) + +// Writable only with Admin rights, available only for public folders +#define PR_REPLICA_LIST PROP_TAG( PT_BINARY, pidAdminMin+0x08) +#define PR_OVERALL_AGE_LIMIT PROP_TAG( PT_LONG, pidAdminMin+0x09) + +// Newsgroup related properties. Writable only with Admin rights. +#define PR_IS_NEWSGROUP_ANCHOR PROP_TAG( PT_BOOLEAN, pidAdminMin+0x06) +#define PR_IS_NEWSGROUP PROP_TAG( PT_BOOLEAN, pidAdminMin+0x07) +#define PR_NEWSGROUP_COMPONENT PROP_TAG( PT_STRING8, pidAdminMin+0x15) +#define PR_INTERNET_NEWSGROUP_NAME PROP_TAG( PT_TSTRING, pidAdminMin+0x17) +#define PR_INTERNET_NEWSGROUP_NAME_A PROP_TAG( PT_STRING8, pidAdminMin+0x17) +#define PR_INTERNET_NEWSGROUP_NAME_W PROP_TAG( PT_UNICODE, pidAdminMin+0x17) +#define PR_NEWSFEED_INFO PROP_TAG( PT_BINARY, pidAdminMin+0x16) + +// Newsgroup related property. +#define PR_PREVENT_MSG_CREATE PROP_TAG( PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x14) + +// IMAP internal date +#define PR_IMAP_INTERNAL_DATE PROP_TAG( PT_SYSTIME, pidExchangeNonXmitReservedMin+0x15) + +// Virtual properties to refer to Newsfeed DNs. Cannot get/set these on +// any object. Supported currently only in specifying restrictions. +#define PR_INBOUND_NEWSFEED_DN PROP_TAG( PT_STRING8, pidSpecialMin+0x1D) +#define PR_OUTBOUND_NEWSFEED_DN PROP_TAG( PT_STRING8, pidSpecialMin+0x1E) + +// Used for controlling content conversion in NNTP +#define PR_INTERNET_CHARSET PROP_TAG( PT_TSTRING, pidAdminMin+0xA) + +//PR_RESOLVE_METHOD values +#define RESOLVE_METHOD_DEFAULT ((LONG)0) // default handling attach conflicts +#define RESOLVE_METHOD_LAST_WRITER_WINS ((LONG)1) // the last writer will win conflict +#define RESOLVE_METHOD_NO_CONFLICT_NOTIFICATION ((LONG)2) // no conflict notif + +//Read only, available only for public folder favorites +#define PR_PUBLIC_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidFolderMin+0x04) + +//Read only. changes everytime a subfolder is created or deleted +#define PR_HIERARCHY_CHANGE_NUM PROP_TAG( PT_LONG, pidFolderMin+0x06) + +// For IFS/OLEDB to set and get user sid in LOGON +#define PR_USER_SID PROP_TAG(PT_BINARY, PROP_ID(ptagSearchState)) // pidInternalNoAccessNonTransMin+0x23) +#define PR_CREATOR_TOKEN PR_USER_SID + + +/*------------------------------------------------------------------------ + * + * MESSAGE object properties + * + *-----------------------------------------------------------------------*/ + +// Read only, automatically set on all messages in all stores +#define PR_HAS_NAMED_PROPERTIES PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin+0x0A) + +// Read only but outside the provider specific range for replication thru GDK-GWs +#define PR_CREATOR_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x18) +#define PR_CREATOR_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x19) +#define PR_LAST_MODIFIER_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1A) +#define PR_LAST_MODIFIER_NAME_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin+0x1A) +#define PR_LAST_MODIFIER_NAME_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin+0x1A) +#define PR_LAST_MODIFIER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x1B) +#define PR_REPLY_RECIPIENT_SMTP_PROXIES PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1C) + +// Read only, appears on messages which have DAM's pointing to them +#define PR_HAS_DAMS PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x0A) +#define PR_RULE_TRIGGER_HISTORY PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x12) +#define PR_MOVE_TO_STORE_ENTRYID PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x13) +#define PR_MOVE_TO_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x14) + +// Read only, available only on messages in the public store +#define PR_REPLICA_SERVER PROP_TAG(PT_TSTRING, pidMessageReadOnlyMin+0x04) +#define PR_REPLICA_VERSION PROP_TAG(PT_I8, pidMessageReadOnlyMin+0x0B) + +// SID versions of standard messaging properties +#define PR_CREATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x18) +#define PR_LAST_MODIFIER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x19) +#define PR_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0d) +#define PR_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0e) +#define PR_ORIGINAL_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0f) +#define PR_ORIGINAL_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x10) +#define PR_READ_RECEIPT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x11) +#define PR_REPORT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x12) +#define PR_ORIGINATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x13) +#define PR_REPORT_DESTINATION_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x14) +#define PR_ORIGINAL_AUTHOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x15) +#define PR_RECEIVED_BY_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x16) +#define PR_RCVD_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x17) + +// Flag indicating whether msg has been read or not (read-only prop for now - not replicated). +#define PR_READ PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x29) + +// +// XML formatted versions of the NT SECURITY DESCRIPTOR properties +#define PR_NT_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2A) +#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x2A) +#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x2A) +#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2B) +#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x2B) +#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x2B) + + +// XML versions of SID properties +#define PR_CREATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2C) +#define PR_LAST_MODIFIER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2D) +#define PR_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2E) +#define PR_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2F) +#define PR_ORIGINAL_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x30) +#define PR_ORIGINAL_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x31) +#define PR_READ_RECEIPT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x32) +#define PR_REPORT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x33) +#define PR_ORIGINATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x34) +#define PR_REPORT_DESTINATION_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x35) +#define PR_ORIGINAL_AUTHOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x36) +#define PR_RECEIVED_BY_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x37) +#define PR_RCVD_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x38) + + +#define PR_TRUST_SENDER_NO 0x00000000L +#define PR_TRUST_SENDER_YES 0x00000001L +#define PR_TRUST_SENDER PROP_TAG(PT_LONG, pidStoreNonTransMin+0x39) + + +// those two are pseudo-properties on folder. calling OFOLD::EcGetProps(PR_RESERVE_RANGE_OF_IDS) is +// equivalent to calling EcGetLocalRepIdsOp(), calling OFOLD::EcSetProps(PR_MERGE_MIDSET_DELETED) +// is equivalen to calling OFOLD::EcSetLocalRepMidsetDeleted() +#define PR_MERGE_MIDSET_DELETED PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x3a) // 0x0E7A0102 +#define PR_RESERVE_RANGE_OF_IDS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x3b) // 0x0E7B0102 + +// computed message property (read only) +// 44 byte binary property - used by PKM as globally unique message key +// 22 bytes of global ID for FID +// 22 bytes of global ID for VID +#define PR_FID_VID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x0C) +#define PR_FID_MID PR_FID_VID //NSK : temporary to allow transition + +// message property - read only, xref ID in global ID format - used by PKM +#define PR_ORIGIN_ID PROP_TAG( PT_BINARY, pidMessageReadOnlyMin+0x0D) + +// computed message property used in search folders to determine quality of +// search hit match +// NOTE: ptag.h consumers, see also ptagMsgFolderTemplateRes3 +#define PR_RANK PROP_TAG( PT_LONG, pidAdminMin+0x82 ) + +// msg-folder property, read only +// value is PR_MSG_DELIVERY_TIME if it exists, else PR_CREATION_TIME +// used as the default sort time when subfolder rows are returned in views +#define PR_MSG_FOLD_TIME PROP_TAG( PT_SYSTIME, pidMessageReadOnlyMin+0x14) +#define PR_ICS_CHANGE_KEY PROP_TAG( PT_BINARY, pidMessageReadOnlyMin+0x15) + +// Writeable, used for recording send option dialog settings +#define PR_DEFERRED_SEND_NUMBER PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xB) +#define PR_DEFERRED_SEND_UNITS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xC) +#define PR_EXPIRY_NUMBER PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xD) +#define PR_EXPIRY_UNITS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xE) + +// Writeable, deferred send time +#define PR_DEFERRED_SEND_TIME PROP_TAG( PT_SYSTIME, pidExchangeXmitReservedMin+0xF) + +//Writeable, intended for both folders and messages in gateway mailbox +#define PR_GW_ADMIN_OPERATIONS PROP_TAG( PT_LONG, pidMessageWriteableMin) + +//Writeable, used for DMS messages +#define PR_P1_CONTENT PROP_TAG( PT_BINARY, 0x1100) +#define PR_P1_CONTENT_TYPE PROP_TAG( PT_BINARY, 0x1101) + +#define PR_REPLICA_SERVER_W PROP_TAG(PT_UNICODE, pidMessageReadOnlyMin+0x4) + +// Properties on deferred action messages +#define PR_CLIENT_ACTIONS PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x05) +#define PR_DAM_ORIGINAL_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x06) +#define PR_DAM_BACK_PATCHED PROP_TAG( PT_BOOLEAN, pidMessageReadOnlyMin+0x07) + +// Properties on deferred action error messages +#define PR_RULE_ERROR PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x08) +#define PR_RULE_ACTION_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x09) +#define PR_RULE_ACTION_NUMBER PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x10) +#define PR_RULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x11) + +// Mime representation of a message. +// Defined as 3 different types for convenience. Will be stored as file handle +// internally. +#define PR_INTERNET_CONTENT PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x1) +#define PR_INTERNET_CONTENT_HANDLE PROP_TAG(PT_FILE_HANDLE, pidMessageWriteableMin+0x1) +#define PR_INTERNET_CONTENT_EA PROP_TAG(PT_FILE_EA, pidMessageWriteableMin+0x1) + +// Dot-stuff state property on message +#define PR_DOTSTUFF_STATE PROP_TAG(PT_LONG, pidUserNonTransmitMin+0x1) + +// Raw byte count of mime stream, if mime exists. +#define PR_MIME_SIZE PROP_TAG(PT_LONG, 0x6746) +#define PR_MIME_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6746) + +// Raw byte count of ptagInternetContent, whether it is a mime message +// or freedoc using OURL +#define PR_FILE_SIZE PROP_TAG(PT_LONG, 0x6747) +#define PR_FILE_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6747) + +// Sender's editor format +#ifndef PR_MSG_EDITOR_FORMAT + #define PR_MSG_EDITOR_FORMAT PROP_TAG( PT_LONG, 0x5909 ) + #define EDITOR_FORMAT_DONTKNOW ((ULONG)0) + #define EDITOR_FORMAT_PLAINTEXT ((ULONG)1) + #define EDITOR_FORMAT_HTML ((ULONG)2) + #define EDITOR_FORMAT_RTF ((ULONG)3) +#endif + +#ifdef pidInternalWriteableNonTransMin +#if pidInternalWritableNonTranMin - 0x6740 +#pragma error("pidInternalWritableNonTransMin definition has changed, must change definition of PR_MIME_SIZE") +#endif +#endif + +// State of this inid as far as conversion is concerned. +// Reusing mailbox table property +#define PR_CONVERSION_STATE PROP_TAG(PT_LONG, PROP_ID(ptagAdminNickName)) + +// computed property used for moderated folder rule +// its an EntryId whose value is: +// ptagSenderEntryId on delivery +// LOGON::PbUserEntryId() for all other cases (move/copy/post) +#define PR_ACTIVE_USER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x12) + +// Property on conflict notification indicating entryid of conflicting object +#define PR_CONFLICT_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x10) + +// Property on messages to indicate the language client used to create this message +#define PR_MESSAGE_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x11) +#define PR_MESSAGE_CODEPAGE PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x1D) + +// Properties on Quota warning messages to indicate Storage quota and Excess used +#define PR_STORAGE_QUOTA_LIMIT PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x15) +#define PR_EXCESS_STORAGE_USED PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x16) +#define PR_SVR_GENERATING_QUOTA_MSG PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x17) + +// Property affixed by delegation rule and deleted on forwards +#define PR_DELEGATED_BY_RULE PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x03) + +// Message status bit used to indicate message is in conflict +#define MSGSTATUS_IN_CONFLICT ((ULONG) 0x0800) + +// Message status bit used to indicate the IMAP4 $MDNSent flag +#define MSGSTATUS_MDNSENT ((ULONG) 0x4000) + +// used to indicate how much X400 private extension data is present: none, just the +// message level, or both the message and recipient levels +// !!The high order byte of this ULONG is reserved.!! +#define ENV_BLANK ((ULONG)0x00000000) +#define ENV_RECIP_NUM ((ULONG)0x00000001) +#define ENV_MSG_EXT ((ULONG)0x00000002) +#define ENV_RECIP_EXT ((ULONG)0x00000004) + + + +#define PR_X400_ENVELOPE_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x13) +#define X400_ENV_PLAIN (ENV_BLANK) // no extension +#define X400_ENV_VALID_RECIP (ENV_RECIP_NUM | ENV_MSG_EXT) // just the message level extension +#define X400_ENV_FULL_EXT (ENV_RECIP_NUM | ENV_MSG_EXT | ENV_RECIP_EXT) // both message and recipient levels + +// +// bitmask that indicates whether RN, NRN, DR, NDR, OOF, Auto-Reply should be suppressed +// +#define AUTO_RESPONSE_SUPPRESS_DR ((ULONG)0x00000001) +#define AUTO_RESPONSE_SUPPRESS_NDR ((ULONG)0x00000002) +#define AUTO_RESPONSE_SUPPRESS_RN ((ULONG)0x00000004) +#define AUTO_RESPONSE_SUPPRESS_NRN ((ULONG)0x00000008) +#define AUTO_RESPONSE_SUPPRESS_OOF ((ULONG)0x00000010) +#define AUTO_RESPONSE_SUPPRESS_AUTO_REPLY ((ULONG)0x00000020) + +// raid 91101 - Flag indicates No RFC821 From field +#define AUTO_RESPONSE_SUPPRESS_NORFC821FROM ((ULONG)0x00000040) + +#define PR_AUTO_RESPONSE_SUPPRESS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x01) +#define PR_INTERNET_CPID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x02) + +#define PR_SYNCEVENT_FIRED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x0F) + +/*------------------------------------------------------------------------ + * + * ATTACHMENT object properties + * + *-----------------------------------------------------------------------*/ + +// Appears on attachments to a message marked to be in conflict. Identifies +// those attachments which are conflicting versions of the top level message +#define PR_IN_CONFLICT PROP_TAG(PT_BOOLEAN, pidAttachReadOnlyMin) + + +/*------------------------------------------------------------------------ + * + * DUMPSTER properties + * + *-----------------------------------------------------------------------*/ + +// Indicates when a message, folder, or mailbox has been deleted. +// (Read only, non transmittable property). +#define PR_DELETED_ON PROP_TAG(PT_SYSTIME, pidSpecialMin+0x1F) + +// Read-only folder properties which indicate the number of messages, and child folders +// that have been "soft" deleted in this folder (and the time the first message was deleted). +#define PR_DELETED_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin+0x08) +#define PR_DELETED_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin+0x0B) +#define PR_DELETED_FOLDER_COUNT PROP_TAG(PT_LONG, pidFolderMin+0x09) +#define PR_OLDEST_DELETED_ON PROP_TAG(PT_SYSTIME, pidFolderMin+0x0A) + +// Total size of all soft deleted messages +#define PR_DELETED_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x0B) + +// Total size of all normal soft deleted messages +#define PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x0C) + +// Total size of all associated soft deleted messages +#define PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x0D) + +// This property controls the retention age limit (minutes) for the Private/Public MDB, +// Mailbox (private only), or Folder (public). +// Note - the Folder/Mailbox retention, if set, overrides the MDB retention. +#define PR_RETENTION_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x34) + +// This property controls if we maintain per user read/unread for a public +// folder. By default (if this property is missing or set to FALSE) we will +// maintain per user read/unread. +#define PR_DISABLE_PERUSER_READ PROP_TAG(PT_BOOLEAN, pidAdminMin+0x35) + +// This property is set by JET after a full backup has occurred. +// It is used to determine whether or not messages and folders can be "hard" deleted +// before a full backup has captured the last modification to the object. +#define PR_LAST_FULL_BACKUP PROP_TAG(PT_SYSTIME, pidSpecialMin+0x15) + +/*------------------------------------------------------------------------ + * URL related properties + *-----------------------------------------------------------------------*/ +// This is read only property. +#define PR_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x77) //0x6707 +#define PR_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x77) +#define PR_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x77) + +// This is a read-write property. +#define PR_URL_COMP_NAME PROP_TAG(PT_TSTRING, pidRenMsgFldMin+0x73) +#define PR_URL_COMP_NAME_A PROP_TAG(PT_STRING8, pidRenMsgFldMin+0x73) +#define PR_URL_COMP_NAME_W PROP_TAG(PT_UNICODE, pidRenMsgFldMin+0x73) + +// this is a read-only property +#define PR_PARENT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7D) // 0x670d +#define PR_PARENT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7D) +#define PR_PARENT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7D) + +// read-only property +#define PR_FLAT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7E) // 0x670e +#define PR_FLAT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7E) +#define PR_FLAT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7E) + +// read-only property +#define PR_SRC_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7F) // 0x670f +#define PR_SRC_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7F) +#define PR_SRC_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7F) + + +// Constant wstring to specify URL with fid encoded directly in the URL +// For example, URL L"/~FlatUrlSpace/1-401" will refer to folder with FID 1-401 +// and URL L"/~FlatUrlSpace/1-401/2-8fb" will refer to message with MID 2-8fb +// in that folder. +// But remember that the FID/MID have to be long term, i.e GUID-Globcnt, +// the replid used above is simply to explain the idea simpler. +#define WSZ_URL_FLAT_FOLDER_SPACE L"/-FlatUrlSpace-/" +#define cwchUrlFlatFolderSpace 16 + +// Property that defines whether a folder is secure or not +#define PR_SECURE_IN_SITE PROP_TAG(PT_BOOLEAN, pidAdminMin+0x0E) + +// PR_LOCAL_COMMIT_TIME is maintained on folders and messages. It is the +// FileTime when the object was modified last on the given MDB. It is updated +// any time the object is modified (including replicated in change).This is +// strictly computed, non-transmittable and non-copyable. +#define PR_LOCAL_COMMIT_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x79) + +// PR_LOCAL_COMMIT_TIME_MAX is maintained on folders only. +// It is >= PR_LOCAL_COMMIT_TIME of all messages in the folder. It is updated +// any time any message in the folder is modified. This is strictly computed, +// non-transmittable and non-copyable. +#define PR_LOCAL_COMMIT_TIME_MAX PROP_TAG(PT_SYSTIME, pidAdminMin+0x7a) + +// PR_DELETED_COUNT_TOTAL is maintained on folders only. +// It is the total number of messages deleted in this folder from the beginning +// of time (well, rather from the time this feature is checked-in, folders from +// old servers that are upgraded will start with 0). If the count overflows the +// 4 bytes, it will start again at 0. This is updated whenever a message in the +// folder is deleted. This is strictly computed, non-transmitabble and +// non-copyable. +#define PR_DELETED_COUNT_TOTAL PROP_TAG(PT_LONG, pidAdminMin+0x7b) + +// PR_AUTO_RESET is maintained on messages only. Its PT_MV_CLSID and is deleted +// (by the store) anytime a message is saved, if it has not been +// explicitly set on the message between the time it was opened and saved +// (by the user/app that opened and later saved the message). +// It is intended to be used by async callback agents. +#define PR_AUTO_RESET PROP_TAG(PT_MV_CLSID, pidAdminMin+0x7c) + +/*------------------------------------------------------------------------ + * + * TABLE object properties + * + * Id Range: 0x662F-0x662F + * + *-----------------------------------------------------------------------*/ + +//This property can be used in a contents table to get PR_ENTRYID returned +//as a long term entryid instead of a short term entryid. +#define PR_LONGTERM_ENTRYID_FROM_TABLE PROP_TAG(PT_BINARY, pidSpecialMin) + +// This is read only property that is used for contents tables that include +// subfolder entries. +#define PR_SUBFOLDER PROP_TAG(PT_BOOLEAN, pidAdminMin+0x78) + +// This property shares the same value with PR_MEMBER_ID because their uses are +// mutually exclusive. Use this property on a message in a PST to get the short +// term EntryID of the parent folder. +#define PR_SHORTTERM_PARENT_ENTRYID_FROM_OBJECT PROP_TAG(PT_BINARY, pidSpecialMin + 0x01) + +//This property shares the same value with PR_MEMBER_NAME because their +//uses are mutually exclusive. Use this property on a message in a PST to get the short +//term EntryID of the message. +#define PR_SHORTTERM_ENTRYID_FROM_OBJECT PROP_TAG(PT_BINARY, pidSpecialMin + 0x02) + + + +/*------------------------------------------------------------------------ + * + * Gateway "MTE" ENVELOPE properties + * + * Id Range: 0x66E0-0x66FF + * + *-----------------------------------------------------------------------*/ + +#define PR_ORIGINATOR_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0x03) +#define PR_ORIGINATOR_ADDR PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0x04) +#define PR_ORIGINATOR_ADDRTYPE PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0x05) +#define PR_ORIGINATOR_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x06) +#define PR_ARRIVAL_TIME PROP_TAG(PT_SYSTIME, pidMessageWriteableMin+0x07) +#define PR_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x08) +#define PR_INTERNAL_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x12) +#define PR_SUBJECT_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x09) +#define PR_RECIPIENT_NUMBER PROP_TAG(PT_LONG, pidMessageWriteableMin+0x0A) +#define PR_MTS_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x0B) +#define PR_REPORT_DESTINATION_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0x0C) +#define PR_REPORT_DESTINATION_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x0D) +#define PR_CONTENT_SEARCH_KEY PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x0E) +#define PR_FOREIGN_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x0F) +#define PR_FOREIGN_REPORT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x10) +#define PR_FOREIGN_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x11) +#define PR_PROMOTE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x13) +#define PR_MTS_ID PR_MESSAGE_SUBMISSION_ID +#define PR_MTS_REPORT_ID PR_MESSAGE_SUBMISSION_ID + +/*------------------------------------------------------------------------ + * + * Trace properties format + * PR_TRACE_INFO + * PR_INTERNAL_TRACE_INFO + * + *-----------------------------------------------------------------------*/ + +#define MAX_ADMD_NAME_SIZ 17 +#define MAX_PRMD_NAME_SIZ 17 +#define MAX_COUNTRY_NAME_SIZ 4 +#define MAX_MTA_NAME_SIZ 33 + +#define ADMN_PAD 3 +#define PRMD_PAD 3 +#define COUNTRY_PAD 0 +#define MTA_PAD 3 +#define PRMD_PAD_FOR_ACTIONS 2 +#define MTA_PAD_FOR_ACTIONS 2 + +typedef struct { + LONG lAction; // The routing action the tracing site + // took.(1984 actions only) + FILETIME ftArrivalTime; // The time at which the communique + // entered the tracing site. + FILETIME ftDeferredTime; // The time are which the tracing site + // released the message. + char rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // ADMD + char rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Country + char rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // PRMD + char rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // Attempted ADMD + char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Attempted Country + char rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD_FOR_ACTIONS]; // Attempted PRMD + BYTE bAdditionalActions; // 1998 additional actions +} TRACEENTRY, FAR * LPTRACEENTRY; + +typedef struct { + ULONG cEntries; // Number of trace entries +#pragma warning(suppress:4200) // zero-sized array in struct/union + TRACEENTRY rgtraceentry[MAPI_DIM]; // array of trace entries +} TRACEINFO, FAR * LPTRACEINFO; + +typedef struct +{ + LONG lAction; // The 1984 routing action the tracing domain took. + FILETIME ftArrivalTime; // The time at which the communique entered the tracing domain. + FILETIME ftDeferredTime; // The time are which the tracing domain released the message. + char rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // ADMD + char rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Country + char rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // PRMD + char rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // Attempted ADMD + char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Attempted Country + char rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // Attempted PRMD + char rgchMTAName[MAX_MTA_NAME_SIZ+MTA_PAD]; // MTA Name + char rgchAttMTAName[MAX_MTA_NAME_SIZ+MTA_PAD_FOR_ACTIONS]; // Attempted MTA Name + BYTE bAdditionalActions; // 1988 additional actions +}INTTRACEENTRY, *PINTTRACEENTRY; + + +typedef struct +{ + ULONG cEntries; // Number of trace entries +#pragma warning(suppress:4200) // zero-sized array in struct/union + INTTRACEENTRY rgIntTraceEntry[MAPI_DIM]; // array of internal trace entries +}INTTRACEINFO, *PINTTRACEINFO; + + + +/*------------------------------------------------------------------------ + * + * "IExchangeModifyTable" Interface Declaration + * + * Used for get/set rules and access control on folders. + * + *-----------------------------------------------------------------------*/ + + +/* ulRowFlags */ +#define ROWLIST_REPLACE ((ULONG)1) + +#define ROW_ADD ((ULONG)1) +#define ROW_MODIFY ((ULONG)2) +#define ROW_REMOVE ((ULONG)4) +#define ROW_EMPTY (ROW_ADD|ROW_REMOVE) + +typedef struct _ROWENTRY +{ + ULONG ulRowFlags; + ULONG cValues; + LPSPropValue rgPropVals; +} ROWENTRY, FAR * LPROWENTRY; + +typedef struct _ROWLIST +{ + ULONG cEntries; +#pragma warning(suppress:4200) // zero-sized array in struct/union + ROWENTRY aEntries[MAPI_DIM]; +} ROWLIST, FAR * LPROWLIST; + +#define EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(ModifyTable) \ + (THIS_ ULONG ulFlags, \ + LPROWLIST lpMods) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeModifyTable +DECLARE_MAPI_INTERFACE_(IExchangeModifyTable, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeModifyTable, LPEXCHANGEMODIFYTABLE); + +/* Special flag bit for GetContentsTable, GetHierarchyTable and + OpenEntry. + Supported by > 5.x servers + If set in GetContentsTable and GetHierarchyTable + we will show only items that are soft deleted, i.e deleted + by user but not yet purged from the system. If set in OpenEntry + we will open this item even if it is soft deleted */ +/* Flag bits must not collide by existing definitions in Mapi */ + +/***** *****/ +/* Check MAPIDEFS.H and OMAPIDEFS.H for bits in use */ +/* The list below may not be fully up to date */ +/***** *****/ + +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +/****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */ +/****** CONVENIENT_DEPTH ((ULONG) 0x00000001) */ +#define SHOW_SOFT_DELETES ((ULONG) 0x00000002) +#define SHOW_SUBFOLDERS ((ULONG) 0x00000004) + +// Special flag for ModifyAclTable and GetTable (for ACL tables) +#define ACLTABLE_FREEBUSY ((ULONG) 0x00000002) + +// reserved flag bit(s) - do not set +#define MAPI_RESERVED1 ((ULONG) 0x00010000) + +// Do not block this OpenMessage (MAPI's OpenEntry) +#define MDB_OPEN_MSG_NO_BLOCK ((ULONG) 0x00000020) + +// Unlock a MID at SaveChanges +/****** KEEP_OPEN_READONLY ((ULONG) 0x00000001) */ +/****** KEEP_OPEN_READWRITE ((ULONG) 0x00000002) */ +/****** FORCE_SAVE ((ULONG) 0x00000004) */ +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) */ +#define MDB_SAVE_MSG_UNLOCK ((ULONG) 0x00000040) + + +/* Special flag bit for DeleteFolder + Supported by > 5.x servers + If set the server will hard delete the folder (i.e it will not be + retained for later recovery) */ +/* Flag bits must not collide by existing definitions in Mapi */ +/* DeleteFolder */ +/***** #define DEL_MESSAGES ((ULONG) 0x00000001) */ +/***** #define FOLDER_DIALOG ((ULONG) 0x00000002) */ +/***** #define DEL_FOLDERS ((ULONG) 0x00000004) */ +/***** #define DELETE_HARD_DELETE ((ULONG) 0x00000010) */ + +/* EmptyFolder */ +/***** #define DEL_ASSOCIATED ((ULONG) 0x00000008) */ +#define DELETE_HARD_DELETE ((ULONG) 0x00000010) + + +/* Access Control Specifics */ + +//Properties +#define PR_MEMBER_ID PROP_TAG(PT_I8, pidSpecialMin+0x01) +#define PR_MEMBER_NAME PROP_TAG(PT_TSTRING, pidSpecialMin+0x02) +#define PR_MEMBER_NAME_A PROP_TAG(PT_STRING8, pidSpecialMin+0x02) +#define PR_MEMBER_NAME_W PROP_TAG(PT_UNICODE, pidSpecialMin+0x02) +#define PR_MEMBER_ENTRYID PR_ENTRYID +#define PR_MEMBER_RIGHTS PROP_TAG(PT_LONG, pidSpecialMin+0x03) + +//Security bits +typedef DWORD RIGHTS; +#define frightsReadAny 0x0000001L +#define frightsCreate 0x0000002L +#define frightsEditOwned 0x0000008L +#define frightsDeleteOwned 0x0000010L +#define frightsEditAny 0x0000020L +#define frightsDeleteAny 0x0000040L +#define frightsCreateSubfolder 0x0000080L +#define frightsOwner 0x0000100L +#define frightsContact 0x0000200L // NOTE: not part of rightsAll +#define frightsVisible 0x0000400L +#define frightsFreeBusySimple 0x0000800L +#define frightsFreeBusyDetailed 0x0001000L +#define rightsNone 0x00000000 +#define rightsReadOnly frightsReadAny +#define rightsReadWrite (frightsReadAny|frightsEditAny) +#define rightsAll 0x00005FBL + + +// +// Mailbox specific access rights. +// + +// +// Note that the sdpermUser rights do NOT exist in any security descriptor, they +// are maintained on the mailbox object in the store, and initialized from the +// user object in the DS. +// +#define fsdpermUserDeleteMailbox DELETE +#define fsdpermUserMailboxOwner 0x00000001 +#define fsdpermUserSendAs 0x00000002 +#define fsdpermUserPrimaryUser 0x00000004 + + +#define sdpermUserGenericRead (STANDARD_RIGHTS_READ) + +// generic execute +#define sdpermUserGenericExecute (STANDARD_RIGHTS_EXECUTE) +// generic write +#define sdpermUserGenericWrite (STANDARD_RIGHTS_WRITE | fsdpermUserDeleteMailbox) + +// generic all +#define sdpermUserGenericAll (STANDARD_RIGHTS_ALL | fsdpermUserMailboxOwner | fsdpermUserSendAs | fsdpermUserPrimaryUser) + +// +// Message specific rights. +// +typedef DWORD SDRIGHTS; + +#define fsdrightReadBody 0x00000001 //** ONLY ON MESSAGES, SAME AS FILE_READ_DATA +#define fsdrightListContents 0x00000001 //** ONLY ON FOLDERS, SAME AS FILE_LIST_DATA - IGNORED +#define fsdrightWriteBody 0x00000002 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA +#define fsdrightCreateItem 0x00000002 //** ONLY ON FOLDERs, SAME AS FILE_ADD_FILE + +#define fsdrightAppendMsg 0x00000004 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA. ENFORCED BY IFS. +#define fsdrightCreateContainer 0x00000004 //** ONLY ON FOLDERS, SAME AS FILE_ADD_FILE + +#define fsdrightReadProperty 0x00000008 //** SAME AS FILE_READ_EA +#define fsdrightWriteProperty 0x00000010 //** SAME AS FILE_WRITE_EA + +#define fsdrightExecute 0x00000020 // Same as FILE_EXECUTE/FILE_TRAVERSE. ENFORCED BY IFS +#define fsdrightReserved1 0x00000040 // Same as FILE_DELETE_CHILD.. Currently unused +#define fsdrightReadAttributes 0x00000080 // Same as FILE_READ_ATTRIBUTES. Currently unused +#define fsdrightWriteAttributes 0x00000100 // Same as FILE_WRITE_ATTRIBUTES. Currently unused + +#define fsdrightWriteOwnProperty 0x00000200 //** ONLY ON MESSAGES +#define fsdrightDeleteOwnItem 0x00000400 //** ONLY ON MESSAGES +#define fsdrightViewItem 0x00000800 +#define fsdrightOwner 0x00004000 //** ONLY ON FOLDERS +#define fsdrightContact 0x00008000 //** ONLY ON FOLDERS + +// +// Standard NT rights. +// +#define fsdrightWriteSD WRITE_DAC +#define fsdrightDelete DELETE +#define fsdrightWriteOwner WRITE_OWNER +#define fsdrightReadControl READ_CONTROL +#define fsdrightSynchronize SYNCHRONIZE + +#define sdrightsNone 0x00000000 +#define sdrightsBestAccess MAXIMUM_ALLOWED +#define sdrightsReadOnly GENERIC_READ +#define sdrightsReadWrite GENERIC_READ | GENERIC_WRITE + +#define sdrightsGenericRead (fsdrightReadControl | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | fsdrightViewItem |\ + fsdrightSynchronize) +#define sdrightsGenericWrite (fsdrightReadControl | fsdrightWriteBody | fsdrightWriteAttributes | fsdrightWriteProperty | \ + fsdrightAppendMsg | fsdrightCreateItem | fsdrightDelete | fsdrightCreateContainer | \ + fsdrightOwner | fsdrightSynchronize | fsdrightWriteSD | fsdrightWriteOwner) + +#define sdrightsGenericExecute (fsdrightReadControl | fsdrightReadAttributes | fsdrightExecute | fsdrightViewItem | fsdrightSynchronize) + +#define sdrightsGenericAll (fsdrightDelete | fsdrightReadProperty | fsdrightWriteProperty |\ + fsdrightCreateItem | fsdrightCreateContainer | fsdrightReadControl | fsdrightWriteSD |\ + fsdrightWriteOwner | fsdrightReadControl | \ + fsdrightViewItem | fsdrightOwner | \ + fsdrightWriteOwnProperty | fsdrightDeleteOwnItem | fsdrightSynchronize | \ + fsdrightExecute | fsdrightReserved1 | fsdrightReadAttributes | fsdrightWriteAttributes | \ + fsdrightReadBody | fsdrightWriteBody | fsdrightSynchronize | fsdrightContact) + +// +// SDRights that together make up rightsOwner. +// +#define sdrightsFolderOwner (fsdrightWriteProperty | fsdrightOwner | fsdrightWriteSD | fsdrightDelete | \ + fsdrightWriteOwner | fsdrightWriteAttributes) + +// +// Rights that are valid on folders. +// +#define sdrightsFolders (fsdrightDelete | fsdrightReadProperty | fsdrightReadAttributes | \ + fsdrightWriteProperty | fsdrightWriteAttributes | fsdrightWriteOwner | \ + fsdrightReadControl | fsdrightWriteSD | fsdrightExecute | \ + fsdrightCreateContainer | fsdrightViewItem | fsdrightOwner | \ + fsdrightContact | fsdrightCreateItem | fsdrightSynchronize | fsdrightListContents | fsdrightReserved1) + +// +// Rights that are for Free/Busy NTSD +// + +#define fsdrightFreeBusySimple 0x00000001 +#define fsdrightFreeBusyDetailed 0x00000002 + +// +// Rights that are valid on messages. +// +// +// NB: fsdrightWriteOwnProperty/fsdrightDeleteOwnItem are NOT in this list. +// +#define sdrightsItems (fsdrightDelete | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | \ + fsdrightWriteProperty | fsdrightWriteBody | fsdrightWriteAttributes | fsdrightReadControl | \ + fsdrightWriteOwner | fsdrightWriteSD | fsdrightViewItem | fsdrightWriteOwnProperty | \ + fsdrightDeleteOwnItem | fsdrightSynchronize | fsdrightExecute | fsdrightAppendMsg) + +// +// These access rights are ignored in the determination of a canonical ACL. Since the exchange store ignores +// these rights, their presence or absense doesn't make an ACL canonical. +// + +#define sdrightsIgnored (fsdrightExecute | fsdrightAppendMsg | fsdrightContact | fsdrightReserved1) + +// +// Backwards Compatible rights definitions. +// +#define msgrightsGenericRead (sdrightsGenericRead & sdrightsItems) +#define msgrightsGenericWrite (sdrightsGenericWrite & sdrightsItems) +#define msgrightsGenericExecute (sdrightsGenericExecute & sdrightsItems) +#define msgrightsGenericAll (sdrightsGenericAll & sdrightsItems) + +#define fldrightsGenericRead (sdrightsGenericRead & sdrightsFolders) +#define fldrightsGenericWrite (sdrightsGenericWrite & sdrightsFolders) +#define fldrightsGenericExecute (sdrightsGenericExecute & sdrightsFolders) +#define fldrightsGenericAll (sdrightsGenericAll & sdrightsFolders) + +// +// If set in the RM control field of an NTSD, allows +// an administrator to explicitly set the SD on an object. +// +#define EXCHANGE_RM_SET_EXPLICIT_SD 0x01 + +// +// Retrieve the property ID from the guid + +#define GUID_PROP_ID(pguid) ((pguid)->Data1 & 0xffff) +#define GUID_SUB_PROP_ID(pguid) ((pguid)->Data1 >> 16 & 0xffff) + +#define SET_GUID_PROP_ID(pguid, ptag) (pguid)->Data1 = PROP_ID(ptag) +#define SET_GUID_SUB_PROP_ID(pguid, ptag, subptag) (pguid)->Data1 = (PROP_ID(ptag) | PROP_ID(subptag) << 16) + +#define PROPERTY_GUID(ptag) { PROP_ID(ptag), \ + 0x6585, 0x11d3, \ + {0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30}} \ + +#define SUB_PROPERTY_GUID(ptag, subptag) { PROP_ID(subptag) << 16 | PROP_ID(ptag), \ + 0x6585, 0x11d3, \ + {0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30}} \ + + +// +// Transfer version for PR_NT_SECURITY_DESCRIPTOR. +// +// When retrieving the security descriptor for an object, the SD returned is +// actually composed of the following structure: +// +// 2 BYTES Padding data length (including version) +// 2 BYTES Version +// 4 BYTES Security Information (for SetPrivateObjectSecurity) +// <0 or more> +// 2 BYTES Property Tag +// 16 BYTES Named Property GUID +// 1 BYTE Named property "kind" +// if (kind == MNID_ID) +// 4 BYTES Named property ID +// else +// +// Actual Security Descriptor +// +// To determine the security descriptor from PR_NT_SECURITY_DESCRIPTOR, +// use the SECURITY_DESCRIPTOR_OF macro. +// +// To determine the version of the security descriptor, use the SECURITY_DESCRIPTOR_VERSION macro. +// +// +// Please note that OLEDB/DAV reserves the even numbers of the transfer version, so it must ALWAYS be an odd number. +// +#define SECURITY_DESCRIPTOR_TRANSFER_VERSION 0x0003 + +#define SECURITY_DESCRIPTOR_OF(pb) (((BYTE *)(pb)) + *((WORD *)(pb))) +#define SECURITY_DESCRIPTOR_VERSION(pb) (*((WORD *)((pb) + sizeof(WORD)))) +#define SECURITY_INFORMATION_OF(pb) (*((DWORD *)((pb) + sizeof(WORD) + sizeof(WORD)))) +#define CbSecurityDescriptorHeader(pb) (*((WORD *)(pb))) + +// +// To check to see if the security descriptor version matches the currently compiled +// version. +// +#define FCheckSecurityDescriptorVersion(pb) (SECURITY_DESCRIPTOR_VERSION(pb) == SECURITY_DESCRIPTOR_TRANSFER_VERSION) + +// +// Role scopes +// +typedef BYTE ROLESCOPE; +#define ROLESCOPE_OBJECT 0x00 // Roles will be read from the object (folder or item) itself +#define ROLESCOPE_FOLDER 0x01 // Roles will be read from the folder itself, or the containing folder if it is an item +#define ROLESCOPE_MAX ROLESCOPE_FOLDER + +// +// Security authority used for role sids +// +#define SECURITY_EXCHANGE_AUTHORITY {0,0,0,0,0,8} + +// +// Application role properties +// +#define PR_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY, 0x3d25) +#define PR_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING, 0x3d25) +#define PR_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY, 0x3d26) +#define PR_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING, 0x3d26) +#define PR_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY, 0x3d27) +#define PR_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING, 0x3d27) +#define PR_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY, 0x3d28) +#define PR_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING, 0x3d28) +#define PR_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY, 0x3d29) +#define PR_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING, 0x3d29) +#define PR_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY, 0x3d2A) +#define PR_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING, 0x3d2A) +#define PR_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY, 0x3d2B) +#define PR_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING, 0x3d2B) +#define PR_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY, 0x3d2C) +#define PR_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING, 0x3d2C) +#define PR_NON_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY, 0x0E7C) +#define PR_NON_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING, 0x0E7C) +#define PR_NON_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY, 0x0E7D) +#define PR_NON_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING, 0x0E7D) +#define PR_NON_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY, 0x0E7E) +#define PR_NON_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING, 0x0E7E) +#define PR_NON_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY, 0x0E7F) +#define PR_NON_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING, 0x0E7F) +#define PR_NON_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY, 0x0E80) +#define PR_NON_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING, 0x0E80) +#define PR_NON_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY, 0x0E81) +#define PR_NON_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING, 0x0E81) +#define PR_NON_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY, 0x0E82) +#define PR_NON_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING, 0x0E82) +#define PR_NON_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY, 0x0E83) +#define PR_NON_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING, 0x0E83) + + +/* Rules specifics */ + +// Property types +#define PT_SRESTRICTION ((ULONG) 0x00FD) +#define PT_ACTIONS ((ULONG) 0x00FE) + +/*----------------------------------------------------------------------- + * PT_FILE_HANDLE: real data is in file specified by handle. + * prop.Value.l has file handle + * PT_FILE_EA: real data is in file specified by extended attribute + * prop.Value.bin has binary EA data + * PT_VIRTUAL: real data is computed on the fly. + * prop.Value.bin has raw binary virtual property blob that has + * information to do conversion. This is internal to the store and + * is not supported for outside calls. + *-----------------------------------------------------------------------*/ + +#define PT_FILE_HANDLE ((ULONG) 0x0103) +#define PT_FILE_EA ((ULONG) 0x0104) +#define PT_VIRTUAL ((ULONG) 0x0105) + +#define FVirtualProp(ptag) (PROP_TYPE(ptag) == PT_VIRTUAL) +#define FFileHandleProp(ptag) (PROP_TYPE(ptag) == PT_FILE_HANDLE || PROP_TYPE(ptag) == PT_FILE_EA) + +//Properties in rule table +#define PR_RULE_ID PROP_TAG(PT_I8, pidSpecialMin+0x04) +#define PR_RULE_IDS PROP_TAG(PT_BINARY, pidSpecialMin+0x05) +#define PR_RULE_SEQUENCE PROP_TAG(PT_LONG, pidSpecialMin+0x06) +#define PR_RULE_STATE PROP_TAG(PT_LONG, pidSpecialMin+0x07) +#define PR_RULE_USER_FLAGS PROP_TAG(PT_LONG, pidSpecialMin+0x08) +#define PR_RULE_CONDITION PROP_TAG(PT_SRESTRICTION, pidSpecialMin+0x09) +#define PR_RULE_ACTIONS PROP_TAG(PT_ACTIONS, pidSpecialMin+0x10) +#define PR_RULE_PROVIDER PROP_TAG(PT_STRING8, pidSpecialMin+0x11) +#define PR_RULE_NAME PROP_TAG(PT_TSTRING, pidSpecialMin+0x12) +#define PR_RULE_LEVEL PROP_TAG(PT_LONG, pidSpecialMin+0x13) +#define PR_RULE_PROVIDER_DATA PROP_TAG(PT_BINARY, pidSpecialMin+0x14) + +#define PR_EXTENDED_RULE_ACTIONS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x59) +#define PR_EXTENDED_RULE_CONDITION PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x5a) +#define PR_EXTENDED_RULE_SIZE_LIMIT PROP_TAG(PT_LONG, pidStoreNonTransMin+0x5b) + +// moved to ptag.h (scottno) - still needed for 2.27 upgrader +// #define PR_RULE_VERSION PROP_TAG( PT_I2, pidSpecialMin+0x1D) + +//PR_STATE property values +#define ST_DISABLED 0x0000 +#define ST_ENABLED 0x0001 +#define ST_ERROR 0x0002 +#define ST_ONLY_WHEN_OOF 0x0004 +#define ST_KEEP_OOF_HIST 0x0008 +#define ST_EXIT_LEVEL 0x0010 +#define ST_SKIP_IF_SCL_IS_SAFE 0x0020 +#define ST_RULE_PARSE_ERROR 0x0040 +#define ST_CLEAR_OOF_HIST 0x80000000 + +//Empty restriction +#define NULL_RESTRICTION 0xff + +// special RELOP for Member of DL +#define RELOP_MEMBER_OF_DL 100 + +//Action types +typedef enum +{ + OP_MOVE = 1, + OP_COPY, + OP_REPLY, + OP_OOF_REPLY, + OP_DEFER_ACTION, + OP_BOUNCE, + OP_FORWARD, + OP_DELEGATE, + OP_TAG, + OP_DELETE, + OP_MARK_AS_READ, + +} ACTTYPE; + +// provider name for moderator rules +#define szProviderModeratorRule "MSFT:MR" +#define wszProviderModeratorRule L"MSFT:MR" + +// action flavors + +// for OP_REPLY +#define DO_NOT_SEND_TO_ORIGINATOR 1 +#define STOCK_REPLY_TEMPLATE 2 + +// for OP_FORWARD +#define FWD_PRESERVE_SENDER 1 +#define FWD_DO_NOT_MUNGE_MSG 2 +#define FWD_AS_ATTACHMENT 4 + +//scBounceCode values +#define BOUNCE_MESSAGE_SIZE_TOO_LARGE (SCODE) MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD +#define BOUNCE_FORMS_MISMATCH (SCODE) MAPI_DIAG_RENDITION_UNSUPPORTED +#define BOUNCE_ACCESS_DENIED (SCODE) MAPI_DIAG_MAIL_REFUSED + +//Message class prefix for Reply and OOF Reply templates +#define szReplyTemplateMsgClassPrefix "IPM.Note.Rules.ReplyTemplate." +#define szOofTemplateMsgClassPrefix "IPM.Note.Rules.OofTemplate." + +//Action structure +typedef struct _action +{ + ACTTYPE acttype; + + // to indicate which flavour of the action. + ULONG ulActionFlavor; + + // Action restriction + // currently unsed and must be set to NULL + LPSRestriction lpRes; + + // currently unused, must be set to 0. + LPSPropTagArray lpPropTagArray; + + // User defined flags + ULONG ulFlags; + + // padding to align the union on 8 byte boundary + ULONG dwAlignPad; + + union + { + // used for OP_MOVE and OP_COPY actions + struct + { + ULONG cbStoreEntryId; + LPENTRYID lpStoreEntryId; + ULONG cbFldEntryId; + LPENTRYID lpFldEntryId; + } actMoveCopy; + + // used for OP_REPLY and OP_OOF_REPLY actions + struct + { + ULONG cbEntryId; + LPENTRYID lpEntryId; + GUID guidReplyTemplate; + } actReply; + + // used for OP_DEFER_ACTION action + struct + { + ULONG cbData; + BYTE *pbData; + } actDeferAction; + + // Error code to set for OP_BOUNCE action + SCODE scBounceCode; + + // list of address for OP_FORWARD and OP_DELEGATE action + LPADRLIST lpadrlist; + + // prop value for OP_TAG action + SPropValue propTag; + }; +} ACTION, FAR * LPACTION; + +// Rules version +#define EDK_RULES_VERSION 1 + +//Array of actions +typedef struct _actions +{ + ULONG ulVersion; // use the #define above + UINT cActions; + LPACTION lpAction; +} ACTIONS; + +#ifdef __cplusplus +extern "C" { +#endif +HRESULT WINAPI +HrSerializeSRestriction(IMAPIProp * pprop, LPSRestriction prest, BYTE ** ppbRest, ULONG * pcbRest); + +HRESULT WINAPI +HrDeserializeSRestriction(IMAPIProp * pprop, BYTE * pbRest, ULONG cbRest, LPSRestriction * pprest); + +HRESULT WINAPI +HrSerializeActions(IMAPIProp * pprop, ACTIONS * pActions, BYTE ** ppbActions, ULONG * pcbActions); + +HRESULT WINAPI +HrDeserializeActions(IMAPIProp * pprop, BYTE * pbActions, ULONG cbActions, ACTIONS ** ppActions); +#ifdef __cplusplus +} // extern "C" +#endif + +// message class definitions for Deferred Action and Deffered Error messages +#define szDamMsgClass "IPC.Microsoft Exchange 4.0.Deferred Action" +#define szDemMsgClass "IPC.Microsoft Exchange 4.0.Deferred Error" + +#define szExRuleMsgClass "IPM.ExtendedRule.Message" +#define wszExRuleMsgClass L"IPM.ExtendedRule.Message" + +/* + * Rule error codes + * Values for PR_RULE_ERROR + */ +#define RULE_ERR_UNKNOWN 1 //general catchall error +#define RULE_ERR_LOAD 2 //unable to load folder rules +#define RULE_ERR_DELIVERY 3 //unable to deliver message temporarily +#define RULE_ERR_PARSING 4 //error while parsing +#define RULE_ERR_CREATE_DAE 5 //error creating DAE message +#define RULE_ERR_NO_FOLDER 6 //folder to move/copy doesn't exist +#define RULE_ERR_NO_RIGHTS 7 //no rights to move/copy into folder +#define RULE_ERR_CREATE_DAM 8 //error creating DAM +#define RULE_ERR_NO_SENDAS 9 //can not send as another user +#define RULE_ERR_NO_TEMPLATE 10 //reply template is missing +#define RULE_ERR_EXECUTION 11 //error in rule execution +#define RULE_ERR_QUOTA_EXCEEDED 12 //mailbox quota size exceeded +#define RULE_ERR_TOO_MANY_RECIPS 13 //number of recips exceded upper limit + +#define RULE_ERR_FIRST RULE_ERR_UNKNOWN +#define RULE_ERR_LAST RULE_ERR_TOO_MANY_RECIPS + +/*------------------------------------------------------------------------ + * + * "IExchangeRuleAction" Interface Declaration + * + * Used for get actions from a Deferred Action Message. + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGERULEACTION_METHODS(IPURE) \ + MAPIMETHOD(ActionCount) \ + (THIS_ ULONG FAR * lpcActions) IPURE; \ + MAPIMETHOD(GetAction) \ + (THIS_ ULONG ulActionNumber, \ + LARGE_INTEGER * lpruleid, \ + LPACTION FAR * lppAction) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeRuleAction +DECLARE_MAPI_INTERFACE_(IExchangeRuleAction, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGERULEACTION_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeRuleAction, LPEXCHANGERULEACTION); + +/*------------------------------------------------------------------------ + * + * "IExchangeManageStore" Interface Declaration + * + * Used for store management functions. + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(IPURE) \ + MAPIMETHOD(CreateStoreEntryID) \ + (THIS_ LPCSTR lpszMsgStoreDN, \ + LPCSTR lpszMailboxDN, \ + ULONG ulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(EntryIDFromSourceKey) \ + (THIS_ ULONG cFolderKeySize, \ + BYTE FAR * lpFolderSourceKey, \ + ULONG cMessageKeySize, \ + BYTE FAR * lpMessageSourceKey, \ + ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(GetRights) \ + (THIS_ ULONG cbUserEntryID, \ + LPENTRYID lpUserEntryID, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG FAR * lpulRights) IPURE; \ + MAPIMETHOD(GetMailboxTable) \ + (THIS_ LPSTR lpszServerName, \ + LPMAPITABLE FAR * lppTable, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetPublicFolderTable) \ + (THIS_ LPSTR lpszServerName, \ + LPMAPITABLE FAR * lppTable, \ + ULONG ulFlags) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore +DECLARE_MAPI_INTERFACE_(IExchangeManageStore, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore, LPEXCHANGEMANAGESTORE); + + +/*------------------------------------------------------------------------ + * + * "IExchangeManageStoreEx" Interface Declaration + * + * Used for store management functions. + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(IPURE) \ + MAPIMETHOD(CreateNewsgroupNameEntryID) \ + (THIS_ LPSTR lpszNewsgroupName, \ + ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore2 +DECLARE_MAPI_INTERFACE_(IExchangeManageStore2, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore2, LPEXCHANGEMANAGESTORE2); + + +/*------------------------------------------------------------------------ + * + * "IExchangeManageStore3" Interface Declaration + * + * Used for store management functions. + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(IPURE) \ + MAPIMETHOD(GetMailboxTableOffset) \ + (THIS_ LPSTR lpszServerName, \ + LPMAPITABLE FAR * lppTable, \ + ULONG ulFlags, \ + UINT uOffset) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore3 +DECLARE_MAPI_INTERFACE_(IExchangeManageStore3, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore3, LPEXCHANGEMANAGESTORE3); + + +/*------------------------------------------------------------------------ + * + * "IExchangeManageStore4" Interface Declaration + * + * Used for store management functions. + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(IPURE) \ + MAPIMETHOD(GetPublicFolderTableOffset) \ + (THIS_ LPSTR lpszServerName, \ + LPMAPITABLE FAR * lppTable, \ + ULONG ulFlags, \ + UINT uOffset) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore4 +DECLARE_MAPI_INTERFACE_(IExchangeManageStore4, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore4, LPEXCHANGEMANAGESTORE4); + + +/*------------------------------------------------------------------------ + * + * "IExchangeNntpNewsfeed" Interface Declaration + * + * Used for Nntp pull newsfeed. + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(IPURE) \ + MAPIMETHOD(Configure) \ + (THIS_ LPSTR lpszNewsfeedDN, \ + ULONG cValues, \ + LPSPropValue lpIMailPropArray) IPURE; \ + MAPIMETHOD(CheckMsgIds) \ + (THIS_ LPSTR lpszMsgIds, \ + ULONG FAR * lpcfWanted, \ + BYTE FAR ** lppfWanted) IPURE; \ + MAPIMETHOD(OpenArticleStream) \ + (THIS_ LPSTREAM FAR * lppStream) IPURE; \ + + +#undef INTERFACE +#define INTERFACE IExchangeNntpNewsfeed +DECLARE_MAPI_INTERFACE_(IExchangeNntpNewsfeed, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeNntpNewsfeed, LPEXCHANGENNTPNEWSFEED); + +// Properties for GetMailboxTable +#define PR_NT_USER_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x10) +// +// PR_LOCALE_ID definition has been moved down and combined with other +// locale-specific properties. It is still being returned through the +// mailbox table. +// +//#define PR_LOCALE_ID PROP_TAG( PT_LONG, pidAdminMin+0x11 ) +#define PR_LAST_LOGON_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x12 ) +#define PR_LAST_LOGOFF_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x13 ) +#define PR_STORAGE_LIMIT_INFORMATION PROP_TAG(PT_LONG, pidAdminMin+0x14 ) +// property on disabling message read (unread) receipt +// reusing Folders table property (pidAdminMin+0x15) +#define PR_INTERNET_MDNS PROP_TAG(PT_BOOLEAN, PROP_ID(PR_NEWSGROUP_COMPONENT)) + +// properties for mailbox quota info - reusing properties from folder table - +// folder pathname, owner, and contacts re-used. +#define PR_QUOTA_WARNING_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x91) +#define PR_QUOTA_SEND_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x92) +#define PR_QUOTA_RECEIVE_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x93) + + +// Properties for GetPublicFolderTable +#define PR_FOLDER_FLAGS PROP_TAG(PT_LONG, pidAdminMin+0x18) +#define PR_LAST_ACCESS_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x19) +#define PR_RESTRICTION_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1A) +#define PR_CATEG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1B) +#define PR_CACHED_COLUMN_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1C) +#define PR_NORMAL_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1D) +#define PR_ASSOC_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1E) +#define PR_RECIPIENT_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1F) +#define PR_RECIPIENT_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x20) +#define PR_ATTACH_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x21) +#define PR_ATTACH_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x22) +#define PR_NORMAL_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin+0x23) +#define PR_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x23) +#define PR_ASSOC_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin+0x24) +#define PR_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x24) +#define PR_FOLDER_PATHNAME PROP_TAG(PT_TSTRING, pidAdminMin+0x25) +#define PR_FOLDER_PATHNAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x25) +#define PR_FOLDER_PATHNAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x25) +#define PR_OWNER_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x26) +#define PR_CONTACT_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x27) + +/* the absolute size limitation of a public folder */ +#define PR_PF_OVER_HARD_QUOTA_LIMIT PROP_TAG(PT_I8, pidAdminMin+0x91) +/* the size limit of a message in a public folder */ +#define PR_PF_MSG_SIZE_LIMIT PROP_TAG(PT_I8, pidAdminMin+0x92) + +// Do not inherit expiry settings from the MDB wide settings and instead use folder specific ones +// (if folder specific is not set, it will still not get from MDB and remain with no expiry at all) +#define PR_PF_DISALLOW_MDB_WIDE_EXPIRY PROP_TAG(PT_BOOLEAN, pidAdminMin+0x93) + +// Locale-specific properties +#define PR_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin+0x11) +#define PR_CODE_PAGE_ID PROP_TAG(PT_LONG, pidAdminMin+0x33) +#define PR_SORT_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin+0x75) + +// PT_I8 version of PR_MESSAGE_SIZE defined in mapitags.h +#define PR_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, PROP_ID(PR_MESSAGE_SIZE)) + +/* Bits in PR_FOLDER_FLAGS */ +#define MDB_FOLDER_IPM 0x1 +#define MDB_FOLDER_SEARCH 0x2 +#define MDB_FOLDER_NORMAL 0x4 +#define MDB_FOLDER_RULES 0x8 + +/* Bits used in ulFlags in GetPublicFolderTable() */ +#define MDB_NON_IPM 0x10 +#define MDB_IPM 0x20 + +/* Bits in PR_STORAGE_LIMIT_INFORMATION */ +#define MDB_LIMIT_BELOW 0x1 +#define MDB_LIMIT_ISSUE_WARNING 0x2 +#define MDB_LIMIT_PROHIBIT_SEND 0x4 +#define MDB_LIMIT_NO_CHECK 0x8 +#define MDB_LIMIT_DISABLED 0x10 + +/* A define for "no quota infomation" when retrieving the quota information */ +#define MDB_QUOTA_NOQUOTA 0xFFFFFFFF + +/*------------------------------------------------------------------------ + * + * "IExchangeFastTransfer" Interface Declaration + * + * Used for fast transfer interface used to + * implement CopyTo, CopyProps, CopyFolder, and + * CopyMessages. + * + *-----------------------------------------------------------------------*/ + +// Transfer flags +// Use MAPI_MOVE for move option + +// Transfer methods +#define TRANSFER_COPYTO 1 +#define TRANSFER_COPYPROPS 2 +#define TRANSFER_COPYMESSAGES 3 +#define TRANSFER_COPYFOLDER 4 + + +#define EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(IPURE) \ + MAPIMETHOD(Config) \ + (THIS_ ULONG ulFlags, \ + ULONG ulTransferMethod) IPURE; \ + MAPIMETHOD(TransferBuffer) \ + (THIS_ ULONG cb, \ + LPBYTE lpb, \ + ULONG *lpcbProcessed) IPURE; \ + MAPIMETHOD_(BOOL, IsInterfaceOk) \ + (THIS_ ULONG ulTransferMethod, \ + REFIID refiid, \ + LPSPropTagArray lpptagList, \ + ULONG ulFlags) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeFastTransfer +DECLARE_MAPI_INTERFACE_(IExchangeFastTransfer, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeFastTransfer, LPEXCHANGEFASTTRANSFER); + + + +/*------------------------------------------------------------------------ + * + * "IExchangeExportChanges" Interface Declaration + * + * Used for Incremental Synchronization + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, \ + ULONG ulFlags, \ + LPUNKNOWN lpUnk, \ + LPSRestriction lpRestriction, \ + LPSPropTagArray lpIncludeProps, \ + LPSPropTagArray lpExcludeProps, \ + ULONG ulBufferSize) IPURE; \ + MAPIMETHOD(Synchronize) \ + (THIS_ ULONG FAR * lpulSteps, \ + ULONG FAR * lpulProgress) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeExportChanges +DECLARE_MAPI_INTERFACE_(IExchangeExportChanges, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges, LPEXCHANGEEXPORTCHANGES); + +/*------------------------------------------------------------------------ + * + * "IExchangeExportChanges2" Interface Declaration + * + * Used for Incremental Synchronization + * Has the Config2 method for configuring for internet format conversion streams + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(IPURE) \ + MAPIMETHOD(ConfigForConversionStream) \ + (THIS_ LPSTREAM lpStream, \ + ULONG ulFlags, \ + LPUNKNOWN lpUnk, \ + LPSRestriction lpRestriction, \ + ULONG cValuesConversion, \ + LPSPropValue lpPropArrayConversion, \ + ULONG ulBufferSize) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeExportChanges2 +DECLARE_MAPI_INTERFACE_(IExchangeExportChanges2, IExchangeExportChanges) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges2, LPEXCHANGEEXPORTCHANGES2); + +/*------------------------------------------------------------------------ + * + * "IExchangeExportChanges3" Interface Declaration + * + * Used for Incremental Synchronization + * Has the Config3 method for configuring for selective message download + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(IPURE) \ + MAPIMETHOD(ConfigForSelectiveSync) \ + (THIS_ LPSTREAM lpStream, \ + ULONG ulFlags, \ + LPUNKNOWN lpUnk, \ + LPENTRYLIST lpMsgList, \ + LPSRestriction lpRestriction, \ + LPSPropTagArray lpIncludeProps, \ + LPSPropTagArray lpExcludeProps, \ + ULONG ulBufferSize) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeExportChanges3 +DECLARE_MAPI_INTERFACE_(IExchangeExportChanges3, IExchangeExportChanges2) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges3, LPEXCHANGEEXPORTCHANGES3); + +typedef struct _ReadState +{ + ULONG cbSourceKey; + BYTE * pbSourceKey; + ULONG ulFlags; +} READSTATE, *LPREADSTATE; + +/*------------------------------------------------------------------------ + * + * "IExchangeImportContentsChanges" Interface Declaration + * + * Used for Incremental Synchronization of folder contents (i.e. messages) + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; \ + MAPIMETHOD(ImportMessageChange) \ + (THIS_ ULONG cpvalChanges, \ + LPSPropValue ppvalChanges, \ + ULONG ulFlags, \ + LPMESSAGE *lppmessage) IPURE; \ + MAPIMETHOD(ImportMessageDeletion) \ + (THIS_ ULONG ulFlags, \ + LPENTRYLIST lpSrcEntryList) IPURE; \ + MAPIMETHOD(ImportPerUserReadStateChange) \ + (THIS_ ULONG cElements, \ + LPREADSTATE lpReadState) IPURE; \ + MAPIMETHOD(ImportMessageMove) \ + (THIS_ ULONG cbSourceKeySrcFolder, \ + BYTE FAR * pbSourceKeySrcFolder, \ + ULONG cbSourceKeySrcMessage, \ + BYTE FAR * pbSourceKeySrcMessage, \ + ULONG cbPCLMessage, \ + BYTE FAR * pbPCLMessage, \ + ULONG cbSourceKeyDestMessage, \ + BYTE FAR * pbSourceKeyDestMessage, \ + ULONG cbChangeNumDestMessage, \ + BYTE FAR * pbChangeNumDestMessage) IPURE; + + +#undef INTERFACE +#define INTERFACE IExchangeImportContentsChanges +DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges, + LPEXCHANGEIMPORTCONTENTSCHANGES); + +/*------------------------------------------------------------------------ + * + * "IExchangeImportContentsChanges2" Interface Declaration + * + * Used for Incremental Synchronization of folder contents (i.e. messages) + * This interface allows you to import message changes as an internet + * format conversion stream + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(IPURE) \ + MAPIMETHOD(ConfigForConversionStream) \ + (THIS_ LPSTREAM lpStream, \ + ULONG ulFlags, \ + ULONG cValuesConversion, \ + LPSPropValue lpPropArrayConversion) IPURE; \ + MAPIMETHOD(ImportMessageChangeAsAStream) \ + (THIS_ ULONG cpvalChanges, \ + LPSPropValue ppvalChanges, \ + ULONG ulFlags, \ + LPSTREAM *lppstream) IPURE; \ + + +#undef INTERFACE +#define INTERFACE IExchangeImportContentsChanges2 +DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges2, IExchangeImportContentsChanges) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE) + EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges2, + LPEXCHANGEIMPORTCONTENTSCHANGES2); + + +/*------------------------------------------------------------------------ + * + * "IExchangeImportHierarchyChanges" Interface Declaration + * + * Used for Incremental Synchronization of folder hierarchy + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; \ + MAPIMETHOD(ImportFolderChange) \ + (THIS_ ULONG cpvalChanges, \ + LPSPropValue ppvalChanges) IPURE; \ + MAPIMETHOD(ImportFolderDeletion) \ + (THIS_ ULONG ulFlags, \ + LPENTRYLIST lpSrcEntryList) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeImportHierarchyChanges +DECLARE_MAPI_INTERFACE_(IExchangeImportHierarchyChanges, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeImportHierarchyChanges, + LPEXCHANGEIMPORTHIERARCHYCHANGES); + +#define ulHierChanged (0x01) + +#define EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(IPURE) \ + MAPIMETHOD_(ULONG, OnNotify) \ + (THIS_ ULONG ulFlags, \ + LPENTRYLIST lpEntryList) IPURE; \ + +#undef INTERFACE +#define INTERFACE IExchangeChangeAdviseSink +DECLARE_MAPI_INTERFACE_(IExchangeChangeAdviseSink, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdviseSink, + LPEXCHANGECHANGEADVISESINK); + +#define EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, \ + LPGUID lpGUID, \ + LPEXCHANGECHANGEADVISESINK lpAdviseSink, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; \ + MAPIMETHOD(AddKeys) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; \ + MAPIMETHOD(RemoveKeys) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeChangeAdvisor +DECLARE_MAPI_INTERFACE_(IExchangeChangeAdvisor, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdvisor, + LPEXCHANGECHANGEADVISOR); + +/*-------------------------------------------------------------------- + * + * "IExchangeBadItemCallback" Interface Declaration + * + * Used to report bad items during move mailbox + * + *--------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(IPURE) \ + MAPIMETHOD(BadItem) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPWSTR lpwszFolderName, \ + LPSBinary lpsbFolderEid, \ + ULONG cValues, \ + LPSPropValue lpPropArray) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeBadItemCallback +DECLARE_MAPI_INTERFACE_(IExchangeBadItemCallback, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(PURE) +}; +#undef IMPL +#define IMPL + +DECLARE_MAPI_INTERFACE_PTR(IExchangeBadItemCallback, + LPEXCHANGEBADITEMCALLBACK); + +/*-------------------------------------------------------------------- + * + * "IExchangeMoveUserProgress" Interface Declaration + * + * Used to report per folder progress during move mailbox + * + *--------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(IPURE) \ + MAPIMETHOD(NextFolder) \ + (THIS_ ULONG ulFlags, \ + LPWSTR lpwszFolderName) IPURE; \ + MAPIMETHOD(Progress) \ + (THIS_ ULONG ulFlags, \ + ULONG ulCount, \ + ULONG ulTotal) IPURE; \ + MAPIMETHOD(Restart) \ + (THIS_ ULONG ulFlags) IPURE; \ + +#undef INTERFACE +#define INTERFACE IExchangeMoveUserProgress +DECLARE_MAPI_INTERFACE_(IExchangeMoveUserProgress, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(PURE) +}; +#undef IMPL +#define IMPL + +DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, + LPEXCHANGEMOVEUSERPROGRESS); + +// Internal flag for IMsgStore::CopyTo which tells the move user processing +// that there are potential extended callback objects hanhing off of the +// IMAPIProgress object. +#define MAPI_EXTENDEDCALLBACKS ((ULONG) 0x00000400) + + +/*------------------------------------------------------------------------ + * + * Errors returned by Exchange Incremental Change Synchronization Interface + * + *-----------------------------------------------------------------------*/ + +#define MAKE_SYNC_E(err) (MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, err)) +#define MAKE_SYNC_W(warn) (MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, warn)) + +#define SYNC_E_UNKNOWN_FLAGS MAPI_E_UNKNOWN_FLAGS +#define SYNC_E_INVALID_PARAMETER E_INVALIDARG +#define SYNC_E_ERROR E_FAIL +#define SYNC_E_OBJECT_DELETED MAKE_SYNC_E(0x800) +#define SYNC_E_IGNORE MAKE_SYNC_E(0x801) +#define SYNC_E_CONFLICT MAKE_SYNC_E(0x802) +#define SYNC_E_NO_PARENT MAKE_SYNC_E(0x803) +#define SYNC_E_CYCLE MAKE_SYNC_E(0x804) +#define SYNC_E_UNSYNCHRONIZED MAKE_SYNC_E(0x805) + +#define SYNC_W_PROGRESS MAKE_SYNC_W(0x820) +#define SYNC_W_CLIENT_CHANGE_NEWER MAKE_SYNC_W(0x821) + +/*------------------------------------------------------------------------ + * + * Flags used by Exchange Incremental Change Synchronization Interface + * + *-----------------------------------------------------------------------*/ + +#define SYNC_UNICODE 0x00000001 +#define SYNC_NO_DELETIONS 0x00000002 +#define SYNC_NO_SOFT_DELETIONS 0x00000004 +#define SYNC_READ_STATE 0x00000008 +#define SYNC_ASSOCIATED 0x00000010 +#define SYNC_NORMAL 0x00000020 +#define SYNC_NO_CONFLICTS 0x00000040 +#define SYNC_ONLY_SPECIFIED_PROPS 0x00000080 +#define SYNC_NO_FOREIGN_KEYS 0x00000100 +#define SYNC_LIMITED_IMESSAGE 0x00000200 +#define SYNC_CATCHUP 0x00000400 +#define SYNC_NEW_MESSAGE 0x00000800 // only applicable to ImportMessageChange() +#define SYNC_MSG_SELECTIVE 0x00001000 // Used internally. Will reject if used by clients. +#define SYNC_BEST_BODY 0x00002000 // use the best body logic for sync +#define SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED 0x00004000 // don't allow associated headers +#define SYNC_PROGRESS_MODE 0x00008000 // AirMapi progress mode +#define SYNC_FXRECOVERMODE 0x00010000 // skip bad item +#define SYNC_DEFER_CONFIG 0x00040000 // INTERNAL: Defer ropIncrCfg until first ropFXGetSrcBuffer +#define SYNC_FORCE_UNICODE 0x40000 // Forces server to return Unicode properties + +/*------------------------------------------------------------------------ + * + * Flags used by ImportMessageDeletion and ImportFolderDeletion methods + * + *-----------------------------------------------------------------------*/ + +#define SYNC_SOFT_DELETE 0x01 +#define SYNC_EXPIRY 0x02 + +/*------------------------------------------------------------------------ + * + * Flags used by ImportPerUserReadStateChange method + * + *-----------------------------------------------------------------------*/ + +#define SYNC_READ 0x01 + +/*------------------------------------------------------------------------ + * + * Extended Flags used by CopyMessages method + * + *-----------------------------------------------------------------------*/ + +#define MESSAGE_BEST_BODY 0x10 +#define MESSAGE_SEND_ENTRYID 0x20 + +/*------------------------------------------------------------------------ + * + * Extended Flags used by GetHierarchyTable method + * + *-----------------------------------------------------------------------*/ + +#define SUPRESS_NOTIFICATIONS_ON_MY_ACTIONS 0x01000 + + +/*------------------------------------------------------------------------ + * + * "IExchangeFavorites" Interface Declaration + * + * Used for adding or removing favorite folders from the public store. + * This interface is obtained by calling QueryInterface on the folder + * whose EntryID is specified by PR_IPM_FAVORITES_ENTRYID on the public + * store. + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEFAVORITES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(AddFavorites) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; \ + MAPIMETHOD(DelFavorites) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; \ + +#undef INTERFACE +#define INTERFACE IExchangeFavorites +DECLARE_MAPI_INTERFACE_(IExchangeFavorites, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEFAVORITES_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES); + + +/*------------------------------------------------------------------------ + * + * Properties used by the Favorites Folders API + * + *-----------------------------------------------------------------------*/ + +#define PR_AUTO_ADD_NEW_SUBS PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x5) +#define PR_NEW_SUBS_GET_AUTO_ADD PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x6) +/*------------------------------------------------------------------------ + * + * Properties used by the Offline Folders API + * + *-----------------------------------------------------------------------*/ + +#define PR_OFFLINE_FLAGS PROP_TAG(PT_LONG, pidFolderMin+0x5) +#define PR_SYNCHRONIZE_FLAGS PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin+0x4) + + +/*------------------------------------------------------------------------ + * + * Flags used by the Offline Folders API + * + *-----------------------------------------------------------------------*/ + +#define OF_AVAILABLE_OFFLINE ((ULONG) 0x00000001) +#define OF_FORCE ((ULONG) 0x80000000) + +#define SF_DISABLE_STARTUP_SYNC ((ULONG) 0x00000001) + +/*------------------------------------------------------------------------ + * + * "IExchangeMessageConversion" Interface Declaration + * + * Used to configure message conversion streams + * + *-----------------------------------------------------------------------*/ + +#define EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(IPURE) \ + MAPIMETHOD(OpenStream) \ + (THIS_ ULONG cValues, \ + LPSPropValue lpPropArray, \ + LPSTREAM FAR * lppStream) IPURE; +#undef INTERFACE +#define INTERFACE IExchangeMessageConversion +DECLARE_MAPI_INTERFACE_(IExchangeMessageConversion, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSION); + +#define PR_MESSAGE_SITE_NAME PROP_TAG(PT_TSTRING, pidExchangeNonXmitReservedMin+0x07) +#define PR_MESSAGE_SITE_NAME_A PROP_TAG(PT_STRING8, pidExchangeNonXmitReservedMin+0x07) +#define PR_MESSAGE_SITE_NAME_W PROP_TAG(PT_UNICODE, pidExchangeNonXmitReservedMin+0x07) + +#define PR_MESSAGE_PROCESSED PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x08) + +#define PR_RULE_MSG_STATE PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin+0x09) +#define PR_RULE_MSG_USER_FLAGS PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin+0x0A) +#define PR_RULE_MSG_PROVIDER_W PROP_TAG(PT_UNICODE, pidExchangeNonXmitReservedMin+0x0B) +#define PR_RULE_MSG_NAME_W PROP_TAG(PT_UNICODE, pidExchangeNonXmitReservedMin+0x0C) +#define PR_RULE_MSG_LEVEL PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin+0x0D) +#define PR_RULE_MSG_PROVIDER_DATA PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin+0x0E) + +#define PR_RULE_MSG_SEQUENCE PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin+0x13) + +#define PR_MSG_BODY_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x03) + + +#define PR_BILATERAL_INFO PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin-0x04) +#define PR_DL_REPORT_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x05) + +#define PRIV_DL_HIDE_MEMBERS 0x00000001 +#define PRIV_DL_REPORT_TO_ORIG 0x00000002 +#define PRIV_DL_REPORT_TO_OWNER 0x00000004 +#define PRIV_DL_ALLOW_OOF 0x00000008 + +/*--------------------------------------------------------------------------------- + * + * PR_PREVIEW is a folder contents property that is either PR_ABSTRACT + * or the first 255 characters of PR_BODY. + * PR_PREVIEW_UNREAD is a folder contents property that is either PR_PREVIEW + * if the message is not read, or NULL if it is read. + * + *---------------------------------------------------------------------------------*/ +#define PR_ABSTRACT PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x06) +#define PR_ABSTRACT_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x06) +#define PR_ABSTRACT_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x06) + +#define PR_PREVIEW PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x07) +#define PR_PREVIEW_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x07) +#define PR_PREVIEW_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x07) + +#define PR_PREVIEW_UNREAD PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x08) +#define PR_PREVIEW_UNREAD_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x08) +#define PR_PREVIEW_UNREAD_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x08) + +// +// Informs IMAIL that full fidelity should be discarded for this message. +// +#define PR_DISABLE_FULL_FIDELITY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x72) + +// file attributes for messages / folders +// need to be in REN property range in order to replicate +#define PR_ATTR_HIDDEN PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x74) +#define PR_ATTR_SYSTEM PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x75) +#define PR_ATTR_READONLY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x76) + +// Administrative security descriptor for a folder, if present. +// +#define PR_ADMIN_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d21) +// +// Win32 compatible representation of folder/message security descriptor +// +#define PR_WIN32_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d22) +// +// TRUE if PR_NT_SECURITY_DESCRIPTOR describes non Win32 ACL semantics. +// If this is set, components that use PR_WIN32_SECURITY_DESCRIPTOR cannot +// allow modification of PR_NT_SECURITY_DESCRIPTOR (or PR_DEFAULT_MESSAGE_SD). +// +#define PR_NON_WIN32_ACL PROP_TAG(PT_BOOLEAN, 0x3d23) + +// +// TRUE if any items in the folder contain item level ACLs +// +#define PR_ITEM_LEVEL_ACL PROP_TAG(PT_BOOLEAN, 0x3d24) + +#define PR_DAV_TRANSFER_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x0E84) + + +/*------------------------------------------------------------------------------------ +* +* OWA Info Property +* +*------------------------------------------------------------------------------------*/ +#define PR_OWA_URL PROP_TAG (PT_STRING8, pidRenMsgFldMin+0x71) + + +#define SERVER_SLOW_LINK +#ifdef SERVER_SLOW_LINK +//$ The value of this property ID will change in the future. Do not rely on +//$ its current value. Rely on the define only. +#define PR_STORE_SLOWLINK PROP_TAG(PT_BOOLEAN, 0x7c0a) +#endif + + +/* + * Registry locations of settings + */ +#if defined(WIN32) && !defined(MAC) +#define SZ_HPC_V2 "Software\\Microsoft\\Windows CE Services" +#define SZ_HPC_V2_MAJOR "MajorVersion" // = 2 +#define SZ_HPC_V2_MINOR "MinorVersion" // = 0 or 1 + +#define SZ_HPC_V1 "Software\\Microsoft\\Pegasus" +#define SZ_HPC_V1_MAJOR "MajorVersion" // = 1 Major and Minor numbers didn't appear +#define SZ_HPC_V1_MINOR "MinorVersion" // = 1 until after v1.0 was released +#define SZ_HPC_V1_0 "InstalledDir" // present for v1.0 + +#define SZ_OUTL_OST_OPTIONS "Software\\Microsoft\\Office\\8.0\\Outlook\\OST" +#define SZ_NO_OST "NoOST" +#define NO_OST_FLAG_ALLOWED 0 // OST's are allowed on the machine +#define NO_OST_FLAG_CACHE_ONLY 1 // OST can only be used as a cache +#define NO_OST_FLAG_NOT_ALLOWED 2 // OST's are not allowed on the machine +#define NO_OST_FLAG_NO_CACHE 3 // OST's are not allowed as a cache +#define NO_OST_DEFAULT NO_OST_FLAG_ALLOWED +#endif + +/* + * Special GUID property for suppressing sync events for folders. If + * this property is set on a folder (any GIUD value), sync events will + * be suppressed for that folder. The caller can then selectively enable + * sync events for that folder by specifying the corresponding GUID in + * the NEWLOGON object. + */ +#define PR_SYNCEVENT_SUPPRESS_GUID PROP_TAG( PT_BINARY, 0x3880 ) + +/* + * The following are the well-known GUIDS for the different special folders. + * By default, sync events are suppressed for these folders. You can insert + * GUIDs into your NEWLOGON object to selectively enable sync events for + * each folder. + */ +// {B2DC5B57-AF2D-4915-BAE3-90E5BDFB0070} +//static const GUID guidOutboxSyncEvents = +//{ +// 0xb2dc5b57, 0xaf2d, 0x4915, +// { +// 0xba, 0xe3, 0x90, 0xe5, 0xbd, 0xfb, 0x0, 0x70 +// } +//}; +// +// {2185EE91-28CD-4d9b-BFB4-BC49BB1DD8C0} +//static const GUID guidMTSInSyncEvents = +//{ +// 0x2185ee91, 0x28cd, 0x4d9b, +// { +// 0xbf, 0xb4, 0xbc, 0x49, 0xbb, 0x1d, 0xd8, 0xc0 +// } +//}; +// +// {1BDBAFD3-1384-449b-A200-DE4745B07839} +//static const GUID guidMTSOutSyncEvents = +//{ +// 0x1bdbafd3, 0x1384, 0x449b, +// { +// 0xa2, 0x0, 0xde, 0x47, 0x45, 0xb0, 0x78, 0x39 +// } +//}; +// +// {221ED74D-0B5C-4c0e-8807-23AFDD8AC2FF} +//static const GUID guidTransportTempFolderSyncEvents = +//{ +// 0x221ed74d, 0xb5c, 0x4c0e, +// { +// 0x88, 0x7, 0x23, 0xaf, 0xdd, 0x8a, 0xc2, 0xff +// } +//}; + + +/* + * Lock properties + */ + //REVIEW:: some of these definitions appear both in MAPITAGS.H and EDKMDB.H + //one set of definitions should be removed +#define PR_LOCK_BRANCH_ID PROP_TAG( PT_I8, 0x3800 ) +#define PR_LOCK_RESOURCE_FID PROP_TAG( PT_I8, 0x3801 ) +#define PR_LOCK_RESOURCE_DID PROP_TAG( PT_I8, 0x3802 ) +#define PR_LOCK_RESOURCE_VID PROP_TAG( PT_I8, 0x3803 ) +#define PR_LOCK_ENLISTMENT_CONTEXT PROP_TAG( PT_BINARY, 0x3804 ) +#define PR_LOCK_TYPE PROP_TAG( PT_SHORT, 0x3805 ) +#define PR_LOCK_SCOPE PROP_TAG( PT_SHORT, 0x3806 ) +#define PR_LOCK_TRANSIENT_ID PROP_TAG( PT_BINARY, 0x3807 ) +#define PR_LOCK_DEPTH PROP_TAG( PT_LONG, 0x3808 ) +#define PR_LOCK_TIMEOUT PROP_TAG( PT_LONG, 0x3809 ) +#define PR_LOCK_EXPIRY_TIME PROP_TAG( PT_SYSTIME, 0x380a ) +#define PR_LOCK_GLID PROP_TAG( PT_BINARY, 0x380b ) +#define PR_LOCK_NULL_URL_W PROP_TAG( PT_UNICODE, 0x380c ) + +/* + * Lock flags + */ +#define LOCK_NON_PERSISTENT 0x00000001 +#define LOCK_BLOCKING_MID_LOCK 0x00000002 +#define LOCK_NULL_RESOURCE 0x00000004 +#define LOCK_READ_ACCESS_CHECK_ONLY 0x00000008 +#define LOCK_WRITE_THROUGH_GOP 0x00010000 +// This bit is reserved and must not be set! +#define LOCK_RESERVED 0x80000000 + +/* + * Unlock flags + */ +#define UNLOCK_CHECKIN_ABORT 0x00000001 +#define UNLOCK_CHECKIN_KEEP_LOCKED 0x00000002 +#define UNLOCK_BLOCKING_MID_LOCK_ALL 0x00000004 +#define UNLOCK_BLOCKING_MID_LOCK_LOGON_ONLY 0x00000008 +#define UNLOCK_NULL_RESOURCE 0x00000010 +#define UNLOCK_WRITE_THROUGH_GOP 0x00010000 + +/* + * Versioning flags for folder + */ +#define wNonVersionedFolder ((WORD)0x0000) +#define wVersionedFolderSimple ((WORD)0x0001) +#define wVersionedFolderAuto ((WORD)0x0002) //When you auto version it is simple versioned as well. + +/* + * Versioning operation codes for version rows in ptagVersionedOperation + */ +#define fVersionedDelete ((ULONG)0x01) +#define fVersionedUnDelete ((ULONG)0x02) +#define fVersionedPin ((ULONG)0x04) +#define fVersionedUnPin ((ULONG)0x08) +#define fVersionedMoveIn ((ULONG)0x10) +#define fVersionedMoveOut ((ULONG)0x20) + +/*------------------------------------------------------------------------ + * + * LocalStore specific internal properties + * + * These are properties that will be used internally by local store. + * Properties that are listed here are used in components other than the local store + *-----------------------------------------------------------------------*/ +#define pidLISMsgFolderPropMin pidLocalStoreInternalMin+0xa0 // 0x65a0 +#define pidLISMsgFolderPropMax pidLocalStoreInternalMin+0xc0 // 0x65c0 + +#define pidLISErrorCodeMin pidLISMsgFolderPropMin+0xa // 0x65aa +#define pidLISErrorCodeMax pidLISMsgFolderPropMin+0x10 // 0x65b0 + +#define pidLISInterfacePropMin pidLocalStoreInternalMin+0xd0 // 0x65d0 +#define pidLISInterfacePropMax pidLocalStoreInternalMin+0xe0 // 0x65e0 + +#define ptagLISSubfolders PROP_TAG( PT_BOOLEAN, pidLocalStoreInternalMin+0x0) +#define ptagLISUnreadCount PROP_TAG( PT_LONG, pidLocalStoreInternalMin+0x1) + +#define ptagLISErrorCode PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x0) // PROP_TAG(PT_LONG, 0x65aa) +#define ptagLISErrorItemType PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x1) // PROP_TAG(PT_LONG, 0x65ab) +#define ptagLISErrorOperation PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x2) // PROP_TAG(PT_LONG, 0x65ac) +#define ptagLISErrorItemUrl PROP_TAG( PT_UNICODE, pidLISErrorCodeMin+0x3) // PROP_TAG(PT_UNICODE, 0x65ad) +#define ptagLISErrorSourceUrl PROP_TAG( PT_UNICODE, pidLISErrorCodeMin+0x4) // PROP_TAG(PT_UNICODE, 0x65ae) +#define ptagLISModifiedPropertyList PROP_TAG( PT_UNICODE, pidLISErrorCodeMin+0x5) // PROP_TAG(PT_UNICODE, 0x65af) +#define ptagLISExtendedErrorinfo PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x6) // PROP_TAG(PT_LONG, 0x65b0) + +// Not in msgfolder prop range +#define ptagLISErrorLogUrl PROP_TAG( PT_UNICODE, pidLocalStoreInternalMin+0x70) // PROP_TAG(PT_UNICODE, 0x6570) + +// Ptags used between EXOLEDB and LSCache on client machine to pass +// along the actual client SQL query from EXOLEDB to LSCache in the RES_COMMENT +// prop val array of an SRestriction. These ptags are never actually sent accross the +// wire or stored as properties on objects in the cache. +// +// ptagSql = The identifying property for the SQL restriction. +// The value will be the original complete clause. +#define ptagSql PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x0) +#define ptagSqlSelect PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x1) +#define ptagSqlFrom PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x2) +#define ptagSqlWhere PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x3) +#define ptagSqlOrder PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x4) +#define ptagSqlGroup PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x5) + +#define PR_RULE_SERVER_RULE_ID PROP_TAG( PT_I8, pidLISMsgFolderPropMin+0x0) // 0x65a0 Corresponding server RUID for LIS + +// this is a hackish property to be used by sync event code to say that changes +// need client refresh. The only valid value is TRUE. See #168797 for more info +#define PR_FORCE_CLIENT_REFRESH PROP_TAG(PT_BOOLEAN, pidLISMsgFolderPropMin+0x1) + +/*------------------------------------------------------------------------ + * + * Anti-Virus products integration support + * + * All properties are read-only. + *-----------------------------------------------------------------------*/ + +// Name and version of anti-virus product that performed the last scan of an item. +#define PR_ANTIVIRUS_VENDOR PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x45) // 0x0E85001E +#define PR_ANTIVIRUS_VERSION PROP_TAG(PT_LONG, pidStoreNonTransMin+0x46) // 0x0E860003 + +// Results ot the last scan of an item. +#define PR_ANTIVIRUS_SCAN_STATUS PROP_TAG(PT_LONG, pidStoreNonTransMin+0x47) // 0x0E870003 + +// List of virus identification strings of all viruses found by the last scan, if virus has been cleaned +// or detected, separated by commans. Empty string if no virus has been found. +#define PR_ANTIVIRUS_SCAN_INFO PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x48) // 0x0E88001F + +/* + * Possible values of PR_ANTIVIRUS_SCAN_STATUS + */ +// Anti-virus product has completed scanning of an item, and found no virus. +#define ANTIVIRUS_SCAN_NO_VIRUS 0 + +// Anti-virus product has detected a virus in an item, or assumed the item may contain a virus +// based on item's properties, like filename or content type. +#define ANTIVIRUS_SCAN_VIRUS_PRESENT 1 + +// Anti-virus product has detected a virus in an item, and applied changes to remove the virus. +// The item should be safe to use after modifications. +#define ANTIVIRUS_SCAN_VIRUS_CLEANED 2 + +// Anti-virus product has detected a virus in an item, and has requested that the message be +// deleted. This item shouldn't be allowed to be opened. +#define ANTIVIRUS_SCAN_VIRUS_DELETED 3 + +// Presents the same list as PR_DISPLAY_TO except uses the format "[addrtype1:addr1]; [addrtype2:addr2]" +#define PR_ADDR_TO PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x57) // 0x0E97 + +// Presents the same list as PR_DISPLAY_CC except uses the format "[addrtype1:addr1]; [addrtype2:addr2]" +#define PR_ADDR_CC PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x58) // 0x0E98 +#define PR_ADDR_CC_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x58) +#define PR_ADDR_CC_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x58) + +#define PR_EXTENDED_RULE_MSG_ACTIONS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x59) +#define PR_EXTENDED_RULE_MSG_CONDITION PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x5a) + +// Used to serialize properties when filtering TNEF - used by Outlook and OWA for saving the original TNEF in cases +// where the TNEF contains Named properties that cannot be created in the store. +#define PR_TNEF_UNPROCESSED_PROPS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x5c) + +// this will notify LIS that this is a new mail so that they can fire new mail notifications +#define ptagLISNewMail PROP_TAG(PT_BOOLEAN, 0x65c5) + +/*------------------------------------------------------------------------ + * + * Retention Policy Tag related properties which determine + * + * These properties are read/write. + * + * DO NOT PUT MORE PROPERTIES HERE!!!!! + * + *-----------------------------------------------------------------------*/ + +#define RETENTION_FLAGS_EXPLICIT ((ULONG)0x00000001) +#define RETENTION_FLAGS_TAG_CHANGED ((ULONG)0x00000002) +#define RETENTION_FLAGS_AUTOTAG ((ULONG)0x00000004) +#define RETENTION_FLAGS_PERSONAL ((ULONG)0x00000008) // whether the folder has + // a personal or system tag +#define RETENTION_FLAGS_EXPLICIT_ARCHIVE ((ULONG)0x00000010) + +#define PR_POLICY_TAG PROP_TAG(PT_BINARY, pidMAPIMin + 0x19) +#define PR_RETENTION_PERIOD PROP_TAG(PT_LONG, pidMAPIMin + 0x1A) +#define PR_START_DATE_ETC PROP_TAG(PT_BINARY, pidMAPIMin + 0x1B) +#define PR_RETENTION_DATE PROP_TAG(PT_SYSTIME, pidMAPIMin + 0x1C) +#define PR_RETENTION_FLAGS PROP_TAG(PT_LONG, pidMAPIMin + 0x1D) + +#define PR_ARCHIVE_TAG PROP_TAG(PT_BINARY, pidMAPIMin + 0x18) +#define PR_ARCHIVE_PERIOD PROP_TAG(PT_LONG, pidMAPIMin + 0x1E) +#define PR_ARCHIVE_DATE PROP_TAG(PT_SYSTIME, pidMAPIMin + 0x1F) + +#define PR_SORT_POSITION PROP_TAG( PT_BINARY, pidMAPIMin + 0x20) +#define PR_SORT_PARENTID PROP_TAG( PT_BINARY, pidMAPIMin + 0x21) + +// DO NOT PUT MORE PROPERTIES HERE!!!! +// +// The 0x3000 to 0x3FFF range is reserved to MAPI. edkmdb.h defines the +// properties used by the Exchange provider. +// +// If you have a property that applies to any item, it belongs in the MAPI range +// and should be added to omapidefs.h +// +// If you have a property that is for the Exchange provider only, it belongs in +// this header, but should NOT BE PUT IN THE pidMAPIMin range! + +#endif //EDKMDB_INCLUDED diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/ExchForm.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/ExchForm.h new file mode 100644 index 000000000..ef0acc77a --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/ExchForm.h @@ -0,0 +1,74 @@ +#ifndef EXCHFORM_H +#define EXCHFORM_H + + +/* + * E X C H F O R M . H + * + * Declarations of interfaces and constants for forms that work with + * the Microsoft Exchange client. + * + * Copyright 1986-1999 Microsoft Corporation. All Rights Reserved. + */ + + +/* + * V e r b s + */ + + +// Interpersonal messaging verbs +#define EXCHIVERB_OPEN 0 +#define EXCHIVERB_RESERVED_COMPOSE 100 +#define EXCHIVERB_RESERVED_OPEN 101 +#define EXCHIVERB_REPLYTOSENDER 102 +#define EXCHIVERB_REPLYTOALL 103 +#define EXCHIVERB_FORWARD 104 +#define EXCHIVERB_PRINT 105 +#define EXCHIVERB_SAVEAS 106 +#define EXCHIVERB_RESERVED_DELIVERY 107 +#define EXCHIVERB_REPLYTOFOLDER 108 + + +/* + * G U I D s + */ + + +#define DEFINE_EXCHFORMGUID(name, b) \ + DEFINE_GUID(name, 0x00020D00 | (b), 0, 0, 0xC0,0,0,0,0,0,0,0x46) + +#ifndef NOEXCHFORMGUIDS +DEFINE_EXCHFORMGUID(PS_EXCHFORM, 0x0C); +#endif // NOEXCHFORMGUIDS + + +/* + * E x t e n d e d P r o p e r t i e s + */ + + +// Operation map property +#define psOpMap PS_EXCHFORM +#define ulKindOpMap MNID_ID +#define lidOpMap 1 +#define ptOpMap PT_STRING8 + +// Operation map indices +#define ichOpMapReservedCompose 0 +#define ichOpMapOpen 1 +#define ichOpMapReplyToSender 2 +#define ichOpMapReplyToAll 3 +#define ichOpMapForward 4 +#define ichOpMapPrint 5 +#define ichOpMapSaveAs 6 +#define ichOpMapReservedDelivery 7 +#define ichOpMapReplyToFolder 8 + +// Operation map values +#define chOpMapByClient '0' +#define chOpMapByForm '1' +#define chOpMapDisable '2' + + +#endif // EXCHFORM_H diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/IMSCapabilities.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/IMSCapabilities.h new file mode 100644 index 000000000..61afea7c9 --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/IMSCapabilities.h @@ -0,0 +1,66 @@ +#ifndef IMSCAPABILITIESGUID_H +#ifdef INITGUID +#include +#define IMSCAPABILITIESGUID_H +#endif /* INITGUID */ + +// {00020393-0000-0000-C000-000000000046} +#if !defined(INITGUID) || defined(USES_IID_IMSCapabilities) +DEFINE_OLEGUID(IID_IMSCapabilities, 0x00020393, 0, 0); +#endif + +#endif /* IMSCAPABILITIESGUID_H */ + +#ifndef IMSCAPABILITIES_H +#define IMSCAPABILITIES_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +// IMSCapabilities - advertises capabilities of the given store provider + +/* Selector values for GetCapabilities() */ +enum class MSCAP_SELECTOR +{ + MSCAP_SEL_RESERVED1 = 0, + MSCAP_SEL_RESERVED2 = 1, + MSCAP_SEL_FOLDER = 2, + MSCAP_SEL_RESERVED3 = 3, + MSCAP_SEL_RESTRICTION = 4, +}; + +/* Return values for GetCapabilities */ +/* Values based on selector used to query */ + +// MSCAP_SEL_FOLDER +// Support for folder homepages in non-default stores +#define MSCAP_SECURE_FOLDER_HOMEPAGES ((ULONG) 0x00000001) + +// MSCAP_SEL_RESTRICTION +// Support for RES_ANNOTATION restrictions +#define MSCAP_RES_ANNOTATION ((ULONG) 0x00000001) + +#define MAPI_IMSCAPABILITIES_METHODS(IPURE) \ + MAPIMETHOD_(ULONG, GetCapabilities) (THIS_ MSCAP_SELECTOR mscapSelector); + +#undef INTERFACE +#define INTERFACE IMSCapabilities +DECLARE_MAPI_INTERFACE_(IMSCapabilities, IUnknown) +{ + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMSCAPABILITIES_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IMSCapabilities, LPMSCAPABILITIES); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* IMSCAPABILITIES_H */ diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/IMessage.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/IMessage.h new file mode 100644 index 000000000..915451a90 --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/IMessage.h @@ -0,0 +1,198 @@ +/* + * I M E S S A G E . H + * + * External definitions for MAPI's IMessage-on-IStorage facility + * + * Copyright 1986-1999 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef _IMESSAGE_H_ +#define _IMESSAGE_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct _MSGSESS FAR * LPMSGSESS; + +/* Typedef of optional callback routine to be called on last release of + * top-level messages opened with OpenIMsgOnIStg + */ +typedef void (STDAPICALLTYPE MSGCALLRELEASE)( + ULONG ulCallerData, + LPMESSAGE lpMessage ); + +/* DLL Entry Points (found in mapiu.dll) */ + +/* OpenIMsgSession + * CloseIMsgSession + * + * These entry points allow the caller to "wrap" the creation of messages + * inside a session, so that when the session is closed, all messages + * created within that session are closed as well. Use of IMSG sessions + * is optional. If OpenIMsgOnIStg is called with a NULL for the lpmsgsess + * parameter, the message is created independent of any session, and has + * no way to be shutdown. If the caller forgets to release the message, or + * to release open tables within the message, the memory will be leaked until + * the external application terminates. + */ + +STDAPI_(SCODE) OpenIMsgSession( + LPMALLOC lpMalloc, /* -> Co malloc object */ + ULONG ulFlags, /* reserved. Must be zero. */ + LPMSGSESS FAR *lppMsgSess ); /* <- message session object */ + +STDAPI_(void) CloseIMsgSession( + LPMSGSESS lpMsgSess ); /* -> message session object */ + +/* OpenIMsgOnIStg - Main entry point + * + * NOTE 1: The IStg must be opened with STGM_TRANSACTED if STGM_READWRITE + * is specified. Since messages don't support a write only mode, IMessage + * doesn't allow a storage object opened in write only mode. If the storage + * is opened STGM_READ, then STGM_TRANSACTED is NOT required. + * + * NOTE 2: The lpMapiSup parameter is optional. If supplied then IMessage + * will support the MAPI_DIALOG and ATTACH_DIALOG flags (by calling + * support method: DoMCDialog) on CopyTo and DeleteAttach methods. + * If lpMapiSup is not supplied (i.e. passed 0) then dialog flags will be + * ignored. If supplied then ModifyRecipients will attempt to convert + * short term entryids to long term entryids (by calling support method + * OpenAddressBook and calls on the returned object). If not supplied + * then short term entryid's will be stored without conversion. + * + * NOTE 3: The lpfMsgCallRelease parameter is optional. If supplied then + * IMessage will call the routine when the last release on (the toplevel only) + * message is called. It is intended to allow the callee to free the IStorage + * that contains the message. IMessage will not use the IStorage object after + * making this call. + * + * NOTE 4: Behavior of multiple opens of sub-objects (Attachments, Streams, + * Storages, Messages, etc.) within a message is deliberately undefined in + * MAPI. This implementation allows them, but will do it by AddRef'ing the + * existing open and returning it to the caller of OpenAttachment or + * OpenProperty. This means that whatever access mode the first open on a + * specific Attachment or Property had is what all others will get regardless + * of what the subsequent opens asked for. + * + * NOTE 5: There is currently one flag defined for use with the ulFlags + * parameter. The IMSG_NO_ISTG_COMMIT flag controls whether the commit + * method of IStorage is called when the client calls SaveChanges on the + * IMessage object. Some clients of IMessage may wish to commit the IStorage + * themselves after writing additional data to the storage (beyond what + * IMessage itself writes). To aid in this, the IMessage implementation + * guarantees to name all sub-storages starting with "__". Therefore, + * if the client keeps its names out of that namespace, there will be no + * accidental collisions. + * + * WARNING: + * + * This implementation of IMessage will support OpenProperty w/MAPI_CREATE + * where the source interface is IID_IStorage if the property id is + * 'PR_ATTACH_DATA'. Once this has been done, the caller has an IStorage + * interface on this property. This is ok and should allow for + * easier implementation of OLE 2.0 Server functionality. However, if you + * pass in the new IStorage ptr (to the attachment data) through the + * OpenIMsgOnIStg entry point and then proceed to release things in the + * wrong order we will make no attempt to behave in a predictable fashion. + * Keep in mind that the correct method for placing a message into an + * attachment is to call OpenProperty where the source interface is + * IID_IMessage. The IStorage interface is supported to allow an easy way + * to stick a WWord doc. into an attachment w/o converting to/from IStream. + * + */ +STDAPI_(SCODE) OpenIMsgOnIStg( + LPMSGSESS lpMsgSess, /* -> message session obj (optional) */ + LPALLOCATEBUFFER lpAllocateBuffer, /* -> AllocateBuffer memory routine */ + LPALLOCATEMORE lpAllocateMore, /* -> AllocateMore memory routine */ + LPFREEBUFFER lpFreeBuffer, /* -> FreeBuffer memory routine */ + LPMALLOC lpMalloc, /* -> Co malloc object */ + LPVOID lpMapiSup, /* -> MAPI Support Obj (optional) */ + LPSTORAGE lpStg, /* -> open IStorage containing msg */ + MSGCALLRELEASE FAR *lpfMsgCallRelease, /* -> release callback rtn (opt) */ + ULONG ulCallerData, /* caller data returned in callback */ + ULONG ulFlags, /* -> flags (controls istg commit) */ + LPMESSAGE FAR *lppMsg ); /* <- open message object */ + +#define IMSG_NO_ISTG_COMMIT ((ULONG) 0x00000001) + + +/* NOTE: Property Attributes are specific to this IMessage on IStorage */ +/* implementation and are not a part of standard MAPI 1.0 property methods */ + +/* Property Attributes */ + +#define PROPATTR_MANDATORY ((ULONG) 0x00000001) +#define PROPATTR_READABLE ((ULONG) 0x00000002) +#define PROPATTR_WRITEABLE ((ULONG) 0x00000004) + +#define PROPATTR_NOT_PRESENT ((ULONG) 0x00000008) + +/* Attribute Array */ + +typedef struct _SPropAttrArray +{ + ULONG cValues; + ULONG aPropAttr[MAPI_DIM]; +} SPropAttrArray, FAR * LPSPropAttrArray; + +#define CbNewSPropAttrArray(_cattr) \ + (offsetof(SPropAttrArray,aPropAttr) + (_cattr)*sizeof(ULONG)) +#define CbSPropAttrArray(_lparray) \ + (offsetof(SPropAttrArray,aPropAttr) + \ + (UINT)((_lparray)->cValues)*sizeof(ULONG)) + +#define SizedSPropAttrArray(_cattr, _name) \ +struct _SPropAttrArray_ ## _name \ +{ \ + ULONG cValues; \ + ULONG aPropAttr[_cattr]; \ +} _name + + + +/* GetAttribIMsgOnIStg - To get attributes on properties + * + * This call is provided because there is no method of IMAPIPropSet to allow + * getting attributes. + */ +STDAPI GetAttribIMsgOnIStg( + LPVOID lpObject, + LPSPropTagArray lpPropTagArray, + LPSPropAttrArray FAR *lppPropAttrArray ); + +/* SetAttribIMsgOnIStg - To set attributes on properties + * + * This call is provided because there is no method of IMAPIPropSet to allow + * setting of attributes. + */ +STDAPI SetAttribIMsgOnIStg( + LPVOID lpObject, + LPSPropTagArray lpPropTags, + LPSPropAttrArray lpPropAttrs, + LPSPropProblemArray FAR *lppPropProblems ); + +/* MapStorageSCode - To map an IStorage hResult to a MAPI sCode value + * + * This call is provided for the internal use of PDK components that base + * their message implementations on IMessage. Since these components must + * open the storage themselves, there is a common need to map OLE 2.0 + * Storage error returns to MAPI sCodes. + * + * WARNING: There is no guarantee that this entry point will exist in + * shipped versions of mapiu.dll. + */ +STDAPI_(SCODE) MapStorageSCode( SCODE StgSCode ); + + +#ifdef __cplusplus +} +#endif + +#endif /* _IMESSAGE_H_ */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPI.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPI.h similarity index 95% rename from com/win32comext/mapi/src/mapi_headers/MAPI.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPI.h index 038b58fdb..09b2e4bd3 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPI.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPI.h @@ -1,361 +1,374 @@ -/* - * M A P I . H - * - * Messaging Applications Programming Interface. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - * - * Purpose: - * - * This file defines the structures and constants used by that - * subset of the Messaging Applications Programming Interface - * which is supported under Windows by Microsoft Outlook - */ - - -#ifndef MAPI_H -#define MAPI_H - -#if _MSC_VER > 1000 -#pragma once -#endif - -/* - * Types. - */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifndef EXPORT -#if defined(_WIN64) || defined (_WIN32) -#define EXPORT -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif -#endif - -typedef unsigned long FAR * LPULONG; -typedef unsigned long FLAGS; - -#ifndef __LHANDLE -#define __LHANDLE -typedef ULONG_PTR LHANDLE, FAR * LPLHANDLE; -#endif - -typedef unsigned char FAR * LPBYTE; - -#define lhSessionNull ((LHANDLE)0) - -typedef struct -{ - ULONG ulReserved; /* Reserved for future use (must be 0) */ - ULONG flFlags; /* Flags */ - ULONG nPosition; /* character in text to be replaced by attachment */ - LPSTR lpszPathName; /* Full path name of attachment file */ - LPSTR lpszFileName; /* Original file name (optional) */ - LPVOID lpFileType; /* Attachment file type (can be lpMapiFileTagExt) */ -} MapiFileDesc, FAR * lpMapiFileDesc; - -#define MAPI_OLE 0x00000001 -#define MAPI_OLE_STATIC 0x00000002 - - -typedef struct -{ - ULONG ulReserved; /* Reserved, must be zero. */ - ULONG cbTag; /* Size (in bytes) of */ - LPBYTE lpTag; /* X.400 OID for this attachment type */ - ULONG cbEncoding; /* Size (in bytes) of */ - LPBYTE lpEncoding; /* X.400 OID for this attachment's encoding */ -} MapiFileTagExt, FAR *lpMapiFileTagExt; - - -typedef struct -{ - ULONG ulReserved; /* Reserved for future use */ - ULONG ulRecipClass; /* Recipient class */ - /* MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG */ - LPSTR lpszName; /* Recipient name */ - LPSTR lpszAddress; /* Recipient address (optional) */ - ULONG ulEIDSize; /* Count in bytes of size of pEntryID */ - LPVOID lpEntryID; /* System-specific recipient reference */ -} MapiRecipDesc, FAR * lpMapiRecipDesc; - -#ifndef MAPI_ORIG /* also defined in mapix.h */ -#define MAPI_ORIG 0 /* Recipient is message originator */ -#define MAPI_TO 1 /* Recipient is a primary recipient */ -#define MAPI_CC 2 /* Recipient is a copy recipient */ -#define MAPI_BCC 3 /* Recipient is blind copy recipient */ -#endif - -typedef struct -{ - ULONG ulReserved; /* Reserved for future use (M.B. 0) */ - LPSTR lpszSubject; /* Message Subject */ - LPSTR lpszNoteText; /* Message Text */ - LPSTR lpszMessageType; /* Message Class */ - LPSTR lpszDateReceived; /* in YYYY/MM/DD HH:MM format */ - LPSTR lpszConversationID; /* conversation thread ID */ - FLAGS flFlags; /* unread,return receipt */ - lpMapiRecipDesc lpOriginator; /* Originator descriptor */ - ULONG nRecipCount; /* Number of recipients */ - lpMapiRecipDesc lpRecips; /* Recipient descriptors */ - ULONG nFileCount; /* # of file attachments */ - lpMapiFileDesc lpFiles; /* Attachment descriptors */ -} MapiMessage, FAR * lpMapiMessage; - -#define MAPI_UNREAD 0x00000001 -#define MAPI_RECEIPT_REQUESTED 0x00000002 -#define MAPI_SENT 0x00000004 - - -/* - * Entry points. - */ - -/* - * flFlags values for Simple MAPI entry points. All documented flags are - * shown for each call. Duplicates are commented out but remain present - * for every call. - */ - -/* MAPILogon() flags. */ - -#define MAPI_LOGON_UI 0x00000001 /* Display logon UI */ -#ifndef MAPI_PASSWORD_UI -#define MAPI_PASSWORD_UI 0x00020000 /* prompt for password only */ -#endif -#define MAPI_NEW_SESSION 0x00000002 /* Don't use shared session */ -#define MAPI_FORCE_DOWNLOAD 0x00001000 /* Get new mail before return */ -#define MAPI_EXTENDED 0x00000020 /* Extended MAPI Logon */ - -/* MAPISendMail() flags. */ - -/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ -/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ - -#ifndef MAPI_DIALOG /* also defined in property.h */ -#define MAPI_DIALOG 0x00000008 /* Display a send note UI */ -#endif -/*# define MAPI_USE_DEFAULT 0x00000040 Use default profile in logon */ - -/* MAPIFindNext() flags. */ - -#define MAPI_UNREAD_ONLY 0x00000020 /* Only unread messages */ -#define MAPI_GUARANTEE_FIFO 0x00000100 /* use date order */ -#define MAPI_LONG_MSGID 0x00004000 /* allow 512 char returned ID */ - -/* MAPIReadMail() flags. */ - -#define MAPI_PEEK 0x00000080 /* Do not mark as read. */ -#define MAPI_SUPPRESS_ATTACH 0x00000800 /* header + body, no files */ -#define MAPI_ENVELOPE_ONLY 0x00000040 /* Only header information */ -#define MAPI_BODY_AS_FILE 0x00000200 - -/* MAPISaveMail() flags. */ - -/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ -/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ -/* #define MAPI_LONG_MSGID 0x00004000 /* allow 512 char returned ID */ - -/* MAPIAddress() flags. */ - -/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ -/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ - -/* MAPIDetails() flags. */ - -/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ -/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ -#define MAPI_AB_NOMODIFY 0x00000400 /* Don't allow mods of AB entries */ - -/* MAPIResolveName() flags. */ - -/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ -/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ -/* #define MAPI_DIALOG 0x00000008 Prompt for choices if ambiguous */ -/* #define MAPI_AB_NOMODIFY 0x00000400 Don't allow mods of AB entries */ - -typedef ULONG (FAR PASCAL MAPILOGON)( - ULONG_PTR ulUIParam, - /*OFFICEDEV add _opt*/ __in_opt LPSTR lpszProfileName, - /*OFFICEDEV add _opt*/ __in_opt LPSTR lpszPassword, - FLAGS flFlags, - ULONG ulReserved, - LPLHANDLE lplhSession -); -typedef MAPILOGON FAR *LPMAPILOGON; -MAPILOGON MAPILogon; - -typedef ULONG (FAR PASCAL MAPILOGOFF)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - FLAGS flFlags, - ULONG ulReserved -); -typedef MAPILOGOFF FAR *LPMAPILOGOFF; -MAPILOGOFF MAPILogoff; - - -typedef ULONG (FAR PASCAL MAPISENDMAIL)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - lpMapiMessage lpMessage, - FLAGS flFlags, - ULONG ulReserved -); -typedef MAPISENDMAIL FAR *LPMAPISENDMAIL; -MAPISENDMAIL MAPISendMail; - - -typedef ULONG (FAR PASCAL MAPISENDDOCUMENTS)( - ULONG_PTR ulUIParam, - __in LPSTR lpszDelimChar, - __in LPSTR lpszFilePaths, - __in LPSTR lpszFileNames, - ULONG ulReserved -); -typedef MAPISENDDOCUMENTS FAR *LPMAPISENDDOCUMENTS; -MAPISENDDOCUMENTS MAPISendDocuments; - - -typedef ULONG (FAR PASCAL MAPIFINDNEXT)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - __in LPSTR lpszMessageType, - __in LPSTR lpszSeedMessageID, - FLAGS flFlags, - ULONG ulReserved, - __in LPSTR lpszMessageID -); -typedef MAPIFINDNEXT FAR *LPMAPIFINDNEXT; -MAPIFINDNEXT MAPIFindNext; - -typedef ULONG (FAR PASCAL MAPIREADMAIL)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - __in LPSTR lpszMessageID, - FLAGS flFlags, - ULONG ulReserved, - lpMapiMessage FAR *lppMessage -); -typedef MAPIREADMAIL FAR *LPMAPIREADMAIL; -MAPIREADMAIL MAPIReadMail; - -typedef ULONG (FAR PASCAL MAPISAVEMAIL)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - lpMapiMessage lpMessage, - FLAGS flFlags, - ULONG ulReserved, - __in LPSTR lpszMessageID -); -typedef MAPISAVEMAIL FAR *LPMAPISAVEMAIL; -MAPISAVEMAIL MAPISaveMail; - -typedef ULONG (FAR PASCAL MAPIDELETEMAIL)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - __in LPSTR lpszMessageID, - FLAGS flFlags, - ULONG ulReserved -); -typedef MAPIDELETEMAIL FAR *LPMAPIDELETEMAIL; -MAPIDELETEMAIL MAPIDeleteMail; - -typedef ULONG (EXPORT FAR PASCAL *LPMAPIFREEBUFFER)(LPVOID pv); - -ULONG FAR PASCAL MAPIFreeBuffer(LPVOID pv); - -typedef ULONG (FAR PASCAL MAPIADDRESS)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - __in LPSTR lpszCaption, - ULONG nEditFields, - __in LPSTR lpszLabels, - ULONG nRecips, - lpMapiRecipDesc lpRecips, - FLAGS flFlags, - ULONG ulReserved, - LPULONG lpnNewRecips, - lpMapiRecipDesc FAR *lppNewRecips -); -typedef MAPIADDRESS FAR *LPMAPIADDRESS; -MAPIADDRESS MAPIAddress; - -typedef ULONG (FAR PASCAL MAPIDETAILS)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - lpMapiRecipDesc lpRecip, - FLAGS flFlags, - ULONG ulReserved -); -typedef MAPIDETAILS FAR *LPMAPIDETAILS; -MAPIDETAILS MAPIDetails; - -typedef ULONG (FAR PASCAL MAPIRESOLVENAME)( - LHANDLE lhSession, - ULONG_PTR ulUIParam, - __in LPSTR lpszName, - FLAGS flFlags, - ULONG ulReserved, - lpMapiRecipDesc FAR *lppRecip -); -typedef MAPIRESOLVENAME FAR *LPMAPIRESOLVENAME; -MAPIRESOLVENAME MAPIResolveName; - -#ifndef SUCCESS_SUCCESS -#define SUCCESS_SUCCESS 0 -#endif -#define MAPI_USER_ABORT 1 -#define MAPI_E_USER_ABORT MAPI_USER_ABORT -#define MAPI_E_FAILURE 2 -#define MAPI_E_LOGON_FAILURE 3 -#define MAPI_E_LOGIN_FAILURE MAPI_E_LOGON_FAILURE -#define MAPI_E_DISK_FULL 4 -#define MAPI_E_INSUFFICIENT_MEMORY 5 -#define MAPI_E_ACCESS_DENIED 6 -#define MAPI_E_TOO_MANY_SESSIONS 8 -#define MAPI_E_TOO_MANY_FILES 9 -#define MAPI_E_TOO_MANY_RECIPIENTS 10 -#define MAPI_E_ATTACHMENT_NOT_FOUND 11 -#define MAPI_E_ATTACHMENT_OPEN_FAILURE 12 -#define MAPI_E_ATTACHMENT_WRITE_FAILURE 13 -#define MAPI_E_UNKNOWN_RECIPIENT 14 -#define MAPI_E_BAD_RECIPTYPE 15 -#define MAPI_E_NO_MESSAGES 16 -#define MAPI_E_INVALID_MESSAGE 17 -#define MAPI_E_TEXT_TOO_LARGE 18 -#define MAPI_E_INVALID_SESSION 19 -#define MAPI_E_TYPE_NOT_SUPPORTED 20 -#define MAPI_E_AMBIGUOUS_RECIPIENT 21 -#define MAPI_E_AMBIG_RECIP MAPI_E_AMBIGUOUS_RECIPIENT -#define MAPI_E_MESSAGE_IN_USE 22 -#define MAPI_E_NETWORK_FAILURE 23 -#define MAPI_E_INVALID_EDITFIELDS 24 -#define MAPI_E_INVALID_RECIPS 25 -#define MAPI_E_NOT_SUPPORTED 26 - - - -#ifdef MAPIX_H -/* Maps from a simple mapi session to a MAPI 1.0 extended mapi session */ - -STDMETHODIMP_(SCODE) -ScMAPIXFromSMAPI(LHANDLE lhSimpleSession, - ULONG ulFlags, - LPCIID lpInterface, - LPMAPISESSION FAR * lppMAPISession); -#endif /* MAPIX_H */ - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* MAPI_H */ - +/* + * M A P I . H + * + * Messaging Applications Programming Interface. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + * + * Purpose: + * + * This file defines the structures and constants used by that + * subset of the Messaging Applications Programming Interface + * which is supported under Windows by Microsoft Outlook + */ + + +#ifndef MAPI_H +#define MAPI_H + +#if (_MSC_VER > 1000) || __clang__ +#pragma once +#endif + +/* + * Types. + */ + + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifndef EXPORT +#if defined(_WIN64) || defined (_WIN32) || defined (_M_ARM) +#define EXPORT +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif +#endif + +#if !defined(_LPULONG_DEFINED) //+MS_TARGET_APPLE +#define _LPULONG_DEFINED +typedef ULONG FAR * LPULONG; +#endif //_LPULONG_DEFINED + +#if !defined(_FLAGS_DEFINED) //+MS_TARGET_APPLE +#define _FLAGS_DEFINED +typedef ULONG FLAGS; +#endif //_FLAGS_DEFINED + +#ifndef __LHANDLE +#define __LHANDLE +typedef ULONG_PTR LHANDLE, FAR * LPLHANDLE; +#endif + +#if !defined(_LPBYTE_DEFINED) //+MS_TARGET_APPLE +#define _LPBYTE_DEFINED +typedef unsigned char FAR * LPBYTE; +#endif //_LPBYTE_DEFINED + +#define lhSessionNull ((LHANDLE)0) + +typedef struct +{ + ULONG ulReserved; /* Reserved for future use (must be 0) */ + ULONG flFlags; /* Flags */ + ULONG nPosition; /* character in text to be replaced by attachment */ + LPSTR lpszPathName; /* Full path name of attachment file */ + LPSTR lpszFileName; /* Original file name (optional) */ + LPVOID lpFileType; /* Attachment file type (can be lpMapiFileTagExt) */ +} MapiFileDesc, FAR * lpMapiFileDesc; + +#define MAPI_OLE 0x00000001 +#define MAPI_OLE_STATIC 0x00000002 + + +typedef struct +{ + ULONG ulReserved; /* Reserved, must be zero. */ + ULONG cbTag; /* Size (in bytes) of */ + LPBYTE lpTag; /* X.400 OID for this attachment type */ + ULONG cbEncoding; /* Size (in bytes) of */ + LPBYTE lpEncoding; /* X.400 OID for this attachment's encoding */ +} MapiFileTagExt, FAR *lpMapiFileTagExt; + + +typedef struct +{ + ULONG ulReserved; /* Reserved for future use */ + ULONG ulRecipClass; /* Recipient class */ + /* MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG */ + LPSTR lpszName; /* Recipient name */ + LPSTR lpszAddress; /* Recipient address (optional) */ + ULONG ulEIDSize; /* Count in bytes of size of pEntryID */ + LPVOID lpEntryID; /* System-specific recipient reference */ +} MapiRecipDesc, FAR * lpMapiRecipDesc; + +#ifndef MAPI_ORIG /* also defined in mapix.h */ +#define MAPI_ORIG 0 /* Recipient is message originator */ +#define MAPI_TO 1 /* Recipient is a primary recipient */ +#define MAPI_CC 2 /* Recipient is a copy recipient */ +#define MAPI_BCC 3 /* Recipient is blind copy recipient */ +#endif + +typedef struct +{ + ULONG ulReserved; /* Reserved for future use (M.B. 0) */ + LPSTR lpszSubject; /* Message Subject */ + LPSTR lpszNoteText; /* Message Text */ + LPSTR lpszMessageType; /* Message Class */ + LPSTR lpszDateReceived; /* in YYYY/MM/DD HH:MM format */ + LPSTR lpszConversationID; /* conversation thread ID */ + FLAGS flFlags; /* unread,return receipt */ + lpMapiRecipDesc lpOriginator; /* Originator descriptor */ + ULONG nRecipCount; /* Number of recipients */ + lpMapiRecipDesc lpRecips; /* Recipient descriptors */ + ULONG nFileCount; /* # of file attachments */ + lpMapiFileDesc lpFiles; /* Attachment descriptors */ +} MapiMessage, FAR * lpMapiMessage; + +#define MAPI_UNREAD 0x00000001 +#define MAPI_RECEIPT_REQUESTED 0x00000002 +#define MAPI_SENT 0x00000004 + + +/* + * Entry points. + */ + +/* + * flFlags values for Simple MAPI entry points. All documented flags are + * shown for each call. Duplicates are commented out but remain present + * for every call. + */ + +/* MAPILogon() flags. */ + +#define MAPI_LOGON_UI 0x00000001 /* Display logon UI */ +#ifndef MAPI_PASSWORD_UI +#define MAPI_PASSWORD_UI 0x00020000 /* prompt for password only */ +#endif +#define MAPI_NEW_SESSION 0x00000002 /* Don't use shared session */ +#define MAPI_FORCE_DOWNLOAD 0x00001000 /* Get new mail before return */ +#define MAPI_EXTENDED 0x00000020 /* Extended MAPI Logon */ + +/* MAPISendMail() flags. */ + +/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ +/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ + +#ifndef MAPI_DIALOG /* also defined in property.h */ +#define MAPI_DIALOG 0x00000008 /* Display a send note UI */ +#endif +/*# define MAPI_USE_DEFAULT 0x00000040 Use default profile in logon */ + +/* MAPIFindNext() flags. */ + +#define MAPI_UNREAD_ONLY 0x00000020 /* Only unread messages */ +#define MAPI_GUARANTEE_FIFO 0x00000100 /* use date order */ +#define MAPI_LONG_MSGID 0x00004000 /* allow 512 char returned ID */ + +/* MAPIReadMail() flags. */ + +#define MAPI_PEEK 0x00000080 /* Do not mark as read. */ +#define MAPI_SUPPRESS_ATTACH 0x00000800 /* header + body, no files */ +#define MAPI_ENVELOPE_ONLY 0x00000040 /* Only header information */ +#define MAPI_BODY_AS_FILE 0x00000200 + +/* MAPISaveMail() flags. */ + +/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ +/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ +/* #define MAPI_LONG_MSGID 0x00004000 /* allow 512 char returned ID */ + +/* MAPIAddress() flags. */ + +/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ +/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ + +/* MAPIDetails() flags. */ + +/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ +/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ +#define MAPI_AB_NOMODIFY 0x00000400 /* Don't allow mods of AB entries */ + +/* MAPIResolveName() flags. */ + +/* #define MAPI_LOGON_UI 0x00000001 Display logon UI */ +/* #define MAPI_NEW_SESSION 0x00000002 Don't use shared session */ +/* #define MAPI_DIALOG 0x00000008 Prompt for choices if ambiguous */ +/* #define MAPI_AB_NOMODIFY 0x00000400 Don't allow mods of AB entries */ + +typedef ULONG (FAR PASCAL MAPILOGON)( + ULONG_PTR ulUIParam, + /*OFFICEDEV add _opt*/ __in_opt LPSTR lpszProfileName, + /*OFFICEDEV add _opt*/ __in_opt LPSTR lpszPassword, + FLAGS flFlags, + ULONG ulReserved, + LPLHANDLE lplhSession +); +typedef MAPILOGON FAR *LPMAPILOGON; +MAPILOGON MAPILogon; + +typedef ULONG (FAR PASCAL MAPILOGOFF)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + FLAGS flFlags, + ULONG ulReserved +); +typedef MAPILOGOFF FAR *LPMAPILOGOFF; +MAPILOGOFF MAPILogoff; + + +typedef ULONG (FAR PASCAL MAPISENDMAIL)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + lpMapiMessage lpMessage, + FLAGS flFlags, + ULONG ulReserved +); +typedef MAPISENDMAIL FAR *LPMAPISENDMAIL; +MAPISENDMAIL MAPISendMail; + + +typedef ULONG (FAR PASCAL MAPISENDDOCUMENTS)( + ULONG_PTR ulUIParam, + __in LPSTR lpszDelimChar, + __in LPSTR lpszFilePaths, + __in LPSTR lpszFileNames, + ULONG ulReserved +); +typedef MAPISENDDOCUMENTS FAR *LPMAPISENDDOCUMENTS; +MAPISENDDOCUMENTS MAPISendDocuments; + + +typedef ULONG (FAR PASCAL MAPIFINDNEXT)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + __in LPSTR lpszMessageType, + __in LPSTR lpszSeedMessageID, + FLAGS flFlags, + ULONG ulReserved, + __in LPSTR lpszMessageID +); +typedef MAPIFINDNEXT FAR *LPMAPIFINDNEXT; +MAPIFINDNEXT MAPIFindNext; + +typedef ULONG (FAR PASCAL MAPIREADMAIL)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + __in LPSTR lpszMessageID, + FLAGS flFlags, + ULONG ulReserved, + lpMapiMessage FAR *lppMessage +); +typedef MAPIREADMAIL FAR *LPMAPIREADMAIL; +MAPIREADMAIL MAPIReadMail; + +typedef ULONG (FAR PASCAL MAPISAVEMAIL)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + lpMapiMessage lpMessage, + FLAGS flFlags, + ULONG ulReserved, + __in LPSTR lpszMessageID +); +typedef MAPISAVEMAIL FAR *LPMAPISAVEMAIL; +MAPISAVEMAIL MAPISaveMail; + +typedef ULONG (FAR PASCAL MAPIDELETEMAIL)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + __in LPSTR lpszMessageID, + FLAGS flFlags, + ULONG ulReserved +); +typedef MAPIDELETEMAIL FAR *LPMAPIDELETEMAIL; +MAPIDELETEMAIL MAPIDeleteMail; + +#if !defined(_LPMAPIFREEBUFFER_DEFINED) //+MS_TARGET_APPLE +#define _LPMAPIFREEBUFFER_DEFINED +typedef ULONG (EXPORT FAR PASCAL *LPMAPIFREEBUFFER)(LPVOID pv); +#endif //_LPMAPIFREEBUFFER_DEFINED + +ULONG FAR PASCAL MAPIFreeBuffer(LPVOID pv); + +typedef ULONG (FAR PASCAL MAPIADDRESS)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + __in LPSTR lpszCaption, + ULONG nEditFields, + __in LPSTR lpszLabels, + ULONG nRecips, + lpMapiRecipDesc lpRecips, + FLAGS flFlags, + ULONG ulReserved, + LPULONG lpnNewRecips, + lpMapiRecipDesc FAR *lppNewRecips +); +typedef MAPIADDRESS FAR *LPMAPIADDRESS; +MAPIADDRESS MAPIAddress; + +typedef ULONG (FAR PASCAL MAPIDETAILS)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + lpMapiRecipDesc lpRecip, + FLAGS flFlags, + ULONG ulReserved +); +typedef MAPIDETAILS FAR *LPMAPIDETAILS; +MAPIDETAILS MAPIDetails; + +typedef ULONG (FAR PASCAL MAPIRESOLVENAME)( + LHANDLE lhSession, + ULONG_PTR ulUIParam, + __in LPSTR lpszName, + FLAGS flFlags, + ULONG ulReserved, + lpMapiRecipDesc FAR *lppRecip +); +typedef MAPIRESOLVENAME FAR *LPMAPIRESOLVENAME; +MAPIRESOLVENAME MAPIResolveName; + +#ifndef SUCCESS_SUCCESS +#define SUCCESS_SUCCESS 0 +#endif +#define MAPI_USER_ABORT 1 +#define MAPI_E_USER_ABORT MAPI_USER_ABORT +#define MAPI_E_FAILURE 2 +#define MAPI_E_LOGON_FAILURE 3 +#define MAPI_E_LOGIN_FAILURE MAPI_E_LOGON_FAILURE +#define MAPI_E_DISK_FULL 4 +#define MAPI_E_INSUFFICIENT_MEMORY 5 +#define MAPI_E_ACCESS_DENIED 6 +#define MAPI_E_TOO_MANY_SESSIONS 8 +#define MAPI_E_TOO_MANY_FILES 9 +#define MAPI_E_TOO_MANY_RECIPIENTS 10 +#define MAPI_E_ATTACHMENT_NOT_FOUND 11 +#define MAPI_E_ATTACHMENT_OPEN_FAILURE 12 +#define MAPI_E_ATTACHMENT_WRITE_FAILURE 13 +#define MAPI_E_UNKNOWN_RECIPIENT 14 +#define MAPI_E_BAD_RECIPTYPE 15 +#define MAPI_E_NO_MESSAGES 16 +#define MAPI_E_INVALID_MESSAGE 17 +#define MAPI_E_TEXT_TOO_LARGE 18 +#define MAPI_E_INVALID_SESSION 19 +#define MAPI_E_TYPE_NOT_SUPPORTED 20 +#define MAPI_E_AMBIGUOUS_RECIPIENT 21 +#define MAPI_E_AMBIG_RECIP MAPI_E_AMBIGUOUS_RECIPIENT +#define MAPI_E_MESSAGE_IN_USE 22 +#define MAPI_E_NETWORK_FAILURE 23 +#define MAPI_E_INVALID_EDITFIELDS 24 +#define MAPI_E_INVALID_RECIPS 25 +#define MAPI_E_NOT_SUPPORTED 26 + + + +#ifdef MAPIX_H +/* Maps from a simple mapi session to a MAPI 1.0 extended mapi session */ + +STDMETHODIMP_(SCODE) +ScMAPIXFromSMAPI(LHANDLE lhSimpleSession, + ULONG ulFlags, + LPCIID lpInterface, + LPMAPISESSION FAR * lppMAPISession); +#endif /* MAPIX_H */ + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* MAPI_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIAux.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIAux.h similarity index 96% rename from com/win32comext/mapi/src/mapi_headers/MAPIAux.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIAux.h index 1f8bcb842..85f061e95 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIAux.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIAux.h @@ -1,235 +1,235 @@ -/* - * M A P I A U X . H - * - * Messaging Applications Programming Interface. - * - * Copyright (c) 2010 Microsoft Corporation. All Rights Reserved. - * - * Purpose: - * - * This file defines additional interfaces, structures, and constants - * used by the Messaging Applications Programming Interface - */ - - -#ifndef MAPIAUXGUID_H -#ifdef INITGUID -#include -#define MAPIAUXGUID_H -#endif /* INITGUID */ - -#if !defined(INITGUID) || defined(USES_IID_IMsgServiceAdmin2) -DEFINE_OLEGUID(IID_IMsgServiceAdmin2,0x00020387, 0, 0); -#endif - -#if !defined(INITGUID) || defined(USES_IID_IMessageRaw) -DEFINE_OLEGUID(IID_IMessageRaw, 0x0002038A, 0, 0); -#endif - -#endif /* MAPIAUXGUID_H */ - - - -#ifndef MAPIAUX_H -#define MAPIAUX_H - -/* Include common MAPI header files if they haven't been already. */ - -#ifndef MAPIDEFS_H -#include -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef BEGIN_INTERFACE -#define BEGIN_INTERFACE -#endif - -/* Forward interface declarations */ - -DECLARE_MAPI_INTERFACE_PTR(IMsgServiceAdmin2, LPSERVICEADMIN2); - -// Property tags - -#define PR_ATTACH_CONTENT_ID PROP_TAG( PT_TSTRING, 0x3712) -#define PR_ATTACH_CONTENT_ID_W PROP_TAG( PT_UNICODE, 0x3712) -#define PR_ATTACH_CONTENT_ID_A PROP_TAG( PT_STRING8, 0x3712) - -// Additional display attributes, to supplement PR_DISPLAY_TYPE. -#define PR_DISPLAY_TYPE_EX PROP_TAG( PT_LONG, 0x3905) - -#define PR_MSG_EDITOR_FORMAT PROP_TAG( PT_LONG, 0x5909 ) - -#define PR_ROH_FLAGS PROP_TAG( PT_LONG, 0x6623) - -#define PR_ROH_PROXY_AUTH_SCHEME PROP_TAG( PT_LONG, 0x6627) - - -// Constants - -/* MAPILogonEx() flags. */ -#define MAPI_BG_SESSION 0x00200000 /* Used for async profile access */ - -/* Flags for MAPIINIT_0 structure ulFlags value passed to MAPIInitialize() */ -#define MAPI_NO_COINIT 0x00000008 - -/* SaveChanges flags */ -#define SPAMFILTER_ONSAVE ((ULONG) 0x00000080) -#define ITEMPROC_FORCE ((ULONG) 0x00000800) -#define NON_EMS_XP_SAVE ((ULONG) 0x00001000) - -/* Flags for OpenMessageStore() */ -#define MDB_ONLINE ((ULONG) 0x00000100) - - -/* IMsgStore Interface ----------------------------------------------------- */ -/* PR_STORE_SUPPORT_MASK bits */ -#define STORE_UNICODE_OK ((ULONG) 0x00040000) -#define STORE_ITEMPROC ((ULONG) 0x00200000) - -/* Miscellaneous flags */ -#define MAPI_NO_CACHE ((ULONG) 0x00000200) -#define MAPI_CACHE_ONLY ((ULONG) 0x00004000) - - -/* Values for PR_AGING_GRANULARITY (Determines aging is measured by months, weeks, or days) */ -#define AG_MONTHS 0 -#define AG_WEEKS 1 -#define AG_DAYS 2 -#define NUM_AG_TYPES 3 - - -// PR_DISPLAY_TYPE_EX has the following format -// -// 33222222222211111111110000000000 -// 10987654321098765432109876543210 -// -// FAxxxxxxxxxxxxxxRRRRRRRRLLLLLLLL -// -// F = 1 if remote is valid, 0 if it is not -// A = 1 if the user is ACL-able, 0 if the user is not -// x - unused at this time, do not interpret as this may be used in the future -// R = display type from - -#define DTE_FLAG_REMOTE_VALID 0x80000000 -#define DTE_FLAG_ACL_CAPABLE 0x40000000 -#define DTE_MASK_REMOTE 0x0000ff00 -#define DTE_MASK_LOCAL 0x000000ff - -#define DTE_IS_REMOTE_VALID(v) (!!((v) & DTE_FLAG_REMOTE_VALID)) -#define DTE_IS_ACL_CAPABLE(v) (!!((v) & DTE_FLAG_ACL_CAPABLE)) -#define DTE_REMOTE(v) (((v) & DTE_MASK_REMOTE) >> 8) -#define DTE_LOCAL(v) ((v) & DTE_MASK_LOCAL) - -#define DT_ROOM ((ULONG) 0x00000007) -#define DT_EQUIPMENT ((ULONG) 0x00000008) -#define DT_SEC_DISTLIST ((ULONG) 0x00000009) - -// Sender's editor format (PR_MSG_EDITOR_FORMAT) -#define EDITOR_FORMAT_DONTKNOW ((ULONG)0) -#define EDITOR_FORMAT_PLAINTEXT ((ULONG)1) -#define EDITOR_FORMAT_HTML ((ULONG)2) -#define EDITOR_FORMAT_RTF ((ULONG)3) - - -// Flags used in PR_ROH_FLAGS - http://support.microsoft.com/kb/898835 -// Connect to my Exchange mailbox using HTTP -#define ROHFLAGS_USE_ROH 0x1 -// Connect using SSL only -#define ROHFLAGS_SSL_ONLY 0x2 -// Mutually authenticate the session when connecting with SSL -#define ROHFLAGS_MUTUAL_AUTH 0x4 -// On fast networks, connect using HTTP first, then connect using TCP/IP -#define ROHFLAGS_HTTP_FIRST_ON_FAST 0x8 -// On slow networks, connect using HTTP first, then connect using TCP/IP -#define ROHFLAGS_HTTP_FIRST_ON_SLOW 0x20 - -// Flags used in PR_ROH_PROXY_AUTH_SCHEME -// Basic Authentication -#define ROHAUTH_BASIC 0x1 -// NTLM Authentication -#define ROHAUTH_NTLM 0x2 - - -// Interface declarations - -#define MAPI_IMSGSERVICEADMIN_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetMsgServiceTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(CreateMsgService) \ - (THIS_ LPTSTR lpszService, \ - LPTSTR lpszDisplayName, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(DeleteMsgService) \ - (THIS_ LPMAPIUID lpUID) IPURE; \ - MAPIMETHOD(CopyMsgService) \ - (THIS_ LPMAPIUID lpUID, \ - LPTSTR lpszDisplayName, \ - LPCIID lpInterfaceToCopy, \ - LPCIID lpInterfaceDst, \ - LPVOID lpObjectDst, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(RenameMsgService) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG ulFlags, \ - LPTSTR lpszDisplayName) IPURE; \ - MAPIMETHOD(ConfigureMsgService) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - ULONG cValues, \ - LPSPropValue lpProps) IPURE; \ - MAPIMETHOD(OpenProfileSection) \ - (THIS_ LPMAPIUID lpUID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPPROFSECT FAR * lppProfSect) IPURE; \ - MAPIMETHOD(MsgServiceTransportOrder) \ - (THIS_ ULONG cUID, \ - LPMAPIUID lpUIDList, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(AdminProviders) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG ulFlags, \ - LPPROVIDERADMIN FAR * lppProviderAdmin) IPURE; \ - MAPIMETHOD(SetPrimaryIdentity) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetProviderTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - -#define MAPI_IMSGSERVICEADMIN_METHODS2(IPURE) \ - MAPIMETHOD(CreateMsgServiceEx) \ - (THIS_ LPTSTR lpszService, \ - LPTSTR lpszDisplayName, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - LPMAPIUID lpuidService) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMsgServiceAdmin2 -DECLARE_MAPI_INTERFACE_(IMsgServiceAdmin2, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMSGSERVICEADMIN_METHODS(PURE) - MAPI_IMSGSERVICEADMIN_METHODS2(PURE) -}; - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* MAPIAUX_H */ +/* + * M A P I A U X . H + * + * Messaging Applications Programming Interface. + * + * Copyright (c) 2010 Microsoft Corporation. All Rights Reserved. + * + * Purpose: + * + * This file defines additional interfaces, structures, and constants + * used by the Messaging Applications Programming Interface + */ + + +#ifndef MAPIAUXGUID_H +#ifdef INITGUID +#include +#define MAPIAUXGUID_H +#endif /* INITGUID */ + +#if !defined(INITGUID) || defined(USES_IID_IMsgServiceAdmin2) +DEFINE_OLEGUID(IID_IMsgServiceAdmin2,0x00020387, 0, 0); +#endif + +#if !defined(INITGUID) || defined(USES_IID_IMessageRaw) +DEFINE_OLEGUID(IID_IMessageRaw, 0x0002038A, 0, 0); +#endif + +#endif /* MAPIAUXGUID_H */ + + + +#ifndef MAPIAUX_H +#define MAPIAUX_H + +/* Include common MAPI header files if they haven't been already. */ + +#ifndef MAPIDEFS_H +#include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +/* Forward interface declarations */ + +DECLARE_MAPI_INTERFACE_PTR(IMsgServiceAdmin2, LPSERVICEADMIN2); + +// Property tags + +#define PR_ATTACH_CONTENT_ID PROP_TAG( PT_TSTRING, 0x3712) +#define PR_ATTACH_CONTENT_ID_W PROP_TAG( PT_UNICODE, 0x3712) +#define PR_ATTACH_CONTENT_ID_A PROP_TAG( PT_STRING8, 0x3712) + +// Additional display attributes, to supplement PR_DISPLAY_TYPE. +#define PR_DISPLAY_TYPE_EX PROP_TAG( PT_LONG, 0x3905) + +#define PR_MSG_EDITOR_FORMAT PROP_TAG( PT_LONG, 0x5909 ) + +#define PR_ROH_FLAGS PROP_TAG( PT_LONG, 0x6623) + +#define PR_ROH_PROXY_AUTH_SCHEME PROP_TAG( PT_LONG, 0x6627) + + +// Constants + +/* MAPILogonEx() flags. */ +#define MAPI_BG_SESSION 0x00200000 /* Used for async profile access */ + +/* Flags for MAPIINIT_0 structure ulFlags value passed to MAPIInitialize() */ +#define MAPI_NO_COINIT 0x00000008 + +/* SaveChanges flags */ +#define SPAMFILTER_ONSAVE ((ULONG) 0x00000080) +#define ITEMPROC_FORCE ((ULONG) 0x00000800) +#define NON_EMS_XP_SAVE ((ULONG) 0x00001000) + +/* Flags for OpenMessageStore() */ +#define MDB_ONLINE ((ULONG) 0x00000100) + + +/* IMsgStore Interface ----------------------------------------------------- */ +/* PR_STORE_SUPPORT_MASK bits */ +#define STORE_UNICODE_OK ((ULONG) 0x00040000) +#define STORE_ITEMPROC ((ULONG) 0x00200000) + +/* Miscellaneous flags */ +#define MAPI_NO_CACHE ((ULONG) 0x00000200) +#define MAPI_CACHE_ONLY ((ULONG) 0x00004000) + + +/* Values for PR_AGING_GRANULARITY (Determines aging is measured by months, weeks, or days) */ +#define AG_MONTHS 0 +#define AG_WEEKS 1 +#define AG_DAYS 2 +#define NUM_AG_TYPES 3 + + +// PR_DISPLAY_TYPE_EX has the following format +// +// 33222222222211111111110000000000 +// 10987654321098765432109876543210 +// +// FAxxxxxxxxxxxxxxRRRRRRRRLLLLLLLL +// +// F = 1 if remote is valid, 0 if it is not +// A = 1 if the user is ACL-able, 0 if the user is not +// x - unused at this time, do not interpret as this may be used in the future +// R = display type from + +#define DTE_FLAG_REMOTE_VALID 0x80000000 +#define DTE_FLAG_ACL_CAPABLE 0x40000000 +#define DTE_MASK_REMOTE 0x0000ff00 +#define DTE_MASK_LOCAL 0x000000ff + +#define DTE_IS_REMOTE_VALID(v) (!!((v) & DTE_FLAG_REMOTE_VALID)) +#define DTE_IS_ACL_CAPABLE(v) (!!((v) & DTE_FLAG_ACL_CAPABLE)) +#define DTE_REMOTE(v) (((v) & DTE_MASK_REMOTE) >> 8) +#define DTE_LOCAL(v) ((v) & DTE_MASK_LOCAL) + +#define DT_ROOM ((ULONG) 0x00000007) +#define DT_EQUIPMENT ((ULONG) 0x00000008) +#define DT_SEC_DISTLIST ((ULONG) 0x00000009) + +// Sender's editor format (PR_MSG_EDITOR_FORMAT) +#define EDITOR_FORMAT_DONTKNOW ((ULONG)0) +#define EDITOR_FORMAT_PLAINTEXT ((ULONG)1) +#define EDITOR_FORMAT_HTML ((ULONG)2) +#define EDITOR_FORMAT_RTF ((ULONG)3) + + +// Flags used in PR_ROH_FLAGS - http://support.microsoft.com/kb/898835 +// Connect to my Exchange mailbox using HTTP +#define ROHFLAGS_USE_ROH 0x1 +// Connect using SSL only +#define ROHFLAGS_SSL_ONLY 0x2 +// Mutually authenticate the session when connecting with SSL +#define ROHFLAGS_MUTUAL_AUTH 0x4 +// On fast networks, connect using HTTP first, then connect using TCP/IP +#define ROHFLAGS_HTTP_FIRST_ON_FAST 0x8 +// On slow networks, connect using HTTP first, then connect using TCP/IP +#define ROHFLAGS_HTTP_FIRST_ON_SLOW 0x20 + +// Flags used in PR_ROH_PROXY_AUTH_SCHEME +// Basic Authentication +#define ROHAUTH_BASIC 0x1 +// NTLM Authentication +#define ROHAUTH_NTLM 0x2 + + +// Interface declarations + +#define MAPI_IMSGSERVICEADMIN_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetMsgServiceTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(CreateMsgService) \ + (THIS_ LPTSTR lpszService, \ + LPTSTR lpszDisplayName, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(DeleteMsgService) \ + (THIS_ LPMAPIUID lpUID) IPURE; \ + MAPIMETHOD(CopyMsgService) \ + (THIS_ LPMAPIUID lpUID, \ + LPTSTR lpszDisplayName, \ + LPCIID lpInterfaceToCopy, \ + LPCIID lpInterfaceDst, \ + LPVOID lpObjectDst, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(RenameMsgService) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG ulFlags, \ + LPTSTR lpszDisplayName) IPURE; \ + MAPIMETHOD(ConfigureMsgService) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + ULONG cValues, \ + LPSPropValue lpProps) IPURE; \ + MAPIMETHOD(OpenProfileSection) \ + (THIS_ LPMAPIUID lpUID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPPROFSECT FAR * lppProfSect) IPURE; \ + MAPIMETHOD(MsgServiceTransportOrder) \ + (THIS_ ULONG cUID, \ + LPMAPIUID lpUIDList, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(AdminProviders) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG ulFlags, \ + LPPROVIDERADMIN FAR * lppProviderAdmin) IPURE; \ + MAPIMETHOD(SetPrimaryIdentity) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetProviderTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + +#define MAPI_IMSGSERVICEADMIN_METHODS2(IPURE) \ + MAPIMETHOD(CreateMsgServiceEx) \ + (THIS_ LPTSTR lpszService, \ + LPTSTR lpszDisplayName, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + LPMAPIUID lpuidService) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMsgServiceAdmin2 +DECLARE_MAPI_INTERFACE_(IMsgServiceAdmin2, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMSGSERVICEADMIN_METHODS(PURE) + MAPI_IMSGSERVICEADMIN_METHODS2(PURE) +}; + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* MAPIAUX_H */ diff --git a/com/win32comext/mapi/src/mapi_headers/MAPICode.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPICode.h similarity index 94% rename from com/win32comext/mapi/src/mapi_headers/MAPICode.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPICode.h index 467023a92..d3d2504fb 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPICode.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPICode.h @@ -1,220 +1,216 @@ -/* - * M A P I C O D E . H - * - * Status Codes returned by MAPI routines - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef MAPICODE_H -#define MAPICODE_H - -#if _MSC_VER > 1000 -#pragma once -#endif - -#if defined (WIN64) && !defined (_WIN64) -#define _WIN64 -#endif - -/* - * Under Win64 systems Win32 is also defined for backwards compatibility. - */ - -#if defined (WIN32) && !defined (_WIN32) -#define _WIN32 -#endif - -/* Define S_OK and ITF_* */ - -#if defined(_WIN64) || defined(_WIN32) -#include -#endif - - -/* - * On Windows, scodes are 32-bit values laid out as follows: - * - * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 - * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 - * +-+-+-+-+-+---------------------+-------------------------------+ - * |S|R|C|N|r| Facility | Code | - * +-+-+-+-+-+---------------------+-------------------------------+ - * - * where - * - * S - Severity - indicates success/fail - * - * 0 - Success - * 1 - Fail (COERROR) - * - * R - reserved portion of the facility code, corresponds to Windows - * second severity bit. - * - * C - reserved portion of the facility code, corresponds to Windows - * C field. - * - * N - reserved portion of the facility code. Used to indicate a - * mapped Windows status value. - * - * r - reserved portion of the facility code. Reserved for internal - * use. Used to indicate HRESULT values that are not status - * values, but are instead message ids for display strings. - * - * Facility - is the facility code - * FACILITY_NULL 0x0 - * FACILITY_RPC 0x1 - * FACILITY_DISPATCH 0x2 - * FACILITY_STORAGE 0x3 - * FACILITY_ITF 0x4 - * FACILITY_WIN32 0x7 - * FACILITY_WINDOWS 0x8 - * - * Code - is the facility's status code - * - */ - - - - -/* - * We can't use OLE 2.0 macros to build sCodes because the definition has - * changed and we wish to conform to the new definition. - */ -#define MAKE_MAPI_SCODE(sev,fac,code) \ - ((SCODE) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) ) - -/* The following two macros are used to build OLE 2.0 style sCodes */ - -#define MAKE_MAPI_E( err ) (MAKE_MAPI_SCODE( 1, FACILITY_ITF, err )) -#define MAKE_MAPI_S( warn ) (MAKE_MAPI_SCODE( 0, FACILITY_ITF, warn )) - -#ifdef SUCCESS_SUCCESS -#undef SUCCESS_SUCCESS -#endif -#define SUCCESS_SUCCESS 0L - -/* General errors (used by more than one MAPI object) */ - -#define MAPI_E_CALL_FAILED E_FAIL -#define MAPI_E_NOT_ENOUGH_MEMORY E_OUTOFMEMORY -#define MAPI_E_INVALID_PARAMETER E_INVALIDARG -#define MAPI_E_INTERFACE_NOT_SUPPORTED E_NOINTERFACE -#define MAPI_E_NO_ACCESS E_ACCESSDENIED - -#define MAPI_E_NO_SUPPORT MAKE_MAPI_E( 0x102 ) -#define MAPI_E_BAD_CHARWIDTH MAKE_MAPI_E( 0x103 ) -#define MAPI_E_STRING_TOO_LONG MAKE_MAPI_E( 0x105 ) -#define MAPI_E_UNKNOWN_FLAGS MAKE_MAPI_E( 0x106 ) -#define MAPI_E_INVALID_ENTRYID MAKE_MAPI_E( 0x107 ) -#define MAPI_E_INVALID_OBJECT MAKE_MAPI_E( 0x108 ) -#define MAPI_E_OBJECT_CHANGED MAKE_MAPI_E( 0x109 ) -#define MAPI_E_OBJECT_DELETED MAKE_MAPI_E( 0x10A ) -#define MAPI_E_BUSY MAKE_MAPI_E( 0x10B ) -#define MAPI_E_NOT_ENOUGH_DISK MAKE_MAPI_E( 0x10D ) -#define MAPI_E_NOT_ENOUGH_RESOURCES MAKE_MAPI_E( 0x10E ) -#define MAPI_E_NOT_FOUND MAKE_MAPI_E( 0x10F ) -#define MAPI_E_VERSION MAKE_MAPI_E( 0x110 ) -#define MAPI_E_LOGON_FAILED MAKE_MAPI_E( 0x111 ) -#define MAPI_E_SESSION_LIMIT MAKE_MAPI_E( 0x112 ) -#define MAPI_E_USER_CANCEL MAKE_MAPI_E( 0x113 ) -#define MAPI_E_UNABLE_TO_ABORT MAKE_MAPI_E( 0x114 ) -#define MAPI_E_NETWORK_ERROR MAKE_MAPI_E( 0x115 ) -#define MAPI_E_DISK_ERROR MAKE_MAPI_E( 0x116 ) -#define MAPI_E_TOO_COMPLEX MAKE_MAPI_E( 0x117 ) -#define MAPI_E_BAD_COLUMN MAKE_MAPI_E( 0x118 ) -#define MAPI_E_EXTENDED_ERROR MAKE_MAPI_E( 0x119 ) -#define MAPI_E_COMPUTED MAKE_MAPI_E( 0x11A ) -#define MAPI_E_CORRUPT_DATA MAKE_MAPI_E( 0x11B ) -#define MAPI_E_UNCONFIGURED MAKE_MAPI_E( 0x11C ) -#define MAPI_E_FAILONEPROVIDER MAKE_MAPI_E( 0x11D ) -#define MAPI_E_UNKNOWN_CPID MAKE_MAPI_E( 0x11E ) -#define MAPI_E_UNKNOWN_LCID MAKE_MAPI_E( 0x11F ) - -/* Flavors of E_ACCESSDENIED, used at logon */ - -#define MAPI_E_PASSWORD_CHANGE_REQUIRED MAKE_MAPI_E( 0x120 ) -#define MAPI_E_PASSWORD_EXPIRED MAKE_MAPI_E( 0x121 ) -#define MAPI_E_INVALID_WORKSTATION_ACCOUNT MAKE_MAPI_E( 0x122 ) -#define MAPI_E_INVALID_ACCESS_TIME MAKE_MAPI_E( 0x123 ) -#define MAPI_E_ACCOUNT_DISABLED MAKE_MAPI_E( 0x124 ) - -/* MAPI base function and status object specific errors and warnings */ - -#define MAPI_E_END_OF_SESSION MAKE_MAPI_E( 0x200 ) -#define MAPI_E_UNKNOWN_ENTRYID MAKE_MAPI_E( 0x201 ) -#define MAPI_E_MISSING_REQUIRED_COLUMN MAKE_MAPI_E( 0x202 ) -#define MAPI_W_NO_SERVICE MAKE_MAPI_S( 0x203 ) - -/* Property specific errors and warnings */ - -#define MAPI_E_BAD_VALUE MAKE_MAPI_E( 0x301 ) -#define MAPI_E_INVALID_TYPE MAKE_MAPI_E( 0x302 ) -#define MAPI_E_TYPE_NO_SUPPORT MAKE_MAPI_E( 0x303 ) -#define MAPI_E_UNEXPECTED_TYPE MAKE_MAPI_E( 0x304 ) -#define MAPI_E_TOO_BIG MAKE_MAPI_E( 0x305 ) -#define MAPI_E_DECLINE_COPY MAKE_MAPI_E( 0x306 ) -#define MAPI_E_UNEXPECTED_ID MAKE_MAPI_E( 0x307 ) - -#define MAPI_W_ERRORS_RETURNED MAKE_MAPI_S( 0x380 ) - -/* Table specific errors and warnings */ - -#define MAPI_E_UNABLE_TO_COMPLETE MAKE_MAPI_E( 0x400 ) -#define MAPI_E_TIMEOUT MAKE_MAPI_E( 0x401 ) -#define MAPI_E_TABLE_EMPTY MAKE_MAPI_E( 0x402 ) -#define MAPI_E_TABLE_TOO_BIG MAKE_MAPI_E( 0x403 ) - -#define MAPI_E_INVALID_BOOKMARK MAKE_MAPI_E( 0x405 ) - -#define MAPI_W_POSITION_CHANGED MAKE_MAPI_S( 0x481 ) -#define MAPI_W_APPROX_COUNT MAKE_MAPI_S( 0x482 ) - -/* Transport specific errors and warnings */ - -#define MAPI_E_WAIT MAKE_MAPI_E( 0x500 ) -#define MAPI_E_CANCEL MAKE_MAPI_E( 0x501 ) -#define MAPI_E_NOT_ME MAKE_MAPI_E( 0x502 ) - -#define MAPI_W_CANCEL_MESSAGE MAKE_MAPI_S( 0x580 ) - -/* Message Store, Folder, and Message specific errors and warnings */ - -#define MAPI_E_CORRUPT_STORE MAKE_MAPI_E( 0x600 ) -#define MAPI_E_NOT_IN_QUEUE MAKE_MAPI_E( 0x601 ) -#define MAPI_E_NO_SUPPRESS MAKE_MAPI_E( 0x602 ) -#define MAPI_E_COLLISION MAKE_MAPI_E( 0x604 ) -#define MAPI_E_NOT_INITIALIZED MAKE_MAPI_E( 0x605 ) -#define MAPI_E_NON_STANDARD MAKE_MAPI_E( 0x606 ) -#define MAPI_E_NO_RECIPIENTS MAKE_MAPI_E( 0x607 ) -#define MAPI_E_SUBMITTED MAKE_MAPI_E( 0x608 ) -#define MAPI_E_HAS_FOLDERS MAKE_MAPI_E( 0x609 ) -#define MAPI_E_HAS_MESSAGES MAKE_MAPI_E( 0x60A ) -#define MAPI_E_FOLDER_CYCLE MAKE_MAPI_E( 0x60B ) - -#define MAPI_W_PARTIAL_COMPLETION MAKE_MAPI_S( 0x680 ) - -/* Address Book specific errors and warnings */ - -#define MAPI_E_AMBIGUOUS_RECIP MAKE_MAPI_E( 0x700 ) - -/* The range 0x0800 to 0x08FF is reserved */ - -/* Obsolete typing shortcut that will go away eventually. */ -#ifndef MakeResult -#define MakeResult(_s) ResultFromScode(_s) -#endif - -/* We expect these to eventually be defined by OLE, but for now, - * here they are. When OLE defines them they can be much more - * efficient than these, but these are "proper" and don't make - * use of any hidden tricks. - */ -#ifndef HR_SUCCEEDED -#define HR_SUCCEEDED(_hr) SUCCEEDED((SCODE)(_hr)) -#define HR_FAILED(_hr) FAILED((SCODE)(_hr)) -#endif - -#endif /* MAPICODE_H */ - - +/* + * M A P I C O D E . H + * + * Status Codes returned by MAPI routines + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPICODE_H +#define MAPICODE_H + +#if _MSC_VER > 1000 +#pragma once +#endif + +#if defined (WIN64) && !defined (_WIN64) +#define _WIN64 +#endif + +/* + * Under Win64 systems Win32 is also defined for backwards compatibility. + */ + +#if defined (WIN32) && !defined (_WIN32) +#define _WIN32 +#endif + +/* Define S_OK and ITF_* */ + +#if defined(_WIN64) || defined(_WIN32) || defined (_M_ARM) +#include +#endif + + +/* + * On Windows, scodes are 32-bit values laid out as follows: + * + * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+---------------------+-------------------------------+ + * |S|R|C|N|r| Facility | Code | + * +-+-+-+-+-+---------------------+-------------------------------+ + * + * where + * + * S - Severity - indicates success/fail + * + * 0 - Success + * 1 - Fail (COERROR) + * + * R - reserved portion of the facility code, corresponds to Windows + * second severity bit. + * + * C - reserved portion of the facility code, corresponds to Windows + * C field. + * + * N - reserved portion of the facility code. Used to indicate a + * mapped Windows status value. + * + * r - reserved portion of the facility code. Reserved for internal + * use. Used to indicate HRESULT values that are not status + * values, but are instead message ids for display strings. + * + * Facility - is the facility code + * FACILITY_NULL 0x0 + * FACILITY_RPC 0x1 + * FACILITY_DISPATCH 0x2 + * FACILITY_STORAGE 0x3 + * FACILITY_ITF 0x4 + * FACILITY_WIN32 0x7 + * FACILITY_WINDOWS 0x8 + * + * Code - is the facility's status code + * + */ + + + + +/* + * We can't use OLE 2.0 macros to build sCodes because the definition has + * changed and we wish to conform to the new definition. + */ +#define MAKE_MAPI_SCODE(sev,fac,code) \ + ((SCODE) (((ULONG)(sev)<<31) | ((ULONG)(fac)<<16) | ((ULONG)(code))) ) + +/* The following two macros are used to build OLE 2.0 style sCodes */ + +#define MAKE_MAPI_E( err ) (MAKE_MAPI_SCODE( 1, FACILITY_ITF, err )) +#define MAKE_MAPI_S( warn ) (MAKE_MAPI_SCODE( 0, FACILITY_ITF, warn )) + +#define SUCCESS_SUCCESS 0 + +/* General errors (used by more than one MAPI object) */ + +#define MAPI_E_CALL_FAILED E_FAIL +#define MAPI_E_NOT_ENOUGH_MEMORY E_OUTOFMEMORY +#define MAPI_E_INVALID_PARAMETER E_INVALIDARG +#define MAPI_E_INTERFACE_NOT_SUPPORTED E_NOINTERFACE +#define MAPI_E_NO_ACCESS E_ACCESSDENIED + +#define MAPI_E_NO_SUPPORT MAKE_MAPI_E( 0x102 ) +#define MAPI_E_BAD_CHARWIDTH MAKE_MAPI_E( 0x103 ) +#define MAPI_E_STRING_TOO_LONG MAKE_MAPI_E( 0x105 ) +#define MAPI_E_UNKNOWN_FLAGS MAKE_MAPI_E( 0x106 ) +#define MAPI_E_INVALID_ENTRYID MAKE_MAPI_E( 0x107 ) +#define MAPI_E_INVALID_OBJECT MAKE_MAPI_E( 0x108 ) +#define MAPI_E_OBJECT_CHANGED MAKE_MAPI_E( 0x109 ) +#define MAPI_E_OBJECT_DELETED MAKE_MAPI_E( 0x10A ) +#define MAPI_E_BUSY MAKE_MAPI_E( 0x10B ) +#define MAPI_E_NOT_ENOUGH_DISK MAKE_MAPI_E( 0x10D ) +#define MAPI_E_NOT_ENOUGH_RESOURCES MAKE_MAPI_E( 0x10E ) +#define MAPI_E_NOT_FOUND MAKE_MAPI_E( 0x10F ) +#define MAPI_E_VERSION MAKE_MAPI_E( 0x110 ) +#define MAPI_E_LOGON_FAILED MAKE_MAPI_E( 0x111 ) +#define MAPI_E_SESSION_LIMIT MAKE_MAPI_E( 0x112 ) +#define MAPI_E_USER_CANCEL MAKE_MAPI_E( 0x113 ) +#define MAPI_E_UNABLE_TO_ABORT MAKE_MAPI_E( 0x114 ) +#define MAPI_E_NETWORK_ERROR MAKE_MAPI_E( 0x115 ) +#define MAPI_E_DISK_ERROR MAKE_MAPI_E( 0x116 ) +#define MAPI_E_TOO_COMPLEX MAKE_MAPI_E( 0x117 ) +#define MAPI_E_BAD_COLUMN MAKE_MAPI_E( 0x118 ) +#define MAPI_E_EXTENDED_ERROR MAKE_MAPI_E( 0x119 ) +#define MAPI_E_COMPUTED MAKE_MAPI_E( 0x11A ) +#define MAPI_E_CORRUPT_DATA MAKE_MAPI_E( 0x11B ) +#define MAPI_E_UNCONFIGURED MAKE_MAPI_E( 0x11C ) +#define MAPI_E_FAILONEPROVIDER MAKE_MAPI_E( 0x11D ) +#define MAPI_E_UNKNOWN_CPID MAKE_MAPI_E( 0x11E ) +#define MAPI_E_UNKNOWN_LCID MAKE_MAPI_E( 0x11F ) + +/* Flavors of E_ACCESSDENIED, used at logon */ + +#define MAPI_E_PASSWORD_CHANGE_REQUIRED MAKE_MAPI_E( 0x120 ) +#define MAPI_E_PASSWORD_EXPIRED MAKE_MAPI_E( 0x121 ) +#define MAPI_E_INVALID_WORKSTATION_ACCOUNT MAKE_MAPI_E( 0x122 ) +#define MAPI_E_INVALID_ACCESS_TIME MAKE_MAPI_E( 0x123 ) +#define MAPI_E_ACCOUNT_DISABLED MAKE_MAPI_E( 0x124 ) + +/* MAPI base function and status object specific errors and warnings */ + +#define MAPI_E_END_OF_SESSION MAKE_MAPI_E( 0x200 ) +#define MAPI_E_UNKNOWN_ENTRYID MAKE_MAPI_E( 0x201 ) +#define MAPI_E_MISSING_REQUIRED_COLUMN MAKE_MAPI_E( 0x202 ) +#define MAPI_W_NO_SERVICE MAKE_MAPI_S( 0x203 ) + +/* Property specific errors and warnings */ + +#define MAPI_E_BAD_VALUE MAKE_MAPI_E( 0x301 ) +#define MAPI_E_INVALID_TYPE MAKE_MAPI_E( 0x302 ) +#define MAPI_E_TYPE_NO_SUPPORT MAKE_MAPI_E( 0x303 ) +#define MAPI_E_UNEXPECTED_TYPE MAKE_MAPI_E( 0x304 ) +#define MAPI_E_TOO_BIG MAKE_MAPI_E( 0x305 ) +#define MAPI_E_DECLINE_COPY MAKE_MAPI_E( 0x306 ) +#define MAPI_E_UNEXPECTED_ID MAKE_MAPI_E( 0x307 ) + +#define MAPI_W_ERRORS_RETURNED MAKE_MAPI_S( 0x380 ) + +/* Table specific errors and warnings */ + +#define MAPI_E_UNABLE_TO_COMPLETE MAKE_MAPI_E( 0x400 ) +#define MAPI_E_TIMEOUT MAKE_MAPI_E( 0x401 ) +#define MAPI_E_TABLE_EMPTY MAKE_MAPI_E( 0x402 ) +#define MAPI_E_TABLE_TOO_BIG MAKE_MAPI_E( 0x403 ) + +#define MAPI_E_INVALID_BOOKMARK MAKE_MAPI_E( 0x405 ) + +#define MAPI_W_POSITION_CHANGED MAKE_MAPI_S( 0x481 ) +#define MAPI_W_APPROX_COUNT MAKE_MAPI_S( 0x482 ) + +/* Transport specific errors and warnings */ + +#define MAPI_E_WAIT MAKE_MAPI_E( 0x500 ) +#define MAPI_E_CANCEL MAKE_MAPI_E( 0x501 ) +#define MAPI_E_NOT_ME MAKE_MAPI_E( 0x502 ) + +#define MAPI_W_CANCEL_MESSAGE MAKE_MAPI_S( 0x580 ) + +/* Message Store, Folder, and Message specific errors and warnings */ + +#define MAPI_E_CORRUPT_STORE MAKE_MAPI_E( 0x600 ) +#define MAPI_E_NOT_IN_QUEUE MAKE_MAPI_E( 0x601 ) +#define MAPI_E_NO_SUPPRESS MAKE_MAPI_E( 0x602 ) +#define MAPI_E_COLLISION MAKE_MAPI_E( 0x604 ) +#define MAPI_E_NOT_INITIALIZED MAKE_MAPI_E( 0x605 ) +#define MAPI_E_NON_STANDARD MAKE_MAPI_E( 0x606 ) +#define MAPI_E_NO_RECIPIENTS MAKE_MAPI_E( 0x607 ) +#define MAPI_E_SUBMITTED MAKE_MAPI_E( 0x608 ) +#define MAPI_E_HAS_FOLDERS MAKE_MAPI_E( 0x609 ) +#define MAPI_E_HAS_MESSAGES MAKE_MAPI_E( 0x60A ) +#define MAPI_E_FOLDER_CYCLE MAKE_MAPI_E( 0x60B ) + +#define MAPI_W_PARTIAL_COMPLETION MAKE_MAPI_S( 0x680 ) + +/* Address Book specific errors and warnings */ + +#define MAPI_E_AMBIGUOUS_RECIP MAKE_MAPI_E( 0x700 ) + +/* The range 0x0800 to 0x08FF is reserved */ + +/* Obsolete typing shortcut that will go away eventually. */ +#ifndef MakeResult +#define MakeResult(_s) ResultFromScode(_s) +#endif + +/* We expect these to eventually be defined by OLE, but for now, + * here they are. When OLE defines them they can be much more + * efficient than these, but these are "proper" and don't make + * use of any hidden tricks. + */ +#ifndef HR_SUCCEEDED +#define HR_SUCCEEDED(_hr) SUCCEEDED((SCODE)(_hr)) +#define HR_FAILED(_hr) FAILED((SCODE)(_hr)) +#endif + +#endif /* MAPICODE_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIDbg.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIDbg.h similarity index 96% rename from com/win32comext/mapi/src/mapi_headers/MAPIDbg.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIDbg.h index a0f2108fc..d94123a8f 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIDbg.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIDbg.h @@ -1,492 +1,493 @@ -/* - * M A P I D B G . H - * - * Debugging support for MAPI service providers. - * Support functions are implemented in MAPIDBG.C. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef __MAPIDBG_H_ -#define __MAPIDBG_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#if defined (WIN64) && !defined (_WIN64) -#define _WIN64 -#endif - -/* - * Under Win64 systems Win32 is also defined for backwards compatibility. - */ - -#if defined (WIN32) && !defined (_WIN32) -#define _WIN32 -#endif - -/* - * Debugging Macros ------------------------------------------------------- - * - * IFDBG(x) Results in the expression x if DEBUG is defined, or - * to nothing if DEBUG is not defined - * - * IFNDBG(x) Results in the expression x if DEBUG is not defined, - * or to nothing if DEBUG is defined - * - * Unreferenced(a) Causes a to be referenced so that the compiler - * doesn't issue warnings about unused local variables - * which exist but are reserved for future use (eg - * ulFlags in many cases) - */ - -#if defined(DEBUG) -#define IFDBG(x) x -#define IFNDBG(x) -#else -#define IFDBG(x) -#define IFNDBG(x) x -#endif - -#ifdef __cplusplus -#define EXTERN_C_BEGIN extern "C" { -#define EXTERN_C_END } -#else -#define EXTERN_C_BEGIN -#define EXTERN_C_END -#endif - -#define dimensionof(a) (sizeof(a)/sizeof(*(a))) - -#define Unreferenced(a) ((void)(a)) - -typedef long SCODE; -typedef unsigned long ULONG; -typedef unsigned long DWORD; - -/* - * Assert Macros --------------------------------------------------------- - * - * Assert(a) Displays a message indicating the file and line number - * of this Assert() if a == 0. OK'ing an assert traps - * into the debugger. - * - * AssertSz(a,sz) Works like an Assert(), but displays the string sz - * along with the file and line number. - * - * Side asserts A side assert works like an Assert(), but evaluates - * 'a' even when asserts are not enabled. - * - * NF asserts A NF (Non-Fatal) assert works like an Assert(), but - * continues instead of trapping into the debugger when - * OK'ed. - */ - -#if defined(DEBUG) || defined(ASSERTS_ENABLED) -#define IFTRAP(x) x -#else -#define IFTRAP(x) 0 -#endif - -#define Trap() IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,"Trap")) -#define TrapSz(psz) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz)) -#define TrapSz1(psz,a1) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1)) -#define TrapSz2(psz,a1,a2) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2)) -#define TrapSz3(psz,a1,a2,a3) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3)) -#define TrapSz4(psz,a1,a2,a3,a4) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4)) -#define TrapSz5(psz,a1,a2,a3,a4,a5) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)) -#define TrapSz6(psz,a1,a2,a3,a4,a5,a6) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)) -#define TrapSz7(psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)) -#define TrapSz8(psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)) -#define TrapSz9(psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)) - -#define Assert(t) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,"Assertion Failure: " #t),0)) -#define AssertSz(t,psz) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz),0)) -#define AssertSz1(t,psz,a1) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1),0)) -#define AssertSz2(t,psz,a1,a2) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2),0)) -#define AssertSz3(t,psz,a1,a2,a3) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3),0)) -#define AssertSz4(t,psz,a1,a2,a3,a4) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4),0)) -#define AssertSz5(t,psz,a1,a2,a3,a4,a5) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5),0)) -#define AssertSz6(t,psz,a1,a2,a3,a4,a5,a6) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6),0)) -#define AssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7),0)) -#define AssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8),0)) -#define AssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9),0)) - -#define SideAssert(t) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,"Assertion Failure: " #t)),0) -#define SideAssertSz(t,psz) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz)),0) -#define SideAssertSz1(t,psz,a1) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1)),0) -#define SideAssertSz2(t,psz,a1,a2) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2)),0) -#define SideAssertSz3(t,psz,a1,a2,a3) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3)),0) -#define SideAssertSz4(t,psz,a1,a2,a3,a4) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4)),0) -#define SideAssertSz5(t,psz,a1,a2,a3,a4,a5) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)),0) -#define SideAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)),0) -#define SideAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)),0) -#define SideAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)),0) -#define SideAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)),0) - -#define NFAssert(t) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,"Assertion Failure: " #t),0)) -#define NFAssertSz(t,psz) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz),0)) -#define NFAssertSz1(t,psz,a1) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1),0)) -#define NFAssertSz2(t,psz,a1,a2) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2),0)) -#define NFAssertSz3(t,psz,a1,a2,a3) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3),0)) -#define NFAssertSz4(t,psz,a1,a2,a3,a4) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4),0)) -#define NFAssertSz5(t,psz,a1,a2,a3,a4,a5) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5),0)) -#define NFAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6),0)) -#define NFAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7),0)) -#define NFAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8),0)) -#define NFAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9),0)) - -#define NFSideAssert(t) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,"Assertion Failure: " #t)),0) -#define NFSideAssertSz(t,psz) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz)),0) -#define NFSideAssertSz1(t,psz,a1) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1)),0) -#define NFSideAssertSz2(t,psz,a1,a2) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2)),0) -#define NFSideAssertSz3(t,psz,a1,a2,a3) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3)),0) -#define NFSideAssertSz4(t,psz,a1,a2,a3,a4) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4)),0) -#define NFSideAssertSz5(t,psz,a1,a2,a3,a4,a5) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)),0) -#define NFSideAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)),0) -#define NFSideAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)),0) -#define NFSideAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)),0) -#define NFSideAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)),0) - -/* - * Trace Macros ------------------------------------------------------------ - * - * DebugTrace Use for arbitrary formatted output. It - * takes exactly the same arguments as the - * Windows wsprintf() function. - * DebugTraceResult Shorthand for error tracing with an - * HRESULT. Arguments are the name of the - * function (not quoted) and the HRESULT. - * DebugTraceSc Shorthand for error tracing with an - * SCODE. Arguments are the name of the - * function (not quoted) and the SCODE. - * DebugTraceArg Shorthand for invalid parameter - * tracing. Arguments are the name of the - * function (not quoted) and a quoted - * string describing the bad parameter. - */ - -#if defined(DEBUG) || defined(TRACES_ENABLED) -#define IFTRACE(x) x -#define DebugTrace DebugTraceFn -#else -#define IFTRACE(x) 0 -#define DebugTrace 1?0:DebugTraceFn -#endif - -#define DebugTraceResult(f,hr) IFTRACE(((hr) ? DebugTraceFn(#f " returns 0x%08lX %s\n", GetScode(hr), SzDecodeScode(GetScode(hr))) : 0)) -#define DebugTraceSc(f,sc) IFTRACE(((sc) ? DebugTraceFn(#f " returns 0x%08lX %s\n", sc, SzDecodeScode(sc)) : 0)) -#define DebugTraceArg(f,s) IFTRACE(DebugTraceFn(#f ": bad parameter: " s "\n")) -#define DebugTraceLine() IFTRACE(DebugTraceFn("File %s, Line %i \n",__FILE__,__LINE__)) -#define DebugTraceProblems(sz, rgprob) IFTRACE(DebugTraceProblemsFn(sz, rgprob)) - -#define TraceSz(psz) IFTRACE(DebugTraceFn("~" psz)) -#define TraceSz1(psz,a1) IFTRACE(DebugTraceFn("~" psz,a1)) -#define TraceSz2(psz,a1,a2) IFTRACE(DebugTraceFn("~" psz,a1,a2)) -#define TraceSz3(psz,a1,a2,a3) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3)) -#define TraceSz4(psz,a1,a2,a3,a4) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4)) -#define TraceSz5(psz,a1,a2,a3,a4,a5) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5)) -#define TraceSz6(psz,a1,a2,a3,a4,a5,a6) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6)) -#define TraceSz7(psz,a1,a2,a3,a4,a5,a6,a7) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7)) -#define TraceSz8(psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7,a8)) -#define TraceSz9(psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)) - -/* Debugging Functions ---------------------------------------------------- */ - -EXTERN_C_BEGIN - -#if defined(_WIN64) || defined (_WIN32) -#define EXPORTDBG -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif - -int EXPORTDBG __cdecl DebugTrapFn(int fFatal, char *pszFile, int iLine, char *pszFormat, ...); -int EXPORTDBG __cdecl DebugTraceFn(char *pszFormat, ...); -void EXPORTDBG __cdecl DebugTraceProblemsFn(char *sz, void *rgprob); -char * EXPORTDBG __cdecl SzDecodeScodeFn(SCODE sc); -char * EXPORTDBG __cdecl SzDecodeUlPropTypeFn(unsigned long ulPropType); -char * EXPORTDBG __cdecl SzDecodeUlPropTagFn(unsigned long ulPropTag); -unsigned long EXPORTDBG __cdecl UlPropTagFromSzFn(char *psz); -SCODE EXPORTDBG __cdecl ScodeFromSzFn(char *psz); -void * EXPORTDBG __cdecl DBGMEM_EncapsulateFn(void * pmalloc, char *pszSubsys, int fCheckOften); -void EXPORTDBG __cdecl DBGMEM_ShutdownFn(void * pmalloc); -void EXPORTDBG __cdecl DBGMEM_CheckMemFn(void * pmalloc, int fReportOrphans); -#if defined(_WIN64) || defined(_WIN32) -void EXPORTDBG __cdecl DBGMEM_LeakHook(FARPROC pfn); -void EXPORTDBG __cdecl GetCallStack(DWORD_PTR *, int, int); -#endif -void EXPORTDBG __cdecl DBGMEM_NoLeakDetectFn(void * pmalloc, void *pv); -void EXPORTDBG __cdecl DBGMEM_SetFailureAtFn(void * pmalloc, ULONG ulFailureAt); -SCODE EXPORTDBG __cdecl ScCheckScFn(SCODE, SCODE *, char *, char *, int); -void * EXPORTDBG __cdecl VMAlloc(ULONG); -void * EXPORTDBG __cdecl VMAllocEx(ULONG, ULONG); -void * EXPORTDBG __cdecl VMRealloc(void *, ULONG); -void * EXPORTDBG __cdecl VMReallocEx(void *, ULONG, ULONG); -ULONG EXPORTDBG __cdecl VMGetSize(void *); -ULONG EXPORTDBG __cdecl VMGetSizeEx(void *, ULONG); -void EXPORTDBG __cdecl VMFree(void *); -void EXPORTDBG __cdecl VMFreeEx(void *, ULONG); - -EXTERN_C_END - -/* - * Debugging Macros ------------------------------------------------------- - * - * SzDecodeScode Returns the string name of an SCODE - * SzDecodeUlPropTag Returns the string name of a property - * tag - * UlPropTagFromSz Given a property tag's name, returns - * its value - * ScodeFromSz Given an SCODE's name, returns its - * value - * - * DBGMEM_Encapsulate Given an IMalloc interface, adds heap- - * checking functionality and returns a - * wrapped interface - * DBGMEM_Shutdown Undoes DBGMEM_Encapsulate, and prints - * out information on any allocations made - * since the interface was encapsulated - * that have not yet been released. - * DBGMEM_CheckMem Checks all memory allocated on the heap, - * and optionally reports leaked blocks. - * DBGMEM_NoLeakDetect Prevents a block from appearing on the leak - * report. Pass NULL for pv to inhibit leak - * reports at all from this heap. - */ - -#ifdef DEBUG - -#define SzDecodeScode(_sc) SzDecodeScodeFn(_sc) -#define SzDecodeUlPropType(_ulPropType) SzDecodeUlPropTypeFn(_ulPropType) -#define SzDecodeUlPropTag(_ulPropTag) SzDecodeUlPropTagFn(_ulPropTag) -#define UlPropTagFromSz(_sz) UlPropTagFromSzFn(_sz) -#define ScodeFromSz(_sz) ScodeFromSzFn(_sz) -#define DBGMEM_Encapsulate(pm, psz, f) DBGMEM_EncapsulateFn(pm, psz, f) -#define DBGMEM_Shutdown(pm) DBGMEM_ShutdownFn(pm) -#define DBGMEM_CheckMem(pm, f) DBGMEM_CheckMemFn(pm, f) -#define DBGMEM_NoLeakDetect(pm, pv) DBGMEM_NoLeakDetectFn(pm, pv) -#define DBGMEM_SetFailureAt(pm, ul) DBGMEM_SetFailureAtFn(pm, ul) - -#else - -#define SzDecodeScode(_sc) (0) -#define SzDecodeUlPropType(_ulPropType) (0) -#define SzDecodeUlPropTag(_ulPropTag) (0) -#define UlPropTagFromSz(_sz) (0) -#define ScodeFromSz(_sz) (0) - -#if defined(__cplusplus) && !defined(CINTERFACE) -#define DBGMEM_Encapsulate(pmalloc, pszSubsys, fCheckOften) \ - ((pmalloc)->AddRef(), (pmalloc)) -#define DBGMEM_Shutdown(pmalloc) \ - ((pmalloc)->Release()) -#else -#define DBGMEM_Encapsulate(pmalloc, pszSubsys, fCheckOften) \ - ((pmalloc)->lpVtbl->AddRef(pmalloc), (pmalloc)) -#define DBGMEM_Shutdown(pmalloc) \ - ((pmalloc)->lpVtbl->Release(pmalloc)) -#endif -#define DBGMEM_CheckMem(pm, f) -#define DBGMEM_NoLeakDetect(pm, pv) -#define DBGMEM_SetFailureAt(pm, ul) - -#endif - -/* - * SCODE maps ------------------------------------------------------------- - * - * ScCheckSc Given an SCODE and method name, verifies - * that the SCODE can legally be returned from - * thet method. Prints out a debug string if - * it cannot. - * HrCheckHr As ScCheckSc, for functions that return - * HRESULT. - */ - -#if defined(DEBUG) && !defined(DOS) -#define ScCheckSc(sc,fn) ScCheckScFn(sc,fn##_Scodes,#fn,__FILE__, __LINE__) -#define HrCheckHr(hr,fn) HrCheckSc(GetScode(hr),fn) -#else -#define ScCheckSc(sc,fn) (sc) -#define HrCheckHr(hr,fn) (hr) -#endif - -#define HrCheckSc(sc,fn) ResultFromScode(ScCheckSc(sc,fn)) - -#if defined(DEBUG) && !defined(DOS) -extern SCODE Common_Scodes[]; -extern SCODE MAPILogon_Scodes[]; -extern SCODE MAPIAllocateBuffer_Scodes[]; -extern SCODE MAPIAllocateMore_Scodes[]; -extern SCODE MAPIFreeBuffer_Scodes[]; - -extern SCODE IUnknown_QueryInterface_Scodes[]; -extern SCODE IUnknown_AddRef_Scodes[]; -extern SCODE IUnknown_Release_Scodes[]; -extern SCODE IUnknown_GetLastError_Scodes[]; - -extern SCODE IMAPIProp_CopyTo_Scodes[]; -extern SCODE IMAPIProp_CopyProps_Scodes[]; -extern SCODE IMAPIProp_DeleteProps_Scodes[]; -extern SCODE IMAPIProp_GetIDsFromNames_Scodes[]; -extern SCODE IMAPIProp_GetLastError_Scodes[]; -extern SCODE IMAPIProp_GetNamesFromIDs_Scodes[]; -extern SCODE IMAPIProp_GetPropList_Scodes[]; -extern SCODE IMAPIProp_GetProps_Scodes[]; -extern SCODE IMAPIProp_OpenProperty_Scodes[]; -extern SCODE IMAPIProp_SetProps_Scodes[]; -extern SCODE IMAPIProp_SaveChanges_Scodes[]; - -extern SCODE IStream_Read_Scodes[]; -extern SCODE IStream_Write_Scodes[]; -extern SCODE IStream_Seek_Scodes[]; -extern SCODE IStream_SetSize_Scodes[]; -extern SCODE IStream_Tell_Scodes[]; -extern SCODE IStream_LockRegion_Scodes[]; -extern SCODE IStream_UnlockRegion_Scodes[]; -extern SCODE IStream_Clone_Scodes[]; -extern SCODE IStream_CopyTo_Scodes[]; -extern SCODE IStream_Revert_Scodes[]; -extern SCODE IStream_Stat_Scodes[]; -extern SCODE IStream_Commit_Scodes[]; - -extern SCODE IMAPITable_GetLastError_Scodes[]; -extern SCODE IMAPITable_Advise_Scodes[]; -extern SCODE IMAPITable_Unadvise_Scodes[]; -extern SCODE IMAPITable_GetStatus_Scodes[]; -extern SCODE IMAPITable_SetColumns_Scodes[]; -extern SCODE IMAPITable_QueryColumns_Scodes[]; -extern SCODE IMAPITable_GetRowCount_Scodes[]; -extern SCODE IMAPITable_SeekRow_Scodes[]; -extern SCODE IMAPITable_SeekRowApprox_Scodes[]; -extern SCODE IMAPITable_QueryPosition_Scodes[]; -extern SCODE IMAPITable_FindRow_Scodes[]; -extern SCODE IMAPITable_Restrict_Scodes[]; -extern SCODE IMAPITable_CreateBookmark_Scodes[]; -extern SCODE IMAPITable_FreeBookmark_Scodes[]; -extern SCODE IMAPITable_SortTable_Scodes[]; -extern SCODE IMAPITable_QuerySortOrder_Scodes[]; -extern SCODE IMAPITable_QueryRows_Scodes[]; -extern SCODE IMAPITable_Abort_Scodes[]; -extern SCODE IMAPITable_ExpandRow_Scodes[]; -extern SCODE IMAPITable_CollapseRow_Scodes[]; -extern SCODE IMAPITable_WaitForCompletion_Scodes[]; -extern SCODE IMAPITable_GetCollapseState_Scodes[]; -extern SCODE IMAPITable_SetCollapseState_Scodes[]; - -extern SCODE IMAPISession_LogOff_Scodes[]; -extern SCODE IMAPISession_Release_Scodes[]; -extern SCODE IMAPISession_GetLastError_Scodes[]; -extern SCODE IMAPISession_GetMsgStoresTable_Scodes[]; -extern SCODE IMAPISession_GetStatusTable_Scodes[]; -extern SCODE IMAPISession_OpenMsgStore_Scodes[]; -extern SCODE IMAPISession_OpenAddressBook_Scodes[]; -extern SCODE IMAPISession_OpenEntry_Scodes[]; -extern SCODE IMAPISession_OpenProfileSection_Scodes[]; -extern SCODE IMAPISession_Advise_Scodes[]; -extern SCODE IMAPISession_Unadvise_Scodes[]; -extern SCODE IMAPISession_CompareEntryIDs_Scodes[]; -extern SCODE IMAPISession_MessageOptions_Scodes[]; -extern SCODE IMAPISession_QueryDefaultMessageOpt_Scodes[]; -extern SCODE IMAPISession_EnumAdrTypes_Scodes[]; -extern SCODE IMAPISession_QueryIdentity_Scodes[]; -extern SCODE IMAPISession_OpenProfileSection_Scodes[]; -extern SCODE IMAPISession_GetStatusTable_Scodes[]; - -extern SCODE IMsgStore_Advise_Scodes[] ; -extern SCODE IMsgStore_Unadvise_Scodes[] ; -extern SCODE IMsgStore_CompareEntryIDs_Scodes[] ; -extern SCODE IMsgStore_OpenEntry_Scodes[] ; -extern SCODE IMsgStore_SetReceiveFolder_Scodes[]; -extern SCODE IMsgStore_GetReceiveFolder_Scodes[]; -extern SCODE IMsgStore_GetReceiveFolderTable_Scodes[]; -extern SCODE IMsgStore_StoreLogoff_Scodes[]; -extern SCODE IMsgStore_AbortSubmit_Scodes[]; -extern SCODE IMsgStore_GetOutgoingQueue_Scodes[] ; -extern SCODE IMsgStore_SetLockState_Scodes[] ; -extern SCODE IMsgStore_FinishedMsg_Scodes[] ; -extern SCODE IMsgStore_NotifyNewMail_Scodes[]; - -extern SCODE IMAPIFolder_GetContentsTable_Scodes[]; -extern SCODE IMAPIFolder_GetHierarchyTable_Scodes[]; -extern SCODE IMAPIFolder_SaveContentsSort_Scodes[]; -extern SCODE IMAPIFolder_OpenEntry_Scodes[]; -extern SCODE IMAPIFolder_CreateMessage_Scodes[]; -extern SCODE IMAPIFolder_CopyMessages_Scodes[]; -extern SCODE IMAPIFolder_DeleteMessages_Scodes[]; -extern SCODE IMAPIFolder_CreateFolder_Scodes[]; -extern SCODE IMAPIFolder_CopyFolder_Scodes[]; -extern SCODE IMAPIFolder_DeleteFolder_Scodes[]; -extern SCODE IMAPIFolder_SetSearchCriteria_Scodes[]; -extern SCODE IMAPIFolder_GetSearchCriteria_Scodes[]; -extern SCODE IMAPIFolder_SetReadFlags_Scodes[]; -extern SCODE IMAPIFolder_GetMessageStatus_Scodes[]; -extern SCODE IMAPIFolder_SetMessageStatus_Scodes[]; -extern SCODE IMAPIFolder_EmptyFolder_Scodes[]; - -extern SCODE IMessage_SaveChanges_Scodes[]; -extern SCODE IMessage_GetAttachmentTable_Scodes[]; -extern SCODE IMessage_OpenAttach_Scodes[]; -extern SCODE IMessage_CreateAttach_Scodes[]; -extern SCODE IMessage_DeleteAttach_Scodes[]; -extern SCODE IMessage_GetRecipientTable_Scodes[]; -extern SCODE IMessage_ModifyRecipients_Scodes[]; -extern SCODE IMessage_SubmitMessage_Scodes[]; -extern SCODE IMessage_SetReadFlag_Scodes[]; - -extern SCODE IAttach_SaveChanges_Scodes[]; - -extern SCODE IAddrBook_OpenEntry_Scodes[]; -extern SCODE IAddrBook_CompareEntryIDs_Scodes[]; -extern SCODE IAddrBook_CreateOneOff_Scodes[]; -extern SCODE IAddrBook_ResolveName_Scodes[]; -extern SCODE IAddrBook_Address_Scodes[]; -extern SCODE IAddrBook_Details_Scodes[]; -extern SCODE IAddrBook_RecipOptions_Scodes[]; -extern SCODE IAddrBook_QueryDefaultRecipOpt_Scodes[]; -extern SCODE IAddrBook_Address_Scodes[]; -extern SCODE IAddrBook_ButtonPress_Scodes[]; - -extern SCODE IABContainer_GetContentsTable_Scodes[]; -extern SCODE IABContainer_GetHierarchyTable_Scodes[]; - -extern SCODE INotifObj_ChangeEvMask_Scodes[]; - -extern SCODE IMAPIStatus_ChangePassword_Scodes[]; -extern SCODE IMAPIStatus_FlushQueues_Scodes[]; -extern SCODE IMAPIStatus_SettingsDialog_Scodes[]; -extern SCODE IMAPIStatus_ValidateState_Scodes[]; - -extern SCODE IMSProvider_Logon_Scodes[]; -extern SCODE IMSProvider_Deinit_Scodes[]; -extern SCODE IMSProvider_Init_Scodes[]; -extern SCODE IMSProvider_SpoolerLogon_Scodes[]; -extern SCODE IMSProvider_Shutdown_Scodes[]; - -extern SCODE SMAPI_MAPILogon_Scodes[]; -extern SCODE SMAPI_MAPILogoff_Scodes[]; -extern SCODE SMAPI_MAPIFreeBuffer_Scodes[]; -extern SCODE SMAPI_MAPISendMail_Scodes[]; -extern SCODE SMAPI_MAPISendDocuments_Scodes[]; -extern SCODE SMAPI_MAPIFindNext_Scodes[]; -extern SCODE SMAPI_MAPIReadMail_Scodes[]; -extern SCODE SMAPI_MAPISaveMail_Scodes[]; -extern SCODE SMAPI_MAPIDeleteMail_Scodes[]; -extern SCODE SMAPI_MAPIAddress_Scodes[]; -extern SCODE SMAPI_MAPIResolveName_Scodes[]; -extern SCODE SMAPI_MAPIDetails_Scodes[]; - -extern SCODE IMSLogon_OpenEntry_Scodes[]; -extern SCODE IMSLogon_OpenStatusEntry_Scodes[]; -extern SCODE IMSLogon_CompareEntryIDs_Scodes[]; -extern SCODE IMSLogon_Advise_Scodes[]; -extern SCODE IMSLogon_Unadvise_Scodes[]; -extern SCODE IMSLogon_Logoff_Scodes[]; -#endif - -/* ------------------------------------------------------------------------ */ - -#endif - +/* + * M A P I D B G . H + * + * Debugging support for MAPI service providers. + * Support functions are implemented in MAPIDBG.C. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef __MAPIDBG_H_ +#define __MAPIDBG_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#if defined (WIN64) && !defined (_WIN64) +#define _WIN64 +#endif + +/* + * Under Win64 systems Win32 is also defined for backwards compatibility. + */ + +#if defined (WIN32) && !defined (_WIN32) +#define _WIN32 +#endif + +/* + * Debugging Macros ------------------------------------------------------- + * + * IFDBG(x) Results in the expression x if DEBUG is defined, or + * to nothing if DEBUG is not defined + * + * IFNDBG(x) Results in the expression x if DEBUG is not defined, + * or to nothing if DEBUG is defined + * + * Unreferenced(a) Causes a to be referenced so that the compiler + * doesn't issue warnings about unused local variables + * which exist but are reserved for future use (eg + * ulFlags in many cases) + */ + +#if defined(DEBUG) +#define IFDBG(x) x +#define IFNDBG(x) +#else +#define IFDBG(x) +#define IFNDBG(x) x +#endif + +#ifdef __cplusplus +#define EXTERN_C_BEGIN extern "C" { +#define EXTERN_C_END } +#else +#define EXTERN_C_BEGIN +#define EXTERN_C_END +#endif + +#define dimensionof(a) (sizeof(a)/sizeof(*(a))) + +#define Unreferenced(a) ((void)(a)) + +typedef long SCODE; +typedef unsigned long ULONG; +typedef unsigned long DWORD; + +/* + * Assert Macros --------------------------------------------------------- + * + * Assert(a) Displays a message indicating the file and line number + * of this Assert() if a == 0. OK'ing an assert traps + * into the debugger. + * + * AssertSz(a,sz) Works like an Assert(), but displays the string sz + * along with the file and line number. + * + * Side asserts A side assert works like an Assert(), but evaluates + * 'a' even when asserts are not enabled. + * + * NF asserts A NF (Non-Fatal) assert works like an Assert(), but + * continues instead of trapping into the debugger when + * OK'ed. + */ + +#if defined(DEBUG) || defined(ASSERTS_ENABLED) +#define IFTRAP(x) x +#else +#define IFTRAP(x) 0 +#endif + +#define Trap() IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,"Trap")) +#define TrapSz(psz) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz)) +#define TrapSz1(psz,a1) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1)) +#define TrapSz2(psz,a1,a2) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2)) +#define TrapSz3(psz,a1,a2,a3) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3)) +#define TrapSz4(psz,a1,a2,a3,a4) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4)) +#define TrapSz5(psz,a1,a2,a3,a4,a5) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)) +#define TrapSz6(psz,a1,a2,a3,a4,a5,a6) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)) +#define TrapSz7(psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)) +#define TrapSz8(psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)) +#define TrapSz9(psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)) + +#define Assert(t) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,"Assertion Failure: " #t),0)) +#define AssertSz(t,psz) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz),0)) +#define AssertSz1(t,psz,a1) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1),0)) +#define AssertSz2(t,psz,a1,a2) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2),0)) +#define AssertSz3(t,psz,a1,a2,a3) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3),0)) +#define AssertSz4(t,psz,a1,a2,a3,a4) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4),0)) +#define AssertSz5(t,psz,a1,a2,a3,a4,a5) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5),0)) +#define AssertSz6(t,psz,a1,a2,a3,a4,a5,a6) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6),0)) +#define AssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7),0)) +#define AssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8),0)) +#define AssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(((t) ? 0 : DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9),0)) + +#define SideAssert(t) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,"Assertion Failure: " #t)),0) +#define SideAssertSz(t,psz) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz)),0) +#define SideAssertSz1(t,psz,a1) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1)),0) +#define SideAssertSz2(t,psz,a1,a2) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2)),0) +#define SideAssertSz3(t,psz,a1,a2,a3) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3)),0) +#define SideAssertSz4(t,psz,a1,a2,a3,a4) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4)),0) +#define SideAssertSz5(t,psz,a1,a2,a3,a4,a5) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)),0) +#define SideAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)),0) +#define SideAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)),0) +#define SideAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)),0) +#define SideAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) ((t) ? 0 : IFTRAP(DebugTrapFn(1,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)),0) + +#define NFAssert(t) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,"Assertion Failure: " #t),0)) +#define NFAssertSz(t,psz) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz),0)) +#define NFAssertSz1(t,psz,a1) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1),0)) +#define NFAssertSz2(t,psz,a1,a2) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2),0)) +#define NFAssertSz3(t,psz,a1,a2,a3) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3),0)) +#define NFAssertSz4(t,psz,a1,a2,a3,a4) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4),0)) +#define NFAssertSz5(t,psz,a1,a2,a3,a4,a5) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5),0)) +#define NFAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6),0)) +#define NFAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7),0)) +#define NFAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8),0)) +#define NFAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRAP(((t) ? 0 : DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9),0)) + +#define NFSideAssert(t) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,"Assertion Failure: " #t)),0) +#define NFSideAssertSz(t,psz) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz)),0) +#define NFSideAssertSz1(t,psz,a1) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1)),0) +#define NFSideAssertSz2(t,psz,a1,a2) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2)),0) +#define NFSideAssertSz3(t,psz,a1,a2,a3) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3)),0) +#define NFSideAssertSz4(t,psz,a1,a2,a3,a4) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4)),0) +#define NFSideAssertSz5(t,psz,a1,a2,a3,a4,a5) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5)),0) +#define NFSideAssertSz6(t,psz,a1,a2,a3,a4,a5,a6) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6)),0) +#define NFSideAssertSz7(t,psz,a1,a2,a3,a4,a5,a6,a7) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7)),0) +#define NFSideAssertSz8(t,psz,a1,a2,a3,a4,a5,a6,a7,a8) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8)),0) +#define NFSideAssertSz9(t,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) ((t) ? 0 : IFTRAP(DebugTrapFn(0,__FILE__,__LINE__,psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)),0) + +/* + * Trace Macros ------------------------------------------------------------ + * + * DebugTrace Use for arbitrary formatted output. It + * takes exactly the same arguments as the + * Windows wsprintf() function. + * DebugTraceResult Shorthand for error tracing with an + * HRESULT. Arguments are the name of the + * function (not quoted) and the HRESULT. + * DebugTraceSc Shorthand for error tracing with an + * SCODE. Arguments are the name of the + * function (not quoted) and the SCODE. + * DebugTraceArg Shorthand for invalid parameter + * tracing. Arguments are the name of the + * function (not quoted) and a quoted + * string describing the bad parameter. + */ + +#if defined(DEBUG) || defined(TRACES_ENABLED) +#define IFTRACE(x) x +#define DebugTrace DebugTraceFn +#else +#define IFTRACE(x) 0 +#define DebugTrace 1?0:DebugTraceFn +#endif + +#define DebugTraceResult(f,hr) IFTRACE(((hr) ? DebugTraceFn(#f " returns 0x%08lX %s\n", GetScode(hr), SzDecodeScode(GetScode(hr))) : 0)) +#define DebugTraceSc(f,sc) IFTRACE(((sc) ? DebugTraceFn(#f " returns 0x%08lX %s\n", sc, SzDecodeScode(sc)) : 0)) +#define DebugTraceArg(f,s) IFTRACE(DebugTraceFn(#f ": bad parameter: " s "\n")) +#define DebugTraceLine() IFTRACE(DebugTraceFn("File %s, Line %i \n",__FILE__,__LINE__)) +#define DebugTraceProblems(sz, rgprob) IFTRACE(DebugTraceProblemsFn(sz, rgprob)) + +#define TraceSz(psz) IFTRACE(DebugTraceFn("~" psz)) +#define TraceSz1(psz,a1) IFTRACE(DebugTraceFn("~" psz,a1)) +#define TraceSz2(psz,a1,a2) IFTRACE(DebugTraceFn("~" psz,a1,a2)) +#define TraceSz3(psz,a1,a2,a3) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3)) +#define TraceSz4(psz,a1,a2,a3,a4) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4)) +#define TraceSz5(psz,a1,a2,a3,a4,a5) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5)) +#define TraceSz6(psz,a1,a2,a3,a4,a5,a6) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6)) +#define TraceSz7(psz,a1,a2,a3,a4,a5,a6,a7) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7)) +#define TraceSz8(psz,a1,a2,a3,a4,a5,a6,a7,a8) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7,a8)) +#define TraceSz9(psz,a1,a2,a3,a4,a5,a6,a7,a8,a9) IFTRACE(DebugTraceFn("~" psz,a1,a2,a3,a4,a5,a6,a7,a8,a9)) + +/* Debugging Functions ---------------------------------------------------- */ + +EXTERN_C_BEGIN + +#if defined(_WIN64) || defined (_WIN32) || defined (_M_ARM) +#define EXPORTDBG +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif + +int EXPORTDBG __cdecl DebugTrapFn(int fFatal, char *pszFile, int iLine, char *pszFormat, ...); +int EXPORTDBG __cdecl DebugTraceFn(char *pszFormat, ...); +void EXPORTDBG __cdecl DebugTraceProblemsFn(char *sz, void *rgprob); +char * EXPORTDBG __cdecl SzDecodeScodeFn(SCODE sc); +char * EXPORTDBG __cdecl SzDecodeUlPropTypeFn(unsigned long ulPropType); +char * EXPORTDBG __cdecl SzDecodeUlPropTagFn(unsigned long ulPropTag); +unsigned long EXPORTDBG __cdecl UlPropTagFromSzFn(char *psz); +SCODE EXPORTDBG __cdecl ScodeFromSzFn(char *psz); +void * EXPORTDBG __cdecl DBGMEM_EncapsulateFn(void * pmalloc, char *pszSubsys, int fCheckOften); +void EXPORTDBG __cdecl DBGMEM_ShutdownFn(void * pmalloc); +void EXPORTDBG __cdecl DBGMEM_CheckMemFn(void * pmalloc, int fReportOrphans); +#if defined(_WIN64) || defined(_WIN32) || defined (_M_ARM) +void EXPORTDBG __cdecl DBGMEM_LeakHook(FARPROC pfn); +void EXPORTDBG __cdecl GetCallStack(DWORD_PTR *, int, int); +#endif +void EXPORTDBG __cdecl DBGMEM_NoLeakDetectFn(void * pmalloc, void *pv); +void EXPORTDBG __cdecl DBGMEM_SetFailureAtFn(void * pmalloc, ULONG ulFailureAt); +SCODE EXPORTDBG __cdecl ScCheckScFn(SCODE, SCODE *, char *, char *, int); +void * EXPORTDBG __cdecl VMAlloc(ULONG); +void * EXPORTDBG __cdecl VMAllocEx(ULONG, ULONG); +void * EXPORTDBG __cdecl VMRealloc(void *, ULONG); +void * EXPORTDBG __cdecl VMReallocEx(void *, ULONG, ULONG); +ULONG EXPORTDBG __cdecl VMGetSize(void *); +ULONG EXPORTDBG __cdecl VMGetSizeEx(void *, ULONG); +void EXPORTDBG __cdecl VMFree(void *); +void EXPORTDBG __cdecl VMFreeEx(void *, ULONG); + +EXTERN_C_END + +/* + * Debugging Macros ------------------------------------------------------- + * + * SzDecodeScode Returns the string name of an SCODE + * SzDecodeUlPropTag Returns the string name of a property + * tag + * UlPropTagFromSz Given a property tag's name, returns + * its value + * ScodeFromSz Given an SCODE's name, returns its + * value + * + * DBGMEM_Encapsulate Given an IMalloc interface, adds heap- + * checking functionality and returns a + * wrapped interface + * DBGMEM_Shutdown Undoes DBGMEM_Encapsulate, and prints + * out information on any allocations made + * since the interface was encapsulated + * that have not yet been released. + * DBGMEM_CheckMem Checks all memory allocated on the heap, + * and optionally reports leaked blocks. + * DBGMEM_NoLeakDetect Prevents a block from appearing on the leak + * report. Pass NULL for pv to inhibit leak + * reports at all from this heap. + */ + +#ifdef DEBUG + +#define SzDecodeScode(_sc) SzDecodeScodeFn(_sc) +#define SzDecodeUlPropType(_ulPropType) SzDecodeUlPropTypeFn(_ulPropType) +#define SzDecodeUlPropTag(_ulPropTag) SzDecodeUlPropTagFn(_ulPropTag) +#define UlPropTagFromSz(_sz) UlPropTagFromSzFn(_sz) +#define ScodeFromSz(_sz) ScodeFromSzFn(_sz) +#define DBGMEM_Encapsulate(pm, psz, f) DBGMEM_EncapsulateFn(pm, psz, f) +#define DBGMEM_Shutdown(pm) DBGMEM_ShutdownFn(pm) +#define DBGMEM_CheckMem(pm, f) DBGMEM_CheckMemFn(pm, f) +#define DBGMEM_NoLeakDetect(pm, pv) DBGMEM_NoLeakDetectFn(pm, pv) +#define DBGMEM_SetFailureAt(pm, ul) DBGMEM_SetFailureAtFn(pm, ul) + +#else + +#define SzDecodeScode(_sc) ("") +#define SzDecodeUlPropType(_ulPropType) ("") +#define SzDecodeUlPropTag(_ulPropTag) ("") +#define UlPropTagFromSz(_sz) (0) +#define ScodeFromSz(_sz) (0) + +#if defined(__cplusplus) && !defined(CINTERFACE) +#define DBGMEM_Encapsulate(pmalloc, pszSubsys, fCheckOften) \ + ((pmalloc)->AddRef(), (pmalloc)) +#define DBGMEM_Shutdown(pmalloc) \ + ((pmalloc)->Release()) +#else +#define DBGMEM_Encapsulate(pmalloc, pszSubsys, fCheckOften) \ + ((pmalloc)->lpVtbl->AddRef(pmalloc), (pmalloc)) +#define DBGMEM_Shutdown(pmalloc) \ + ((pmalloc)->lpVtbl->Release(pmalloc)) +#endif + +#define DBGMEM_CheckMem(pm, f) +#define DBGMEM_NoLeakDetect(pm, pv) +#define DBGMEM_SetFailureAt(pm, ul) + +#endif + +/* + * SCODE maps ------------------------------------------------------------- + * + * ScCheckSc Given an SCODE and method name, verifies + * that the SCODE can legally be returned from + * thet method. Prints out a debug string if + * it cannot. + * HrCheckHr As ScCheckSc, for functions that return + * HRESULT. + */ + +#if defined(DEBUG) && !defined(DOS) +#define ScCheckSc(sc,fn) ScCheckScFn(sc,fn##_Scodes,#fn,__FILE__, __LINE__) +#define HrCheckHr(hr,fn) HrCheckSc(GetScode(hr),fn) +#else +#define ScCheckSc(sc,fn) (sc) +#define HrCheckHr(hr,fn) (hr) +#endif + +#define HrCheckSc(sc,fn) ResultFromScode(ScCheckSc(sc,fn)) + +#if defined(DEBUG) && !defined(DOS) +extern SCODE Common_Scodes[]; +extern SCODE MAPILogon_Scodes[]; +extern SCODE MAPIAllocateBuffer_Scodes[]; +extern SCODE MAPIAllocateMore_Scodes[]; +extern SCODE MAPIFreeBuffer_Scodes[]; + +extern SCODE IUnknown_QueryInterface_Scodes[]; +extern SCODE IUnknown_AddRef_Scodes[]; +extern SCODE IUnknown_Release_Scodes[]; +extern SCODE IUnknown_GetLastError_Scodes[]; + +extern SCODE IMAPIProp_CopyTo_Scodes[]; +extern SCODE IMAPIProp_CopyProps_Scodes[]; +extern SCODE IMAPIProp_DeleteProps_Scodes[]; +extern SCODE IMAPIProp_GetIDsFromNames_Scodes[]; +extern SCODE IMAPIProp_GetLastError_Scodes[]; +extern SCODE IMAPIProp_GetNamesFromIDs_Scodes[]; +extern SCODE IMAPIProp_GetPropList_Scodes[]; +extern SCODE IMAPIProp_GetProps_Scodes[]; +extern SCODE IMAPIProp_OpenProperty_Scodes[]; +extern SCODE IMAPIProp_SetProps_Scodes[]; +extern SCODE IMAPIProp_SaveChanges_Scodes[]; + +extern SCODE IStream_Read_Scodes[]; +extern SCODE IStream_Write_Scodes[]; +extern SCODE IStream_Seek_Scodes[]; +extern SCODE IStream_SetSize_Scodes[]; +extern SCODE IStream_Tell_Scodes[]; +extern SCODE IStream_LockRegion_Scodes[]; +extern SCODE IStream_UnlockRegion_Scodes[]; +extern SCODE IStream_Clone_Scodes[]; +extern SCODE IStream_CopyTo_Scodes[]; +extern SCODE IStream_Revert_Scodes[]; +extern SCODE IStream_Stat_Scodes[]; +extern SCODE IStream_Commit_Scodes[]; + +extern SCODE IMAPITable_GetLastError_Scodes[]; +extern SCODE IMAPITable_Advise_Scodes[]; +extern SCODE IMAPITable_Unadvise_Scodes[]; +extern SCODE IMAPITable_GetStatus_Scodes[]; +extern SCODE IMAPITable_SetColumns_Scodes[]; +extern SCODE IMAPITable_QueryColumns_Scodes[]; +extern SCODE IMAPITable_GetRowCount_Scodes[]; +extern SCODE IMAPITable_SeekRow_Scodes[]; +extern SCODE IMAPITable_SeekRowApprox_Scodes[]; +extern SCODE IMAPITable_QueryPosition_Scodes[]; +extern SCODE IMAPITable_FindRow_Scodes[]; +extern SCODE IMAPITable_Restrict_Scodes[]; +extern SCODE IMAPITable_CreateBookmark_Scodes[]; +extern SCODE IMAPITable_FreeBookmark_Scodes[]; +extern SCODE IMAPITable_SortTable_Scodes[]; +extern SCODE IMAPITable_QuerySortOrder_Scodes[]; +extern SCODE IMAPITable_QueryRows_Scodes[]; +extern SCODE IMAPITable_Abort_Scodes[]; +extern SCODE IMAPITable_ExpandRow_Scodes[]; +extern SCODE IMAPITable_CollapseRow_Scodes[]; +extern SCODE IMAPITable_WaitForCompletion_Scodes[]; +extern SCODE IMAPITable_GetCollapseState_Scodes[]; +extern SCODE IMAPITable_SetCollapseState_Scodes[]; + +extern SCODE IMAPISession_LogOff_Scodes[]; +extern SCODE IMAPISession_Release_Scodes[]; +extern SCODE IMAPISession_GetLastError_Scodes[]; +extern SCODE IMAPISession_GetMsgStoresTable_Scodes[]; +extern SCODE IMAPISession_GetStatusTable_Scodes[]; +extern SCODE IMAPISession_OpenMsgStore_Scodes[]; +extern SCODE IMAPISession_OpenAddressBook_Scodes[]; +extern SCODE IMAPISession_OpenEntry_Scodes[]; +extern SCODE IMAPISession_OpenProfileSection_Scodes[]; +extern SCODE IMAPISession_Advise_Scodes[]; +extern SCODE IMAPISession_Unadvise_Scodes[]; +extern SCODE IMAPISession_CompareEntryIDs_Scodes[]; +extern SCODE IMAPISession_MessageOptions_Scodes[]; +extern SCODE IMAPISession_QueryDefaultMessageOpt_Scodes[]; +extern SCODE IMAPISession_EnumAdrTypes_Scodes[]; +extern SCODE IMAPISession_QueryIdentity_Scodes[]; +extern SCODE IMAPISession_OpenProfileSection_Scodes[]; +extern SCODE IMAPISession_GetStatusTable_Scodes[]; + +extern SCODE IMsgStore_Advise_Scodes[] ; +extern SCODE IMsgStore_Unadvise_Scodes[] ; +extern SCODE IMsgStore_CompareEntryIDs_Scodes[] ; +extern SCODE IMsgStore_OpenEntry_Scodes[] ; +extern SCODE IMsgStore_SetReceiveFolder_Scodes[]; +extern SCODE IMsgStore_GetReceiveFolder_Scodes[]; +extern SCODE IMsgStore_GetReceiveFolderTable_Scodes[]; +extern SCODE IMsgStore_StoreLogoff_Scodes[]; +extern SCODE IMsgStore_AbortSubmit_Scodes[]; +extern SCODE IMsgStore_GetOutgoingQueue_Scodes[] ; +extern SCODE IMsgStore_SetLockState_Scodes[] ; +extern SCODE IMsgStore_FinishedMsg_Scodes[] ; +extern SCODE IMsgStore_NotifyNewMail_Scodes[]; + +extern SCODE IMAPIFolder_GetContentsTable_Scodes[]; +extern SCODE IMAPIFolder_GetHierarchyTable_Scodes[]; +extern SCODE IMAPIFolder_SaveContentsSort_Scodes[]; +extern SCODE IMAPIFolder_OpenEntry_Scodes[]; +extern SCODE IMAPIFolder_CreateMessage_Scodes[]; +extern SCODE IMAPIFolder_CopyMessages_Scodes[]; +extern SCODE IMAPIFolder_DeleteMessages_Scodes[]; +extern SCODE IMAPIFolder_CreateFolder_Scodes[]; +extern SCODE IMAPIFolder_CopyFolder_Scodes[]; +extern SCODE IMAPIFolder_DeleteFolder_Scodes[]; +extern SCODE IMAPIFolder_SetSearchCriteria_Scodes[]; +extern SCODE IMAPIFolder_GetSearchCriteria_Scodes[]; +extern SCODE IMAPIFolder_SetReadFlags_Scodes[]; +extern SCODE IMAPIFolder_GetMessageStatus_Scodes[]; +extern SCODE IMAPIFolder_SetMessageStatus_Scodes[]; +extern SCODE IMAPIFolder_EmptyFolder_Scodes[]; + +extern SCODE IMessage_SaveChanges_Scodes[]; +extern SCODE IMessage_GetAttachmentTable_Scodes[]; +extern SCODE IMessage_OpenAttach_Scodes[]; +extern SCODE IMessage_CreateAttach_Scodes[]; +extern SCODE IMessage_DeleteAttach_Scodes[]; +extern SCODE IMessage_GetRecipientTable_Scodes[]; +extern SCODE IMessage_ModifyRecipients_Scodes[]; +extern SCODE IMessage_SubmitMessage_Scodes[]; +extern SCODE IMessage_SetReadFlag_Scodes[]; + +extern SCODE IAttach_SaveChanges_Scodes[]; + +extern SCODE IAddrBook_OpenEntry_Scodes[]; +extern SCODE IAddrBook_CompareEntryIDs_Scodes[]; +extern SCODE IAddrBook_CreateOneOff_Scodes[]; +extern SCODE IAddrBook_ResolveName_Scodes[]; +extern SCODE IAddrBook_Address_Scodes[]; +extern SCODE IAddrBook_Details_Scodes[]; +extern SCODE IAddrBook_RecipOptions_Scodes[]; +extern SCODE IAddrBook_QueryDefaultRecipOpt_Scodes[]; +extern SCODE IAddrBook_Address_Scodes[]; +extern SCODE IAddrBook_ButtonPress_Scodes[]; + +extern SCODE IABContainer_GetContentsTable_Scodes[]; +extern SCODE IABContainer_GetHierarchyTable_Scodes[]; + +extern SCODE INotifObj_ChangeEvMask_Scodes[]; + +extern SCODE IMAPIStatus_ChangePassword_Scodes[]; +extern SCODE IMAPIStatus_FlushQueues_Scodes[]; +extern SCODE IMAPIStatus_SettingsDialog_Scodes[]; +extern SCODE IMAPIStatus_ValidateState_Scodes[]; + +extern SCODE IMSProvider_Logon_Scodes[]; +extern SCODE IMSProvider_Deinit_Scodes[]; +extern SCODE IMSProvider_Init_Scodes[]; +extern SCODE IMSProvider_SpoolerLogon_Scodes[]; +extern SCODE IMSProvider_Shutdown_Scodes[]; + +extern SCODE SMAPI_MAPILogon_Scodes[]; +extern SCODE SMAPI_MAPILogoff_Scodes[]; +extern SCODE SMAPI_MAPIFreeBuffer_Scodes[]; +extern SCODE SMAPI_MAPISendMail_Scodes[]; +extern SCODE SMAPI_MAPISendDocuments_Scodes[]; +extern SCODE SMAPI_MAPIFindNext_Scodes[]; +extern SCODE SMAPI_MAPIReadMail_Scodes[]; +extern SCODE SMAPI_MAPISaveMail_Scodes[]; +extern SCODE SMAPI_MAPIDeleteMail_Scodes[]; +extern SCODE SMAPI_MAPIAddress_Scodes[]; +extern SCODE SMAPI_MAPIResolveName_Scodes[]; +extern SCODE SMAPI_MAPIDetails_Scodes[]; + +extern SCODE IMSLogon_OpenEntry_Scodes[]; +extern SCODE IMSLogon_OpenStatusEntry_Scodes[]; +extern SCODE IMSLogon_CompareEntryIDs_Scodes[]; +extern SCODE IMSLogon_Advise_Scodes[]; +extern SCODE IMSLogon_Unadvise_Scodes[]; +extern SCODE IMSLogon_Logoff_Scodes[]; +#endif + +/* ------------------------------------------------------------------------ */ + +#endif + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIDefS.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIDefS.h similarity index 92% rename from com/win32comext/mapi/src/mapi_headers/MAPIDefS.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIDefS.h index 159935bab..9e83e2da4 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIDefS.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIDefS.h @@ -1,2732 +1,2855 @@ -/* - * M A P I D E F S . H - * - * Definitions used by MAPI clients and service providers. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef MAPIDEFS_H -#define MAPIDEFS_H - -#if _MSC_VER > 1000 -#pragma once -#endif - -#if defined (WIN64) && !defined (_WIN64) -#define _WIN64 -#endif - -/* - * Under Win64 systems Win32 is also defined for backwards compatibility. - */ - -#if defined (WIN32) && !defined (_WIN32) -#define _WIN32 -#endif - -#if defined (_WIN64) || defined(_WIN32) /* Must include WINDOWS.H on Win32/Win64 */ -#ifndef _WINDOWS_ -#define INC_OLE2 /* Get the OLE2 stuff */ -#define INC_RPC /* harmless on Windows NT; Windows 95 needs it */ -#define _INC_OLE /* Windows 95 will include OLE1 without this */ -#include -#endif - -#ifndef _OLEERROR_H_ -#include -#endif -#ifndef _OBJBASE_H_ -#include -#endif -#endif - -#if defined (DOS) -#ifndef _COMPOBJ_H_ -#include -#endif -#endif - -#ifndef _INC_STDDEF -#include -#endif - -/* Array dimension for structures with variable-sized arrays at the end. */ - -#ifndef MAPI_DIM -#define MAPI_DIM 1 -#endif - -/* Provider init type. Force to cdecl always */ - -#ifndef STDMAPIINITCALLTYPE -#if !defined (_MAC) && (defined (_WIN64) || defined(_WIN32)) -#define STDMAPIINITCALLTYPE __cdecl -#else -#define STDMAPIINITCALLTYPE STDMETHODCALLTYPE -#endif -#define STDINITMETHODIMP HRESULT STDMAPIINITCALLTYPE -#define STDINITMETHODIMP_(type) type STDMAPIINITCALLTYPE -#endif - - -#define MAPI_NT_SERVICE ((ULONG) 0x00010000) /* Provider is being loaded in an NT service */ - - -#ifdef __cplusplus -extern "C" { -#endif - -/* Simple data types */ - -#if !defined (MIDL_PASS) /* MIDL doesn't want to see these */ - -#ifndef _MAC -typedef wchar_t WCHAR; // wc, 16-bit UNICODE character -#else -// some Macintosh compilers don't define wchar_t in a convenient location, or define it as a char -typedef unsigned short WCHAR; // wc, 16-bit UNICODE character -#endif - -#ifdef UNICODE -typedef WCHAR TCHAR; -#else -typedef char TCHAR; -#endif - -typedef WCHAR FAR * LPWSTR; -typedef const WCHAR FAR * LPCWSTR; -typedef TCHAR FAR * LPTSTR; -typedef const TCHAR FAR * LPCTSTR; -typedef BYTE FAR * LPBYTE; -#endif /* defined MIDL_PASS */ - -typedef ULONG FAR * LPULONG; - -#ifndef __LHANDLE -#define __LHANDLE -typedef ULONG_PTR LHANDLE, FAR * LPLHANDLE; -#endif - -#if !defined(_WINBASE_) && !defined(_FILETIME_) -#define _FILETIME_ -typedef struct _FILETIME -{ - DWORD dwLowDateTime; - DWORD dwHighDateTime; -} FILETIME, FAR * LPFILETIME; -#endif - -#ifndef BEGIN_INTERFACE -#define BEGIN_INTERFACE -#endif - -/* - * This flag is used in many different MAPI calls to signify that - * the object opened by the call should be modifiable (MAPI_MODIFY). - * If the flag MAPI_MAX_ACCESS is set, the object returned should be - * returned at the maximum access level allowed. An additional - * property available on the object (PR_ACCESS_LEVEL) uses the same - * MAPI_MODIFY flag to say just what this new access level is. - */ - -#define MAPI_MODIFY ((ULONG) 0x00000001) - -/* - * The following flags are used to indicate to the client what access - * level is permissible in the object. They appear in PR_ACCESS in - * message and folder objects as well as in contents and associated - * contents tables - */ - -#define MAPI_ACCESS_MODIFY ((ULONG) 0x00000001) -#define MAPI_ACCESS_READ ((ULONG) 0x00000002) -#define MAPI_ACCESS_DELETE ((ULONG) 0x00000004) -#define MAPI_ACCESS_CREATE_HIERARCHY ((ULONG) 0x00000008) -#define MAPI_ACCESS_CREATE_CONTENTS ((ULONG) 0x00000010) -#define MAPI_ACCESS_CREATE_ASSOCIATED ((ULONG) 0x00000020) - -/* - * The MAPI_UNICODE flag is used in many different MAPI calls to signify - * that strings passed through the interface are in Unicode (a 16-bit - * character set). The default is an 8-bit character set. - * - * The value fMapiUnicode can be used as the 'normal' value for - * that bit, given the application's default character set. - */ - -#define MAPI_UNICODE ((ULONG) 0x80000000) - -#ifdef UNICODE -#define fMapiUnicode MAPI_UNICODE -#else -#define fMapiUnicode 0 -#endif - -/* successful HRESULT */ -#define hrSuccess 0 - - - -/* Recipient types */ -#ifndef MAPI_ORIG /* also defined in mapi.h */ -#define MAPI_ORIG 0 /* Recipient is message originator */ -#define MAPI_TO 1 /* Recipient is a primary recipient */ -#define MAPI_CC 2 /* Recipient is a copy recipient */ -#define MAPI_BCC 3 /* Recipient is blind copy recipient */ -#define MAPI_P1 0x10000000 /* Recipient is a P1 resend recipient */ -#define MAPI_SUBMITTED 0x80000000 /* Recipient is already processed */ -/* #define MAPI_AUTHORIZE 4 recipient is a CMC authorizing user */ -/*#define MAPI_DISCRETE 0x10000000 Recipient is a P1 resend recipient */ -#endif - -/* Bit definitions for abFlags[0] of ENTRYID */ -#define MAPI_SHORTTERM 0x80 -#define MAPI_NOTRECIP 0x40 -#define MAPI_THISSESSION 0x20 -#define MAPI_NOW 0x10 -#define MAPI_NOTRESERVED 0x08 - -/* Bit definitions for abFlags[1] of ENTRYID */ -#define MAPI_COMPOUND 0x80 - -/* ENTRYID */ -typedef struct -{ - BYTE abFlags[4]; - BYTE ab[MAPI_DIM]; -} ENTRYID, FAR *LPENTRYID; - -#define CbNewENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb)) -#define CbENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb)) -#define SizedENTRYID(_cb, _name) \ - struct _ENTRYID_ ## _name \ -{ \ - BYTE abFlags[4]; \ - BYTE ab[_cb]; \ -} _name - -/* Byte-order-independent version of GUID (world-unique identifier) */ -typedef struct _MAPIUID -{ - BYTE ab[16]; -} MAPIUID, FAR * LPMAPIUID; - -/* Note: need to include C run-times (memory.h) to use this macro */ - -#define IsEqualMAPIUID(lpuid1, lpuid2) (!memcmp(lpuid1, lpuid2, sizeof(MAPIUID))) - -/* - * Constants for one-off entry ID: - * The MAPIUID that identifies the one-off provider; - * the flag that defines whether the embedded strings are Unicode; - * the flag that specifies whether the recipient gets TNEF or not. - */ - -#define MAPI_ONE_OFF_UID { 0x81, 0x2b, 0x1f, 0xa4, 0xbe, 0xa3, 0x10, 0x19, \ - 0x9d, 0x6e, 0x00, 0xdd, 0x01, 0x0f, 0x54, 0x02 } -#define MAPI_ONE_OFF_UNICODE 0x8000 -#define MAPI_ONE_OFF_NO_RICH_INFO 0x0001 - -/* Object type */ - -#define MAPI_STORE ((ULONG) 0x00000001) /* Message Store */ -#define MAPI_ADDRBOOK ((ULONG) 0x00000002) /* Address Book */ -#define MAPI_FOLDER ((ULONG) 0x00000003) /* Folder */ -#define MAPI_ABCONT ((ULONG) 0x00000004) /* Address Book Container */ -#define MAPI_MESSAGE ((ULONG) 0x00000005) /* Message */ -#define MAPI_MAILUSER ((ULONG) 0x00000006) /* Individual Recipient */ -#define MAPI_ATTACH ((ULONG) 0x00000007) /* Attachment */ -#define MAPI_DISTLIST ((ULONG) 0x00000008) /* Distribution List Recipient */ -#define MAPI_PROFSECT ((ULONG) 0x00000009) /* Profile Section */ -#define MAPI_STATUS ((ULONG) 0x0000000A) /* Status Object */ -#define MAPI_SESSION ((ULONG) 0x0000000B) /* Session */ -#define MAPI_FORMINFO ((ULONG) 0x0000000C) /* Form Information */ - - -/* - * Maximum length of profile names and passwords, not including - * the null termination character. - */ -#ifndef cchProfileNameMax -#define cchProfileNameMax 64 -#define cchProfilePassMax 64 -#endif - - -/* Property Types */ - -#define MV_FLAG 0x1000 /* Multi-value flag */ - -#define PT_UNSPECIFIED ((ULONG) 0) /* (Reserved for interface use) type doesn't matter to caller */ -#define PT_NULL ((ULONG) 1) /* NULL property value */ -#define PT_I2 ((ULONG) 2) /* Signed 16-bit value */ -#define PT_LONG ((ULONG) 3) /* Signed 32-bit value */ -#define PT_R4 ((ULONG) 4) /* 4-byte floating point */ -#define PT_DOUBLE ((ULONG) 5) /* Floating point double */ -#define PT_CURRENCY ((ULONG) 6) /* Signed 64-bit int (decimal w/ 4 digits right of decimal pt) */ -#define PT_APPTIME ((ULONG) 7) /* Application time */ -#define PT_ERROR ((ULONG) 10) /* 32-bit error value */ -#define PT_BOOLEAN ((ULONG) 11) /* 16-bit boolean (non-zero true) */ -#define PT_OBJECT ((ULONG) 13) /* Embedded object in a property */ -#define PT_I8 ((ULONG) 20) /* 8-byte signed integer */ -#define PT_STRING8 ((ULONG) 30) /* Null terminated 8-bit character string */ -#define PT_UNICODE ((ULONG) 31) /* Null terminated Unicode string */ -#define PT_SYSTIME ((ULONG) 64) /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */ -#define PT_CLSID ((ULONG) 72) /* OLE GUID */ -#define PT_BINARY ((ULONG) 258) /* Uninterpreted (counted byte array) */ -#define PT_PTR ((ULONG) 259) /* Pointer Variable, scales to the platform */ -/* Changes are likely to these numbers, and to their structures. */ - -/* Alternate property type names for ease of use */ -#define PT_SHORT PT_I2 -#define PT_I4 PT_LONG -#define PT_FLOAT PT_R4 -#define PT_R8 PT_DOUBLE -#define PT_LONGLONG PT_I8 - -/* - * The type of a MAPI-defined string property is indirected, so - * that it defaults to Unicode string on a Unicode platform and to - * String8 on an ANSI or DBCS platform. - * - * Macros are defined here both for the property type, and for the - * field of the property value structure which should be - * dereferenced to obtain the string pointer. - */ - -#ifdef UNICODE -#define PT_TSTRING PT_UNICODE -#define PT_MV_TSTRING (MV_FLAG|PT_UNICODE) -#define LPSZ lpszW -#define LPPSZ lppszW -#define MVSZ MVszW -#else -#define PT_TSTRING PT_STRING8 -#define PT_MV_TSTRING (MV_FLAG|PT_STRING8) -#define LPSZ lpszA -#define LPPSZ lppszA -#define MVSZ MVszA -#endif - - -/* Property Tags - * - * By convention, MAPI never uses 0 or FFFF as a property ID. - * Use as null values, initializers, sentinels, or what have you. - */ - -#define PROP_TYPE_MASK ((ULONG)0x0000FFFF) /* Mask for Property type */ -#define PROP_TYPE(ulPropTag) (((ULONG)(ulPropTag))&PROP_TYPE_MASK) -#define PROP_ID(ulPropTag) (((ULONG)(ulPropTag))>>16) -#define PROP_TAG(ulPropType,ulPropID) ((((ULONG)(ulPropID))<<16)|((ULONG)(ulPropType))) -#define PROP_ID_NULL 0 -#define PROP_ID_INVALID 0xFFFF -#define PR_NULL PROP_TAG( PT_NULL, PROP_ID_NULL) -#define CHANGE_PROP_TYPE(ulPropTag, ulPropType) \ - (((ULONG)0xFFFF0000 & (ulPropTag)) | (ulPropType)) - - -/* Multi-valued Property Types */ - -#define PT_MV_I2 (MV_FLAG|PT_I2) -#define PT_MV_LONG (MV_FLAG|PT_LONG) -#define PT_MV_R4 (MV_FLAG|PT_R4) -#define PT_MV_DOUBLE (MV_FLAG|PT_DOUBLE) -#define PT_MV_CURRENCY (MV_FLAG|PT_CURRENCY) -#define PT_MV_APPTIME (MV_FLAG|PT_APPTIME) -#define PT_MV_SYSTIME (MV_FLAG|PT_SYSTIME) -#define PT_MV_STRING8 (MV_FLAG|PT_STRING8) -#define PT_MV_BINARY (MV_FLAG|PT_BINARY) -#define PT_MV_UNICODE (MV_FLAG|PT_UNICODE) -#define PT_MV_CLSID (MV_FLAG|PT_CLSID) -#define PT_MV_I8 (MV_FLAG|PT_I8) - -/* Alternate property type names for ease of use */ -#define PT_MV_SHORT PT_MV_I2 -#define PT_MV_I4 PT_MV_LONG -#define PT_MV_FLOAT PT_MV_R4 -#define PT_MV_R8 PT_MV_DOUBLE -#define PT_MV_LONGLONG PT_MV_I8 - -/* - * Property type reserved bits - * - * MV_INSTANCE is used as a flag in table operations to request - * that a multi-valued property be presented as a single-valued - * property appearing in multiple rows. - */ - -#define MV_INSTANCE 0x2000 -#define MVI_FLAG (MV_FLAG | MV_INSTANCE) -#define MVI_PROP(tag) ((tag) | MVI_FLAG) - -/* --------------- */ -/* Data Structures */ -/* --------------- */ - -/* Property Tag Array */ - -typedef struct _SPropTagArray -{ - ULONG cValues; - ULONG aulPropTag[MAPI_DIM]; -} SPropTagArray, FAR * LPSPropTagArray; - -#define CbNewSPropTagArray(_ctag) \ - (offsetof(SPropTagArray,aulPropTag) + (_ctag)*sizeof(ULONG)) -#define CbSPropTagArray(_lparray) \ - (offsetof(SPropTagArray,aulPropTag) + \ - (UINT)((_lparray)->cValues)*sizeof(ULONG)) -/* SPropTagArray */ -#define SizedSPropTagArray(_ctag, _name) \ -struct _SPropTagArray_ ## _name \ -{ \ - ULONG cValues; \ - ULONG aulPropTag[_ctag]; \ -} _name - -/* -------------- */ -/* Property Value */ -/* -------------- */ - -typedef struct _SPropValue SPropValue; - - -/* 32-bit CURRENCY definition stolen from oaidl.h */ -/* 16-bit CURRENCY definition stolen from variant.h */ - -#ifndef _tagCY_DEFINED -#define _tagCY_DEFINED -#define _CY_DEFINED -#if defined (DOS) && !defined (_VARIANT_H_) -typedef struct FARSTRUCT tagCY { -#ifdef _MAC - long Hi; - long Lo; -#else - unsigned long Lo; - long Hi; -#endif -} CY; -#elif defined (_WIN64) || defined(_WIN32) -/* real definition that makes the C++ compiler happy */ -typedef union tagCY { - struct { -#ifdef _MAC - long Hi; - long Lo; -#else - unsigned long Lo; - long Hi; -#endif - }; - LONGLONG int64; -} CY; -#endif -#endif - /* size is 8 */ -typedef CY CURRENCY; - -typedef struct _SBinary -{ - ULONG cb; - LPBYTE lpb; -} SBinary, FAR *LPSBinary; - -typedef struct _SShortArray -{ - ULONG cValues; - short int FAR *lpi; -} SShortArray; - -typedef struct _SGuidArray -{ - ULONG cValues; - GUID FAR *lpguid; -} SGuidArray; - -typedef struct _SRealArray -{ - ULONG cValues; - float FAR *lpflt; -} SRealArray; - -typedef struct _SLongArray -{ - ULONG cValues; - LONG FAR *lpl; -} SLongArray; - -typedef struct _SLargeIntegerArray -{ - ULONG cValues; - LARGE_INTEGER FAR *lpli; -} SLargeIntegerArray; - -typedef struct _SDateTimeArray -{ - ULONG cValues; - FILETIME FAR *lpft; -} SDateTimeArray; - -typedef struct _SAppTimeArray -{ - ULONG cValues; - double FAR *lpat; -} SAppTimeArray; - -typedef struct _SCurrencyArray -{ - ULONG cValues; - CURRENCY FAR *lpcur; -} SCurrencyArray; - -typedef struct _SBinaryArray -{ - ULONG cValues; - SBinary FAR *lpbin; -} SBinaryArray; - -typedef struct _SDoubleArray -{ - ULONG cValues; - double FAR *lpdbl; -} SDoubleArray; - -typedef struct _SWStringArray -{ - ULONG cValues; - LPWSTR FAR *lppszW; -} SWStringArray; - -typedef struct _SLPSTRArray -{ - ULONG cValues; - LPSTR FAR *lppszA; -} SLPSTRArray; - -typedef union _PV -{ - short int i; /* case PT_I2 */ - LONG l; /* case PT_LONG */ - ULONG ul; /* alias for PT_LONG */ - LPVOID lpv; /* alias for PT_PTR */ - float flt; /* case PT_R4 */ - double dbl; /* case PT_DOUBLE */ - unsigned short int b; /* case PT_BOOLEAN */ - CURRENCY cur; /* case PT_CURRENCY */ - double at; /* case PT_APPTIME */ - FILETIME ft; /* case PT_SYSTIME */ - LPSTR lpszA; /* case PT_STRING8 */ - SBinary bin; /* case PT_BINARY */ - LPWSTR lpszW; /* case PT_UNICODE */ - LPGUID lpguid; /* case PT_CLSID */ - LARGE_INTEGER li; /* case PT_I8 */ - SShortArray MVi; /* case PT_MV_I2 */ - SLongArray MVl; /* case PT_MV_LONG */ - SRealArray MVflt; /* case PT_MV_R4 */ - SDoubleArray MVdbl; /* case PT_MV_DOUBLE */ - SCurrencyArray MVcur; /* case PT_MV_CURRENCY */ - SAppTimeArray MVat; /* case PT_MV_APPTIME */ - SDateTimeArray MVft; /* case PT_MV_SYSTIME */ - SBinaryArray MVbin; /* case PT_MV_BINARY */ - SLPSTRArray MVszA; /* case PT_MV_STRING8 */ - SWStringArray MVszW; /* case PT_MV_UNICODE */ - SGuidArray MVguid; /* case PT_MV_CLSID */ - SLargeIntegerArray MVli; /* case PT_MV_I8 */ - SCODE err; /* case PT_ERROR */ - LONG x; /* case PT_NULL, PT_OBJECT (no usable value) */ -} __UPV; - -typedef struct _SPropValue -{ - ULONG ulPropTag; - ULONG dwAlignPad; - union _PV Value; -} SPropValue, FAR * LPSPropValue; - - -/* --------------------------------------------- */ -/* Property Problem and Property Problem Arrays */ -/* --------------------------------------------- */ - -typedef struct _SPropProblem -{ - ULONG ulIndex; - ULONG ulPropTag; - SCODE scode; -} SPropProblem, FAR * LPSPropProblem; - -typedef struct _SPropProblemArray -{ - ULONG cProblem; - SPropProblem aProblem[MAPI_DIM]; -} SPropProblemArray, FAR * LPSPropProblemArray; - -#define CbNewSPropProblemArray(_cprob) \ - (offsetof(SPropProblemArray,aProblem) + (_cprob)*sizeof(SPropProblem)) -#define CbSPropProblemArray(_lparray) \ - (offsetof(SPropProblemArray,aProblem) + \ - (UINT) ((_lparray)->cProblem*sizeof(SPropProblem))) -#define SizedSPropProblemArray(_cprob, _name) \ -struct _SPropProblemArray_ ## _name \ -{ \ - ULONG cProblem; \ - SPropProblem aProblem[_cprob]; \ -} _name - -/* - * ENTRYLIST - */ - -typedef SBinaryArray ENTRYLIST, FAR *LPENTRYLIST; - -/* - * FLATENTRYLIST - * MTSID - * FLATMTSIDLIST - */ - -typedef struct { - ULONG cb; - BYTE abEntry[MAPI_DIM]; -} FLATENTRY, FAR *LPFLATENTRY; - -typedef struct { - ULONG cEntries; - ULONG cbEntries; - BYTE abEntries[MAPI_DIM]; -} FLATENTRYLIST, FAR *LPFLATENTRYLIST; - -typedef struct { - ULONG cb; - BYTE ab[MAPI_DIM]; -} MTSID, FAR *LPMTSID; - -typedef struct { - ULONG cMTSIDs; - ULONG cbMTSIDs; - BYTE abMTSIDs[MAPI_DIM]; -} FLATMTSIDLIST, FAR *LPFLATMTSIDLIST; - -#define CbNewFLATENTRY(_cb) (offsetof(FLATENTRY,abEntry) + (_cb)) -#define CbFLATENTRY(_lpentry) (offsetof(FLATENTRY,abEntry) + (_lpentry)->cb) -#define CbNewFLATENTRYLIST(_cb) (offsetof(FLATENTRYLIST,abEntries) + (_cb)) -#define CbFLATENTRYLIST(_lplist) (offsetof(FLATENTRYLIST,abEntries) + (_lplist)->cbEntries) -#define CbNewMTSID(_cb) (offsetof(MTSID,ab) + (_cb)) -#define CbMTSID(_lpentry) (offsetof(MTSID,ab) + (_lpentry)->cb) -#define CbNewFLATMTSIDLIST(_cb) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_cb)) -#define CbFLATMTSIDLIST(_lplist) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_lplist)->cbMTSIDs) -/* No SizedXXX macros for these types. */ - -/* ------------------------------ */ -/* ADRENTRY, ADRLIST */ - -typedef struct _ADRENTRY -{ - ULONG ulReserved1; /* Never used */ - ULONG cValues; - LPSPropValue rgPropVals; -} ADRENTRY, FAR * LPADRENTRY; - -typedef struct _ADRLIST -{ - ULONG cEntries; - ADRENTRY aEntries[MAPI_DIM]; -} ADRLIST, FAR * LPADRLIST; - -#define CbNewADRLIST(_centries) \ - (offsetof(ADRLIST,aEntries) + (_centries)*sizeof(ADRENTRY)) -#define CbADRLIST(_lpadrlist) \ - (offsetof(ADRLIST,aEntries) + (UINT)(_lpadrlist)->cEntries*sizeof(ADRENTRY)) -#define SizedADRLIST(_centries, _name) \ -struct _ADRLIST_ ## _name \ -{ \ - ULONG cEntries; \ - ADRENTRY aEntries[_centries]; \ -} _name - -/* ------------------------------ */ -/* SRow, SRowSet */ - -typedef struct _SRow -{ - ULONG ulAdrEntryPad; /* Pad so SRow's can map to ADRENTRY's */ - ULONG cValues; /* Count of property values */ - LPSPropValue lpProps; /* Property value array */ -} SRow, FAR * LPSRow; - -typedef struct _SRowSet -{ - ULONG cRows; /* Count of rows */ - SRow aRow[MAPI_DIM]; /* Array of rows */ -} SRowSet, FAR * LPSRowSet; - -#define CbNewSRowSet(_crow) (offsetof(SRowSet,aRow) + (_crow)*sizeof(SRow)) -#define CbSRowSet(_lprowset) (offsetof(SRowSet,aRow) + \ - (UINT)((_lprowset)->cRows*sizeof(SRow))) -#define SizedSRowSet(_crow, _name) \ -struct _SRowSet_ ## _name \ -{ \ - ULONG cRows; \ - SRow aRow[_crow]; \ -} _name - -/* MAPI Allocation Routines ------------------------------------------------ */ - -typedef SCODE (STDMETHODCALLTYPE ALLOCATEBUFFER)( - ULONG cbSize, - LPVOID FAR * lppBuffer -); - -typedef SCODE (STDMETHODCALLTYPE ALLOCATEMORE)( - ULONG cbSize, - LPVOID lpObject, - LPVOID FAR * lppBuffer -); - -typedef ULONG (STDAPICALLTYPE FREEBUFFER)( - LPVOID lpBuffer -); - -typedef ALLOCATEBUFFER FAR *LPALLOCATEBUFFER; -typedef ALLOCATEMORE FAR * LPALLOCATEMORE; -typedef FREEBUFFER FAR * LPFREEBUFFER; - -/* MAPI Component Object Model Macros -------------------------------------- */ - -#if defined(MAPI_IF) && (!defined(__cplusplus) || defined(CINTERFACE)) -#define DECLARE_MAPI_INTERFACE(iface) \ - typedef struct iface##Vtbl iface##Vtbl, FAR * iface; \ - struct iface##Vtbl -#define DECLARE_MAPI_INTERFACE_(iface, baseiface) \ - DECLARE_MAPI_INTERFACE(iface) -#define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \ - typedef struct iface##Vtbl iface##Vtbl, FAR * iface, FAR * FAR * piface; -#else -#define DECLARE_MAPI_INTERFACE(iface) \ - DECLARE_INTERFACE(iface) -#define DECLARE_MAPI_INTERFACE_(iface, baseiface) \ - DECLARE_INTERFACE_(iface, baseiface) -#ifdef __cplusplus -#define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \ - interface iface; typedef iface FAR * piface -#else -#define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \ - typedef interface iface iface, FAR * piface -#endif -#endif - -#define MAPIMETHOD(method) MAPIMETHOD_(HRESULT, method) -#define MAPIMETHOD_(type, method) STDMETHOD_(type, method) -#define MAPIMETHOD_DECLARE(type, method, prefix) \ - STDMETHODIMP_(type) prefix##method -#define MAPIMETHOD_TYPEDEF(type, method, prefix) \ - typedef type (STDMETHODCALLTYPE prefix##method##_METHOD) - -#define MAPI_IUNKNOWN_METHODS(IPURE) \ - MAPIMETHOD(QueryInterface) \ - (THIS_ REFIID riid, LPVOID FAR * ppvObj) IPURE; \ - MAPIMETHOD_(ULONG,AddRef) (THIS) IPURE; \ - MAPIMETHOD_(ULONG,Release) (THIS) IPURE; \ - -#undef IMPL -#define IMPL - -/* Pointers to MAPI Interfaces --------------------------------------------- */ - -typedef const IID FAR * LPCIID; - -DECLARE_MAPI_INTERFACE_PTR(IMsgStore, LPMDB); -DECLARE_MAPI_INTERFACE_PTR(IMAPIFolder, LPMAPIFOLDER); -DECLARE_MAPI_INTERFACE_PTR(IMessage, LPMESSAGE); -DECLARE_MAPI_INTERFACE_PTR(IAttach, LPATTACH); -DECLARE_MAPI_INTERFACE_PTR(IAddrBook, LPADRBOOK); -DECLARE_MAPI_INTERFACE_PTR(IABContainer, LPABCONT); -DECLARE_MAPI_INTERFACE_PTR(IMailUser, LPMAILUSER); -DECLARE_MAPI_INTERFACE_PTR(IDistList, LPDISTLIST); -DECLARE_MAPI_INTERFACE_PTR(IMAPIStatus, LPMAPISTATUS); -DECLARE_MAPI_INTERFACE_PTR(IMAPITable, LPMAPITABLE); -DECLARE_MAPI_INTERFACE_PTR(IProfSect, LPPROFSECT); -DECLARE_MAPI_INTERFACE_PTR(IMAPIProp, LPMAPIPROP); -DECLARE_MAPI_INTERFACE_PTR(IMAPIContainer, LPMAPICONTAINER); -DECLARE_MAPI_INTERFACE_PTR(IMAPIAdviseSink, LPMAPIADVISESINK); -DECLARE_MAPI_INTERFACE_PTR(IMAPIProgress, LPMAPIPROGRESS); -DECLARE_MAPI_INTERFACE_PTR(IProviderAdmin, LPPROVIDERADMIN); - -/* Extended MAPI Error Information ----------------------------------------- */ - -typedef struct _MAPIERROR -{ - ULONG ulVersion; - LPTSTR lpszError; - LPTSTR lpszComponent; - ULONG ulLowLevelError; - ULONG ulContext; - -} MAPIERROR, FAR * LPMAPIERROR; - - -/* IMAPIAdviseSink Interface ----------------------------------------------- */ - -/* - * Notification event types. The event types can be combined in a bitmask - * for filtering. Each one has a parameter structure associated with it: - * - * fnevCriticalError ERROR_NOTIFICATION - * fnevNewMail NEWMAIL_NOTIFICATION - * fnevObjectCreated OBJECT_NOTIFICATION - * fnevObjectDeleted OBJECT_NOTIFICATION - * fnevObjectModified OBJECT_NOTIFICATION - * fnevObjectCopied OBJECT_NOTIFICATION - * fnevSearchComplete OBJECT_NOTIFICATION - * fnevTableModified TABLE_NOTIFICATION - * fnevStatusObjectModified ? - * - * fnevExtended EXTENDED_NOTIFICATION - */ - -#define fnevCriticalError ((ULONG) 0x00000001) -#define fnevNewMail ((ULONG) 0x00000002) -#define fnevObjectCreated ((ULONG) 0x00000004) -#define fnevObjectDeleted ((ULONG) 0x00000008) -#define fnevObjectModified ((ULONG) 0x00000010) -#define fnevObjectMoved ((ULONG) 0x00000020) -#define fnevObjectCopied ((ULONG) 0x00000040) -#define fnevSearchComplete ((ULONG) 0x00000080) -#define fnevTableModified ((ULONG) 0x00000100) -#define fnevStatusObjectModified ((ULONG) 0x00000200) -#define fnevReservedForMapi ((ULONG) 0x40000000) -#define fnevExtended ((ULONG) 0x80000000) - -/* TABLE_NOTIFICATION event types passed in ulTableEvent */ - -#define TABLE_CHANGED 1 -#define TABLE_ERROR 2 -#define TABLE_ROW_ADDED 3 -#define TABLE_ROW_DELETED 4 -#define TABLE_ROW_MODIFIED 5 -#define TABLE_SORT_DONE 6 -#define TABLE_RESTRICT_DONE 7 -#define TABLE_SETCOL_DONE 8 -#define TABLE_RELOAD 9 - -/* Event Structures */ - -typedef struct _ERROR_NOTIFICATION -{ - ULONG cbEntryID; - LPENTRYID lpEntryID; - SCODE scode; - ULONG ulFlags; /* 0 or MAPI_UNICODE */ - LPMAPIERROR lpMAPIError; /* Detailed error information */ -} ERROR_NOTIFICATION; - -typedef struct _NEWMAIL_NOTIFICATION -{ - ULONG cbEntryID; - LPENTRYID lpEntryID; /* identifies the new message */ - ULONG cbParentID; - LPENTRYID lpParentID; /* identifies the folder it lives in */ - ULONG ulFlags; /* 0 or MAPI_UNICODE */ - LPTSTR lpszMessageClass; /* message class (UNICODE or string8) */ - ULONG ulMessageFlags; /* copy of PR_MESSAGE_FLAGS */ -} NEWMAIL_NOTIFICATION; - -typedef struct _OBJECT_NOTIFICATION -{ - ULONG cbEntryID; - LPENTRYID lpEntryID; /* EntryID of object */ - ULONG ulObjType; /* Type of object */ - ULONG cbParentID; - LPENTRYID lpParentID; /* EntryID of parent object */ - ULONG cbOldID; - LPENTRYID lpOldID; /* EntryID of old object */ - ULONG cbOldParentID; - LPENTRYID lpOldParentID; /* EntryID of old parent */ - LPSPropTagArray lpPropTagArray; -} OBJECT_NOTIFICATION; - -typedef struct _TABLE_NOTIFICATION -{ - ULONG ulTableEvent; /* Identifies WHICH table event */ - HRESULT hResult; /* Value for TABLE_ERROR */ - SPropValue propIndex; /* This row's "index property" */ - SPropValue propPrior; /* Preceding row's "index property" */ - SRow row; /* New data of added/modified row */ - ULONG ulPad; /* Force to 8-byte boundary */ -} TABLE_NOTIFICATION; - -typedef struct _EXTENDED_NOTIFICATION -{ - ULONG ulEvent; /* extended event code */ - ULONG cb; /* size of event parameters */ - LPBYTE pbEventParameters; /* event parameters */ -} EXTENDED_NOTIFICATION; - -typedef struct -{ - ULONG cbEntryID; - LPENTRYID lpEntryID; - ULONG cValues; - LPSPropValue lpPropVals; -} STATUS_OBJECT_NOTIFICATION; - -typedef struct _NOTIFICATION -{ - ULONG ulEventType; /* notification type, i.e. fnevSomething */ - ULONG ulAlignPad; /* Force to 8-byte boundary */ - union - { - ERROR_NOTIFICATION err; - NEWMAIL_NOTIFICATION newmail; - OBJECT_NOTIFICATION obj; - TABLE_NOTIFICATION tab; - EXTENDED_NOTIFICATION ext; - STATUS_OBJECT_NOTIFICATION statobj; - } info; -} NOTIFICATION, FAR * LPNOTIFICATION; - - -/* Interface used for registering and issuing notification callbacks. */ - -#define MAPI_IMAPIADVISESINK_METHODS(IPURE) \ - MAPIMETHOD_(ULONG, OnNotify) \ - (THIS_ ULONG cNotif, \ - LPNOTIFICATION lpNotifications) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIAdviseSink -DECLARE_MAPI_INTERFACE_(IMAPIAdviseSink, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIADVISESINK_METHODS(PURE) -}; - -/* Callback function type for MAPIAllocAdviseSink */ - -typedef long (STDAPICALLTYPE NOTIFCALLBACK) ( - LPVOID lpvContext, - ULONG cNotification, - LPNOTIFICATION lpNotifications); -typedef NOTIFCALLBACK FAR * LPNOTIFCALLBACK; - -/* - * Message name for the 16-bit MAPI notififcation engine. - * This can be used in 16-bit applications to force processing - * of notification callbacks. - */ - -#define szMAPINotificationMsg "MAPI Notify window message" - - -/* IMAPIProgress Interface ------------------------------------------------- */ - -/* Flag values for the progress indicator */ - -#define MAPI_TOP_LEVEL ((ULONG) 0x00000001) - -#define MAPI_IMAPIPROGRESS_METHODS(IPURE) \ - MAPIMETHOD(Progress) \ - (THIS_ ULONG ulValue, \ - ULONG ulCount, \ - ULONG ulTotal) IPURE; \ - MAPIMETHOD(GetFlags) \ - (THIS_ ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(GetMax) \ - (THIS_ ULONG FAR * lpulMax) IPURE; \ - MAPIMETHOD(GetMin) \ - (THIS_ ULONG FAR * lpulMin) IPURE; \ - MAPIMETHOD(SetLimits) \ - (THIS_ LPULONG lpulMin, \ - LPULONG lpulMax, \ - LPULONG lpulFlags) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIProgress -DECLARE_MAPI_INTERFACE_(IMAPIProgress, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROGRESS_METHODS(PURE) -}; - - -/* IMAPIProp Interface ----------------------------------------------------- */ - -/* GetLastError */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* - * Version: - */ -#define MAPI_ERROR_VERSION 0x00000000L - -/* GetPropList */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* GetProps */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* SaveChanges */ - -#define KEEP_OPEN_READONLY ((ULONG) 0x00000001) -#define KEEP_OPEN_READWRITE ((ULONG) 0x00000002) -#define FORCE_SAVE ((ULONG) 0x00000004) -/* define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ - -/* OpenProperty - ulFlags */ -/****** MAPI_MODIFY ((ULONG) 0x00000001) above */ -#define MAPI_CREATE ((ULONG) 0x00000002) -#define STREAM_APPEND ((ULONG) 0x00000004) -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ - -/* OpenProperty - ulInterfaceOptions, IID_IMAPITable */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* CopyTo, CopyProps */ - -#define MAPI_MOVE ((ULONG) 0x00000001) -#define MAPI_NOREPLACE ((ULONG) 0x00000002) -#define MAPI_DECLINE_OK ((ULONG) 0x00000004) - -#ifndef MAPI_DIALOG /* also defined in mapi.h */ -#define MAPI_DIALOG ((ULONG) 0x00000008) -#endif - -#ifndef MAPI_USE_DEFAULT /* also defined in mapi.h */ -#define MAPI_USE_DEFAULT 0x00000040 /* Use default profile in logon */ -#endif - -/* Flags used in GetIDsFromNames */ -/****** MAPI_CREATE ((ULONG) 0x00000002) above */ - -/* Flags used in GetNamesFromIDs (bit fields) */ -#define MAPI_NO_STRINGS ((ULONG) 0x00000001) -#define MAPI_NO_IDS ((ULONG) 0x00000002) - -/* Union discriminator */ -#define MNID_ID 0 -#define MNID_STRING 1 -typedef struct _MAPINAMEID -{ - LPGUID lpguid; - ULONG ulKind; - union { - LONG_PTR lID_Reserved; - LONG lID; - LPWSTR lpwstrName; - } Kind; - -} MAPINAMEID, FAR * LPMAPINAMEID; - -#define MAPI_IMAPIPROP_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(SaveChanges) \ - (THIS_ ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetProps) \ - (THIS_ LPSPropTagArray lpPropTagArray, \ - ULONG ulFlags, \ - ULONG FAR * lpcValues, \ - LPSPropValue FAR * lppPropArray) IPURE; \ - MAPIMETHOD(GetPropList) \ - (THIS_ ULONG ulFlags, \ - LPSPropTagArray FAR * lppPropTagArray) IPURE; \ - MAPIMETHOD(OpenProperty) \ - (THIS_ ULONG ulPropTag, \ - LPCIID lpiid, \ - ULONG ulInterfaceOptions, \ - ULONG ulFlags, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(SetProps) \ - (THIS_ ULONG cValues, \ - LPSPropValue lpPropArray, \ - LPSPropProblemArray FAR * lppProblems) IPURE; \ - MAPIMETHOD(DeleteProps) \ - (THIS_ LPSPropTagArray lpPropTagArray, \ - LPSPropProblemArray FAR * lppProblems) IPURE; \ - MAPIMETHOD(CopyTo) \ - (THIS_ ULONG ciidExclude, \ - LPCIID rgiidExclude, \ - LPSPropTagArray lpExcludeProps, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - LPCIID lpInterface, \ - LPVOID lpDestObj, \ - ULONG ulFlags, \ - LPSPropProblemArray FAR * lppProblems) IPURE; \ - MAPIMETHOD(CopyProps) \ - (THIS_ LPSPropTagArray lpIncludeProps, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - LPCIID lpInterface, \ - LPVOID lpDestObj, \ - ULONG ulFlags, \ - LPSPropProblemArray FAR * lppProblems) IPURE; \ - MAPIMETHOD(GetNamesFromIDs) \ - (THIS_ LPSPropTagArray FAR * lppPropTags, \ - LPGUID lpPropSetGuid, \ - ULONG ulFlags, \ - ULONG FAR * lpcPropNames, \ - LPMAPINAMEID FAR * FAR * lpppPropNames) IPURE; \ - MAPIMETHOD(GetIDsFromNames) \ - (THIS_ ULONG cPropNames, \ - LPMAPINAMEID FAR * lppPropNames, \ - ULONG ulFlags, \ - LPSPropTagArray FAR * lppPropTags) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIProp -DECLARE_MAPI_INTERFACE_(IMAPIProp, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) -}; - -/* IMAPITable Interface ---------------------------------------------------- */ - -/* Table status */ - -#define TBLSTAT_COMPLETE ((ULONG) 0) -#define TBLSTAT_QCHANGED ((ULONG) 7) -#define TBLSTAT_SORTING ((ULONG) 9) -#define TBLSTAT_SORT_ERROR ((ULONG) 10) -#define TBLSTAT_SETTING_COLS ((ULONG) 11) -#define TBLSTAT_SETCOL_ERROR ((ULONG) 13) -#define TBLSTAT_RESTRICTING ((ULONG) 14) -#define TBLSTAT_RESTRICT_ERROR ((ULONG) 15) - - -/* Table Type */ - -#define TBLTYPE_SNAPSHOT ((ULONG) 0) -#define TBLTYPE_KEYSET ((ULONG) 1) -#define TBLTYPE_DYNAMIC ((ULONG) 2) - - -/* Sort order */ - -/* bit 0: set if descending, clear if ascending */ - -#define TABLE_SORT_ASCEND ((ULONG) 0x00000000) -#define TABLE_SORT_DESCEND ((ULONG) 0x00000001) -#define TABLE_SORT_COMBINE ((ULONG) 0x00000002) - - -/* Data structures */ - -typedef struct _SSortOrder -{ - ULONG ulPropTag; /* Column to sort on */ - ULONG ulOrder; /* Ascending, descending, combine to left */ -} SSortOrder, FAR * LPSSortOrder; - -typedef struct _SSortOrderSet -{ - ULONG cSorts; /* Number of sort columns in aSort below*/ - ULONG cCategories; /* 0 for non-categorized, up to cSorts */ - ULONG cExpanded; /* 0 if no categories start expanded, */ - /* up to cExpanded */ - SSortOrder aSort[MAPI_DIM]; /* The sort orders */ -} SSortOrderSet, FAR * LPSSortOrderSet; - -#define CbNewSSortOrderSet(_csort) \ - (offsetof(SSortOrderSet,aSort) + (_csort)*sizeof(SSortOrder)) -#define CbSSortOrderSet(_lpset) \ - (offsetof(SSortOrderSet,aSort) + \ - (UINT)((_lpset)->cSorts*sizeof(SSortOrder))) -#define SizedSSortOrderSet(_csort, _name) \ -struct _SSortOrderSet_ ## _name \ -{ \ - ULONG cSorts; \ - ULONG cCategories; \ - ULONG cExpanded; \ - SSortOrder aSort[_csort]; \ -} _name - -typedef ULONG_PTR BOOKMARK; - -#define BOOKMARK_BEGINNING ((BOOKMARK) 0) /* Before first row */ -#define BOOKMARK_CURRENT ((BOOKMARK) 1) /* Before current row */ -#define BOOKMARK_END ((BOOKMARK) 2) /* After last row */ - -/* Fuzzy Level */ - -#define FL_FULLSTRING ((ULONG) 0x00000000) -#define FL_SUBSTRING ((ULONG) 0x00000001) -#define FL_PREFIX ((ULONG) 0x00000002) - -#define FL_IGNORECASE ((ULONG) 0x00010000) -#define FL_IGNORENONSPACE ((ULONG) 0x00020000) -#define FL_LOOSE ((ULONG) 0x00040000) - -/* Restrictions */ - -typedef struct _SRestriction FAR * LPSRestriction; - -/* Restriction types */ - -#define RES_AND ((ULONG) 0x00000000) -#define RES_OR ((ULONG) 0x00000001) -#define RES_NOT ((ULONG) 0x00000002) -#define RES_CONTENT ((ULONG) 0x00000003) -#define RES_PROPERTY ((ULONG) 0x00000004) -#define RES_COMPAREPROPS ((ULONG) 0x00000005) -#define RES_BITMASK ((ULONG) 0x00000006) -#define RES_SIZE ((ULONG) 0x00000007) -#define RES_EXIST ((ULONG) 0x00000008) -#define RES_SUBRESTRICTION ((ULONG) 0x00000009) -#define RES_COMMENT ((ULONG) 0x0000000A) -#define RES_COUNT ((ULONG) 0x0000000B) // OFFICEDEV: Count restriction to CAP results -#define RES_ANNOTATION ((ULONG) 0x0000000C) // OFFICEDEV: Annotation restriction to pass information like LCID, etc. - -/* Relational operators. These apply to all property comparison restrictions. */ - -#define RELOP_LT ((ULONG) 0) /* < */ -#define RELOP_LE ((ULONG) 1) /* <= */ -#define RELOP_GT ((ULONG) 2) /* > */ -#define RELOP_GE ((ULONG) 3) /* >= */ -#define RELOP_EQ ((ULONG) 4) /* == */ -#define RELOP_NE ((ULONG) 5) /* != */ -#define RELOP_RE ((ULONG) 6) /* LIKE (Regular expression) */ - -/* Bitmask operators, for RES_BITMASK only. */ - -#define BMR_EQZ ((ULONG) 0) /* ==0 */ -#define BMR_NEZ ((ULONG) 1) /* !=0 */ - -/* Subobject identifiers for RES_SUBRESTRICTION only. See MAPITAGS.H. */ - -/* #define PR_MESSAGE_RECIPIENTS PROP_TAG(PT_OBJECT,0x0E12) */ -/* #define PR_MESSAGE_ATTACHMENTS PROP_TAG(PT_OBJECT,0x0E13) */ - -typedef struct _SAndRestriction -{ - ULONG cRes; - LPSRestriction lpRes; -} SAndRestriction; - -typedef struct _SOrRestriction -{ - ULONG cRes; - LPSRestriction lpRes; -} SOrRestriction; - -typedef struct _SNotRestriction -{ - ULONG ulReserved; - LPSRestriction lpRes; -} SNotRestriction; - -typedef struct _SContentRestriction -{ - ULONG ulFuzzyLevel; - ULONG ulPropTag; - LPSPropValue lpProp; -} SContentRestriction; - -typedef struct _SBitMaskRestriction -{ - ULONG relBMR; - ULONG ulPropTag; - ULONG ulMask; -} SBitMaskRestriction; - -typedef struct _SPropertyRestriction -{ - ULONG relop; - ULONG ulPropTag; - LPSPropValue lpProp; -} SPropertyRestriction; - -typedef struct _SComparePropsRestriction -{ - ULONG relop; - ULONG ulPropTag1; - ULONG ulPropTag2; -} SComparePropsRestriction; - -typedef struct _SSizeRestriction -{ - ULONG relop; - ULONG ulPropTag; - ULONG cb; -} SSizeRestriction; - -typedef struct _SExistRestriction -{ - ULONG ulReserved1; - ULONG ulPropTag; - ULONG ulReserved2; -} SExistRestriction; - -typedef struct _SSubRestriction -{ - ULONG ulSubObject; - LPSRestriction lpRes; -} SSubRestriction; - -typedef struct _SCommentRestriction -{ - ULONG cValues; /* # of properties in lpProp */ - LPSRestriction lpRes; - LPSPropValue lpProp; -} SCommentRestriction; - -// OFFICEDEV: The following two restrictions are new to Office 12 and are not -// backwards compatible with older clients. -typedef struct _SAnnotationRestriction -{ - ULONG cValues; /* # of properties in lpProp */ - LPSRestriction lpRes; - LPSPropValue lpProp; -} SAnnotationRestriction; - -typedef struct _SCountRestriction -{ - ULONG ulCount; - LPSRestriction lpRes; -} SCountRestriction; - -typedef struct _SRestriction -{ - ULONG rt; /* Restriction type */ - union - { - SComparePropsRestriction resCompareProps; /* first */ - SAndRestriction resAnd; - SOrRestriction resOr; - SNotRestriction resNot; - SContentRestriction resContent; - SPropertyRestriction resProperty; - SBitMaskRestriction resBitMask; - SSizeRestriction resSize; - SExistRestriction resExist; - SSubRestriction resSub; - SCommentRestriction resComment; - SAnnotationRestriction resAnnotation; // OFFICEDEV: not backwards compatible with Office 11 and older - SCountRestriction resCount; // OFFICEDEV: not backwards compatible with Office 11 and older - } res; -} SRestriction; - -/* SComparePropsRestriction is first in the union so that */ -/* static initializations of 3-value restriction work. */ - -/* Flags of the methods of IMAPITable */ - -/* QueryColumn */ - -#define TBL_ALL_COLUMNS ((ULONG) 0x00000001) - -/* QueryRows */ -/* Possible values for PR_ROW_TYPE (for categorization) */ - -#define TBL_LEAF_ROW ((ULONG) 1) -#define TBL_EMPTY_CATEGORY ((ULONG) 2) -#define TBL_EXPANDED_CATEGORY ((ULONG) 3) -#define TBL_COLLAPSED_CATEGORY ((ULONG) 4) - -/* Table wait flag */ - -#define TBL_NOWAIT ((ULONG) 0x00000001) -/* alternative name for TBL_NOWAIT */ -#define TBL_ASYNC ((ULONG) 0x00000001) -#define TBL_BATCH ((ULONG) 0x00000002) - -/* FindRow */ - -#define DIR_BACKWARD ((ULONG) 0x00000001) - -/* Table cursor states */ - -#define TBL_NOADVANCE ((ULONG) 0x00000001) - -#define MAPI_IMAPITABLE_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Advise) \ - (THIS_ ULONG ulEventMask, \ - LPMAPIADVISESINK lpAdviseSink, \ - ULONG_PTR FAR * lpulConnection) IPURE; \ - MAPIMETHOD(Unadvise) \ - (THIS_ ULONG_PTR ulConnection) IPURE; \ - MAPIMETHOD(GetStatus) \ - (THIS_ ULONG FAR * lpulTableStatus, \ - ULONG FAR * lpulTableType) IPURE; \ - MAPIMETHOD(SetColumns) \ - (THIS_ LPSPropTagArray lpPropTagArray, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(QueryColumns) \ - (THIS_ ULONG ulFlags, \ - LPSPropTagArray FAR * lpPropTagArray) IPURE; \ - MAPIMETHOD(GetRowCount) \ - (THIS_ ULONG ulFlags, \ - ULONG FAR * lpulCount) IPURE; \ - MAPIMETHOD(SeekRow) \ - (THIS_ BOOKMARK bkOrigin, \ - LONG lRowCount, \ - LONG FAR * lplRowsSought) IPURE; \ - MAPIMETHOD(SeekRowApprox) \ - (THIS_ ULONG ulNumerator, \ - ULONG ulDenominator) IPURE; \ - MAPIMETHOD(QueryPosition) \ - (THIS_ ULONG FAR * lpulRow, \ - ULONG FAR * lpulNumerator, \ - ULONG FAR * lpulDenominator) IPURE; \ - MAPIMETHOD(FindRow) \ - (THIS_ LPSRestriction lpRestriction, \ - BOOKMARK bkOrigin, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(Restrict) \ - (THIS_ LPSRestriction lpRestriction, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(CreateBookmark) \ - (THIS_ BOOKMARK FAR * lpbkPosition) IPURE; \ - MAPIMETHOD(FreeBookmark) \ - (THIS_ BOOKMARK bkPosition) IPURE; \ - MAPIMETHOD(SortTable) \ - (THIS_ LPSSortOrderSet lpSortCriteria, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(QuerySortOrder) \ - (THIS_ LPSSortOrderSet FAR * lppSortCriteria) IPURE; \ - MAPIMETHOD(QueryRows) \ - (THIS_ LONG lRowCount, \ - ULONG ulFlags, \ - LPSRowSet FAR * lppRows) IPURE; \ - MAPIMETHOD(Abort) (THIS) IPURE; \ - MAPIMETHOD(ExpandRow) \ - (THIS_ ULONG cbInstanceKey, \ - LPBYTE pbInstanceKey, \ - ULONG ulRowCount, \ - ULONG ulFlags, \ - LPSRowSet FAR * lppRows, \ - ULONG FAR * lpulMoreRows) IPURE; \ - MAPIMETHOD(CollapseRow) \ - (THIS_ ULONG cbInstanceKey, \ - LPBYTE pbInstanceKey, \ - ULONG ulFlags, \ - ULONG FAR * lpulRowCount) IPURE; \ - MAPIMETHOD(WaitForCompletion) \ - (THIS_ ULONG ulFlags, \ - ULONG ulTimeout, \ - ULONG FAR * lpulTableStatus) IPURE; \ - MAPIMETHOD(GetCollapseState) \ - (THIS_ ULONG ulFlags, \ - ULONG cbInstanceKey, \ - LPBYTE lpbInstanceKey, \ - ULONG FAR * lpcbCollapseState, \ - LPBYTE FAR * lppbCollapseState) IPURE; \ - MAPIMETHOD(SetCollapseState) \ - (THIS_ ULONG ulFlags, \ - ULONG cbCollapseState, \ - LPBYTE pbCollapseState, \ - BOOKMARK FAR * lpbkLocation) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPITable -DECLARE_MAPI_INTERFACE_(IMAPITable, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPITABLE_METHODS(PURE) -}; - -/* IProfSect Interface ----------------------------------------------------- */ - -/* Standard section for public profile properties */ - -#define PS_PROFILE_PROPERTIES_INIT \ -{ 0x98, 0x15, 0xAC, 0x08, 0xAA, 0xB0, 0x10, 0x1A, \ - 0x8C, 0x93, 0x08, 0x00, 0x2B, 0x2A, 0x56, 0xC2 } - - -#define MAPI_IPROFSECT_METHODS(IPURE) - -#undef INTERFACE -#define INTERFACE IProfSect -DECLARE_MAPI_INTERFACE_(IProfSect, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IPROFSECT_METHODS(PURE) -}; - -/* IMAPIStatus Interface --------------------------------------------------- */ - -/* Values for PR_RESOURCE_TYPE, _METHODS, _FLAGS */ - -#define MAPI_STORE_PROVIDER ((ULONG) 33) /* Message Store */ -#define MAPI_AB ((ULONG) 34) /* Address Book */ -#define MAPI_AB_PROVIDER ((ULONG) 35) /* Address Book Provider */ -#define MAPI_TRANSPORT_PROVIDER ((ULONG) 36) /* Transport Provider */ -#define MAPI_SPOOLER ((ULONG) 37) /* Message Spooler */ -#define MAPI_PROFILE_PROVIDER ((ULONG) 38) /* Profile Provider */ -#define MAPI_SUBSYSTEM ((ULONG) 39) /* Overall Subsystem Status */ -#define MAPI_HOOK_PROVIDER ((ULONG) 40) /* Spooler Hook */ - -#define STATUS_VALIDATE_STATE ((ULONG) 0x00000001) -#define STATUS_SETTINGS_DIALOG ((ULONG) 0x00000002) -#define STATUS_CHANGE_PASSWORD ((ULONG) 0x00000004) -#define STATUS_FLUSH_QUEUES ((ULONG) 0x00000008) - -#define STATUS_DEFAULT_OUTBOUND ((ULONG) 0x00000001) -#define STATUS_DEFAULT_STORE ((ULONG) 0x00000002) -#define STATUS_PRIMARY_IDENTITY ((ULONG) 0x00000004) -#define STATUS_SIMPLE_STORE ((ULONG) 0x00000008) -#define STATUS_XP_PREFER_LAST ((ULONG) 0x00000010) -#define STATUS_NO_PRIMARY_IDENTITY ((ULONG) 0x00000020) -#define STATUS_NO_DEFAULT_STORE ((ULONG) 0x00000040) -#define STATUS_TEMP_SECTION ((ULONG) 0x00000080) -#define STATUS_OWN_STORE ((ULONG) 0x00000100) -/****** HOOK_INBOUND ((ULONG) 0x00000200) Defined in MAPIHOOK.H */ -/****** HOOK_OUTBOUND ((ULONG) 0x00000400) Defined in MAPIHOOK.H */ -#define STATUS_NEED_IPM_TREE ((ULONG) 0x00000800) -#define STATUS_PRIMARY_STORE ((ULONG) 0x00001000) -#define STATUS_SECONDARY_STORE ((ULONG) 0x00002000) - - -/* - * PR_STATUS_CODE bit. Low 16 bits for common values; High 16 bits - * for provider type-specific values. (DCR 304) - */ - -#define STATUS_AVAILABLE ((ULONG) 0x00000001) -#define STATUS_OFFLINE ((ULONG) 0x00000002) -#define STATUS_FAILURE ((ULONG) 0x00000004) - -/* Transport values of PR_STATUS_CODE */ - -#define STATUS_INBOUND_ENABLED ((ULONG) 0x00010000) -#define STATUS_INBOUND_ACTIVE ((ULONG) 0x00020000) -#define STATUS_INBOUND_FLUSH ((ULONG) 0x00040000) -#define STATUS_OUTBOUND_ENABLED ((ULONG) 0x00100000) -#define STATUS_OUTBOUND_ACTIVE ((ULONG) 0x00200000) -#define STATUS_OUTBOUND_FLUSH ((ULONG) 0x00400000) -#define STATUS_REMOTE_ACCESS ((ULONG) 0x00800000) - -/* ValidateState flags */ - -#define SUPPRESS_UI ((ULONG) 0x00000001) -#define REFRESH_XP_HEADER_CACHE ((ULONG) 0x00010000) -#define PROCESS_XP_HEADER_CACHE ((ULONG) 0x00020000) -#define FORCE_XP_CONNECT ((ULONG) 0x00040000) -#define FORCE_XP_DISCONNECT ((ULONG) 0x00080000) -#define CONFIG_CHANGED ((ULONG) 0x00100000) -#define ABORT_XP_HEADER_OPERATION ((ULONG) 0x00200000) -#define SHOW_XP_SESSION_UI ((ULONG) 0x00400000) - -/* SettingsDialog flags */ - -#define UI_READONLY ((ULONG) 0x00000001) - -/* FlushQueues flags */ - -#define FLUSH_UPLOAD ((ULONG) 0x00000002) -#define FLUSH_DOWNLOAD ((ULONG) 0x00000004) -#define FLUSH_FORCE ((ULONG) 0x00000008) -#define FLUSH_NO_UI ((ULONG) 0x00000010) -#define FLUSH_ASYNC_OK ((ULONG) 0x00000020) - -#define MAPI_IMAPISTATUS_METHODS(IPURE) \ - MAPIMETHOD(ValidateState) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(SettingsDialog) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(ChangePassword) \ - (THIS_ LPTSTR lpOldPass, \ - LPTSTR lpNewPass, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(FlushQueues) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG cbTargetTransport, \ - LPENTRYID lpTargetTransport, \ - ULONG ulFlags) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIStatus -DECLARE_MAPI_INTERFACE_(IMAPIStatus, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMAPISTATUS_METHODS(PURE) -}; - -/* IMAPIContainer Interface ------------------------------------------------ */ - -/* Flags for OpenEntry() */ - -/****** MAPI_MODIFY ((ULONG) 0x00000001) above */ -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -#define MAPI_BEST_ACCESS ((ULONG) 0x00000010) - -/* GetContentsTable() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -/****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */ - -/* GetHierarchyTable() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ -#define CONVENIENT_DEPTH ((ULONG) 0x00000001) -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ - -/* GetSearchCriteria */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ -#define SEARCH_RUNNING ((ULONG) 0x00000001) -#define SEARCH_REBUILD ((ULONG) 0x00000002) -#define SEARCH_RECURSIVE ((ULONG) 0x00000004) -#define SEARCH_FOREGROUND ((ULONG) 0x00000008) - -/* SetSearchCriteria */ -#define STOP_SEARCH ((ULONG) 0x00000001) -#define RESTART_SEARCH ((ULONG) 0x00000002) -#define RECURSIVE_SEARCH ((ULONG) 0x00000004) -#define SHALLOW_SEARCH ((ULONG) 0x00000008) -#define FOREGROUND_SEARCH ((ULONG) 0x00000010) -#define BACKGROUND_SEARCH ((ULONG) 0x00000020) - -#define MAPI_IMAPICONTAINER_METHODS(IPURE) \ - MAPIMETHOD(GetContentsTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(GetHierarchyTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(OpenEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(SetSearchCriteria) \ - (THIS_ LPSRestriction lpRestriction, \ - LPENTRYLIST lpContainerList, \ - ULONG ulSearchFlags) IPURE; \ - MAPIMETHOD(GetSearchCriteria) \ - (THIS_ ULONG ulFlags, \ - LPSRestriction FAR * lppRestriction, \ - LPENTRYLIST FAR * lppContainerList, \ - ULONG FAR * lpulSearchState)IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIContainer -DECLARE_MAPI_INTERFACE_(IMAPIContainer, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMAPICONTAINER_METHODS(PURE) -}; - -/* IABContainer Interface -------------------------------------------------- */ - -/* - * IABContainer PR_CONTAINER_FLAGS values - * If AB_UNMODIFIABLE and AB_MODIFIABLE are both set, it means the container - * doesn't know if it's modifiable or not, and the client should - * try to modify the contents but we won't expect it to work. - * If the AB_RECIPIENTS flag is set and neither AB_MODIFIABLE or AB_UNMODIFIABLE - * bits are set, it is an error. - */ - -typedef struct _flaglist -{ - ULONG cFlags; - ULONG ulFlag[MAPI_DIM]; -} FlagList, FAR * LPFlagList; - - -/* - * Container flags - */ -#define AB_RECIPIENTS ((ULONG) 0x00000001) -#define AB_SUBCONTAINERS ((ULONG) 0x00000002) -#define AB_MODIFIABLE ((ULONG) 0x00000004) -#define AB_UNMODIFIABLE ((ULONG) 0x00000008) -#define AB_FIND_ON_OPEN ((ULONG) 0x00000010) -#define AB_NOT_DEFAULT ((ULONG) 0x00000020) - -/* CreateEntry() */ - -#define CREATE_CHECK_DUP_STRICT ((ULONG) 0x00000001) -#define CREATE_CHECK_DUP_LOOSE ((ULONG) 0x00000002) -#define CREATE_REPLACE ((ULONG) 0x00000004) - -/* ResolveNames() - ulFlags */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* ResolveNames() - rgulFlags */ -#define MAPI_UNRESOLVED ((ULONG) 0x00000000) -#define MAPI_AMBIGUOUS ((ULONG) 0x00000001) -#define MAPI_RESOLVED ((ULONG) 0x00000002) - - -#define MAPI_IABCONTAINER_METHODS(IPURE) \ - MAPIMETHOD(CreateEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulCreateFlags, \ - LPMAPIPROP FAR * lppMAPIPropEntry) IPURE; \ - MAPIMETHOD(CopyEntries) \ - (THIS_ LPENTRYLIST lpEntries, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(DeleteEntries) \ - (THIS_ LPENTRYLIST lpEntries, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(ResolveNames) \ - (THIS_ LPSPropTagArray lpPropTagArray, \ - ULONG ulFlags, \ - LPADRLIST lpAdrList, \ - LPFlagList lpFlagList) IPURE; \ - -#undef INTERFACE -#define INTERFACE IABContainer -DECLARE_MAPI_INTERFACE_(IABContainer, IMAPIContainer) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMAPICONTAINER_METHODS(PURE) - MAPI_IABCONTAINER_METHODS(PURE) -}; - -/* IMailUser Interface ----------------------------------------------------- */ - -/* Any call which can create a one-off entryID (i.e. MAPISupport::CreateOneOff - or IAdrBook::CreateOneOff) can encode the value for PR_SEND_RICH_INFO by - passing in the following flag in the ulFlags parameter. Setting this flag - indicates that PR_SEND_RICH_INFO will be FALSE. -*/ -#define MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) - - - - -/* Values of PR_NDR_DIAG_CODE */ - -#define MAPI_DIAG(_code) ((LONG) _code) - -#define MAPI_DIAG_NO_DIAGNOSTIC MAPI_DIAG( -1 ) -#define MAPI_DIAG_OR_NAME_UNRECOGNIZED MAPI_DIAG( 0 ) -#define MAPI_DIAG_OR_NAME_AMBIGUOUS MAPI_DIAG( 1 ) -#define MAPI_DIAG_MTS_CONGESTED MAPI_DIAG( 2 ) -#define MAPI_DIAG_LOOP_DETECTED MAPI_DIAG( 3 ) -#define MAPI_DIAG_RECIPIENT_UNAVAILABLE MAPI_DIAG( 4 ) -#define MAPI_DIAG_MAXIMUM_TIME_EXPIRED MAPI_DIAG( 5 ) -#define MAPI_DIAG_EITS_UNSUPPORTED MAPI_DIAG( 6 ) -#define MAPI_DIAG_CONTENT_TOO_LONG MAPI_DIAG( 7 ) -#define MAPI_DIAG_IMPRACTICAL_TO_CONVERT MAPI_DIAG( 8 ) -#define MAPI_DIAG_PROHIBITED_TO_CONVERT MAPI_DIAG( 9 ) -#define MAPI_DIAG_CONVERSION_UNSUBSCRIBED MAPI_DIAG( 10 ) -#define MAPI_DIAG_PARAMETERS_INVALID MAPI_DIAG( 11 ) -#define MAPI_DIAG_CONTENT_SYNTAX_IN_ERROR MAPI_DIAG( 12 ) -#define MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD MAPI_DIAG( 13 ) -#define MAPI_DIAG_NUMBER_CONSTRAINT_VIOLATD MAPI_DIAG( 14 ) -#define MAPI_DIAG_CONTENT_TYPE_UNSUPPORTED MAPI_DIAG( 15 ) -#define MAPI_DIAG_TOO_MANY_RECIPIENTS MAPI_DIAG( 16 ) -#define MAPI_DIAG_NO_BILATERAL_AGREEMENT MAPI_DIAG( 17 ) -#define MAPI_DIAG_CRITICAL_FUNC_UNSUPPORTED MAPI_DIAG( 18 ) -#define MAPI_DIAG_CONVERSION_LOSS_PROHIB MAPI_DIAG( 19 ) -#define MAPI_DIAG_LINE_TOO_LONG MAPI_DIAG( 20 ) -#define MAPI_DIAG_PAGE_TOO_LONG MAPI_DIAG( 21 ) -#define MAPI_DIAG_PICTORIAL_SYMBOL_LOST MAPI_DIAG( 22 ) -#define MAPI_DIAG_PUNCTUATION_SYMBOL_LOST MAPI_DIAG( 23 ) -#define MAPI_DIAG_ALPHABETIC_CHARACTER_LOST MAPI_DIAG( 24 ) -#define MAPI_DIAG_MULTIPLE_INFO_LOSSES MAPI_DIAG( 25 ) -#define MAPI_DIAG_REASSIGNMENT_PROHIBITED MAPI_DIAG( 26 ) -#define MAPI_DIAG_REDIRECTION_LOOP_DETECTED MAPI_DIAG( 27 ) -#define MAPI_DIAG_EXPANSION_PROHIBITED MAPI_DIAG( 28 ) -#define MAPI_DIAG_SUBMISSION_PROHIBITED MAPI_DIAG( 29 ) -#define MAPI_DIAG_EXPANSION_FAILED MAPI_DIAG( 30 ) -#define MAPI_DIAG_RENDITION_UNSUPPORTED MAPI_DIAG( 31 ) -#define MAPI_DIAG_MAIL_ADDRESS_INCORRECT MAPI_DIAG( 32 ) -#define MAPI_DIAG_MAIL_OFFICE_INCOR_OR_INVD MAPI_DIAG( 33 ) -#define MAPI_DIAG_MAIL_ADDRESS_INCOMPLETE MAPI_DIAG( 34 ) -#define MAPI_DIAG_MAIL_RECIPIENT_UNKNOWN MAPI_DIAG( 35 ) -#define MAPI_DIAG_MAIL_RECIPIENT_DECEASED MAPI_DIAG( 36 ) -#define MAPI_DIAG_MAIL_ORGANIZATION_EXPIRED MAPI_DIAG( 37 ) -#define MAPI_DIAG_MAIL_REFUSED MAPI_DIAG( 38 ) -#define MAPI_DIAG_MAIL_UNCLAIMED MAPI_DIAG( 39 ) -#define MAPI_DIAG_MAIL_RECIPIENT_MOVED MAPI_DIAG( 40 ) -#define MAPI_DIAG_MAIL_RECIPIENT_TRAVELLING MAPI_DIAG( 41 ) -#define MAPI_DIAG_MAIL_RECIPIENT_DEPARTED MAPI_DIAG( 42 ) -#define MAPI_DIAG_MAIL_NEW_ADDRESS_UNKNOWN MAPI_DIAG( 43 ) -#define MAPI_DIAG_MAIL_FORWARDING_UNWANTED MAPI_DIAG( 44 ) -#define MAPI_DIAG_MAIL_FORWARDING_PROHIB MAPI_DIAG( 45 ) -#define MAPI_DIAG_SECURE_MESSAGING_ERROR MAPI_DIAG( 46 ) -#define MAPI_DIAG_DOWNGRADING_IMPOSSIBLE MAPI_DIAG( 47 ) - -/* Values of PR_DELIVERY_POINT (MH_T_DELIVERY_POINT) */ - -#define MAPI_MH_DP_PUBLIC_UA ((ULONG) 0) -#define MAPI_MH_DP_PRIVATE_UA ((ULONG) 1) -#define MAPI_MH_DP_MS ((ULONG) 2) -#define MAPI_MH_DP_ML ((ULONG) 3) -#define MAPI_MH_DP_PDAU ((ULONG) 4) -#define MAPI_MH_DP_PDS_PATRON ((ULONG) 5) -#define MAPI_MH_DP_OTHER_AU ((ULONG) 6) - - -#define MAPI_IMAILUSER_METHODS(IPURE) - -#undef INTERFACE -#define INTERFACE IMailUser -DECLARE_MAPI_INTERFACE_(IMailUser, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMAILUSER_METHODS(PURE) -}; - -/* IDistList Interface ----------------------------------------------------- */ - -#define MAPI_IDISTLIST_METHODS(IPURE) \ - MAPIMETHOD(CreateEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulCreateFlags, \ - LPMAPIPROP FAR * lppMAPIPropEntry) IPURE; \ - MAPIMETHOD(CopyEntries) \ - (THIS_ LPENTRYLIST lpEntries, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(DeleteEntries) \ - (THIS_ LPENTRYLIST lpEntries, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(ResolveNames) \ - (THIS_ LPSPropTagArray lpPropTagArray, \ - ULONG ulFlags, \ - LPADRLIST lpAdrList, \ - LPFlagList lpFlagList) IPURE; \ - -#undef INTERFACE -#define INTERFACE IDistList -DECLARE_MAPI_INTERFACE_(IDistList, IMAPIContainer) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMAPICONTAINER_METHODS(PURE) - MAPI_IDISTLIST_METHODS(PURE) -}; - -/* IMAPIFolder Interface --------------------------------------------------- */ - -/* IMAPIFolder folder type (enum) */ - -#define FOLDER_ROOT ((ULONG) 0x00000000) -#define FOLDER_GENERIC ((ULONG) 0x00000001) -#define FOLDER_SEARCH ((ULONG) 0x00000002) - -/* CreateMessage */ -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -/****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */ - -/* CopyMessages */ - -#define MESSAGE_MOVE ((ULONG) 0x00000001) -#define MESSAGE_DIALOG ((ULONG) 0x00000002) -/****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */ - -/* CreateFolder */ - -#define OPEN_IF_EXISTS ((ULONG) 0x00000001) -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* DeleteFolder */ - -#define DEL_MESSAGES ((ULONG) 0x00000001) -#define FOLDER_DIALOG ((ULONG) 0x00000002) -#define DEL_FOLDERS ((ULONG) 0x00000004) - -/* EmptyFolder */ -#define DEL_ASSOCIATED ((ULONG) 0x00000008) - -/* CopyFolder */ - -#define FOLDER_MOVE ((ULONG) 0x00000001) -/****** FOLDER_DIALOG ((ULONG) 0x00000002) above */ -/****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */ -#define COPY_SUBFOLDERS ((ULONG) 0x00000010) -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - - -/* SetReadFlags */ - -/****** SUPPRESS_RECEIPT ((ULONG) 0x00000001) below */ -/****** FOLDER_DIALOG ((ULONG) 0x00000002) above */ -/****** CLEAR_READ_FLAG ((ULONG) 0x00000004) below */ -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -/****** GENERATE_RECEIPT_ONLY ((ULONG) 0x00000010) below */ -/****** CLEAR_RN_PENDING ((ULONG) 0x00000020) below */ -/****** CLEAR_NRN_PENDING ((ULONG) 0x00000040) below */ - - -/* GetMessageStatus */ - -#define MSGSTATUS_HIGHLIGHTED ((ULONG) 0x00000001) -#define MSGSTATUS_TAGGED ((ULONG) 0x00000002) -#define MSGSTATUS_HIDDEN ((ULONG) 0x00000004) -#define MSGSTATUS_DELMARKED ((ULONG) 0x00000008) - -/* Bits for remote message status */ - -#define MSGSTATUS_REMOTE_DOWNLOAD ((ULONG) 0x00001000) -#define MSGSTATUS_REMOTE_DELETE ((ULONG) 0x00002000) - -/* SaveContentsSort */ - -#define RECURSIVE_SORT ((ULONG) 0x00000002) - -/* PR_STATUS property */ - -#define FLDSTATUS_HIGHLIGHTED ((ULONG) 0x00000001) -#define FLDSTATUS_TAGGED ((ULONG) 0x00000002) -#define FLDSTATUS_HIDDEN ((ULONG) 0x00000004) -#define FLDSTATUS_DELMARKED ((ULONG) 0x00000008) - -#define MAPI_IMAPIFOLDER_METHODS(IPURE) \ - MAPIMETHOD(CreateMessage) \ - (THIS_ LPCIID lpInterface, \ - ULONG ulFlags, \ - LPMESSAGE FAR * lppMessage) IPURE; \ - MAPIMETHOD(CopyMessages) \ - (THIS_ LPENTRYLIST lpMsgList, \ - LPCIID lpInterface, \ - LPVOID lpDestFolder, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(DeleteMessages) \ - (THIS_ LPENTRYLIST lpMsgList, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(CreateFolder) \ - (THIS_ ULONG ulFolderType, \ - LPTSTR lpszFolderName, \ - LPTSTR lpszFolderComment, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPMAPIFOLDER FAR * lppFolder) IPURE; \ - MAPIMETHOD(CopyFolder) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - LPVOID lpDestFolder, \ - LPTSTR lpszNewFolderName, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(DeleteFolder) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(SetReadFlags) \ - (THIS_ LPENTRYLIST lpMsgList, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetMessageStatus) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulFlags, \ - ULONG FAR * lpulMessageStatus) IPURE; \ - MAPIMETHOD(SetMessageStatus) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulNewStatus, \ - ULONG ulNewStatusMask, \ - ULONG FAR * lpulOldStatus) IPURE; \ - MAPIMETHOD(SaveContentsSort) \ - (THIS_ LPSSortOrderSet lpSortCriteria, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(EmptyFolder) \ - (THIS_ ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIFolder -DECLARE_MAPI_INTERFACE_(IMAPIFolder, IMAPIContainer) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMAPICONTAINER_METHODS(PURE) - MAPI_IMAPIFOLDER_METHODS(PURE) -}; - -/* IMsgStore Interface ----------------------------------------------------- */ - -/* PR_STORE_SUPPORT_MASK bits */ -#define STORE_ENTRYID_UNIQUE ((ULONG) 0x00000001) -#define STORE_READONLY ((ULONG) 0x00000002) -#define STORE_SEARCH_OK ((ULONG) 0x00000004) -#define STORE_MODIFY_OK ((ULONG) 0x00000008) -#define STORE_CREATE_OK ((ULONG) 0x00000010) -#define STORE_ATTACH_OK ((ULONG) 0x00000020) -#define STORE_OLE_OK ((ULONG) 0x00000040) -#define STORE_SUBMIT_OK ((ULONG) 0x00000080) -#define STORE_NOTIFY_OK ((ULONG) 0x00000100) -#define STORE_MV_PROPS_OK ((ULONG) 0x00000200) -#define STORE_CATEGORIZE_OK ((ULONG) 0x00000400) -#define STORE_RTF_OK ((ULONG) 0x00000800) -#define STORE_RESTRICTION_OK ((ULONG) 0x00001000) -#define STORE_SORT_OK ((ULONG) 0x00002000) -#define STORE_PUBLIC_FOLDERS ((ULONG) 0x00004000) -#define STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) - -/* PR_STORE_STATE bits, try not to collide with PR_STORE_SUPPORT_MASK */ - -#define STORE_HAS_SEARCHES ((ULONG) 0x01000000) - - -/* OpenEntry() */ - -/****** MAPI_MODIFY ((ULONG) 0x00000001) above */ -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -/****** MAPI_BEST_ACCESS ((ULONG) 0x00000010) above */ - -/* SetReceiveFolder() */ - -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* GetReceiveFolder() */ - -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* GetReceiveFolderTable() */ - -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ - -/* StoreLogoff() */ - -#define LOGOFF_NO_WAIT ((ULONG) 0x00000001) -#define LOGOFF_ORDERLY ((ULONG) 0x00000002) -#define LOGOFF_PURGE ((ULONG) 0x00000004) -#define LOGOFF_ABORT ((ULONG) 0x00000008) -#define LOGOFF_QUIET ((ULONG) 0x00000010) - -#define LOGOFF_COMPLETE ((ULONG) 0x00010000) -#define LOGOFF_INBOUND ((ULONG) 0x00020000) -#define LOGOFF_OUTBOUND ((ULONG) 0x00040000) -#define LOGOFF_OUTBOUND_QUEUE ((ULONG) 0x00080000) - -/* SetLockState() */ - -#define MSG_LOCKED ((ULONG) 0x00000001) -#define MSG_UNLOCKED ((ULONG) 0x00000000) - -/* Flag bits for PR_VALID_FOLDER_MASK */ - -#define FOLDER_IPM_SUBTREE_VALID ((ULONG) 0x00000001) -#define FOLDER_IPM_INBOX_VALID ((ULONG) 0x00000002) -#define FOLDER_IPM_OUTBOX_VALID ((ULONG) 0x00000004) -#define FOLDER_IPM_WASTEBASKET_VALID ((ULONG) 0x00000008) -#define FOLDER_IPM_SENTMAIL_VALID ((ULONG) 0x00000010) -#define FOLDER_VIEWS_VALID ((ULONG) 0x00000020) -#define FOLDER_COMMON_VIEWS_VALID ((ULONG) 0x00000040) -#define FOLDER_FINDER_VALID ((ULONG) 0x00000080) - -#define MAPI_IMSGSTORE_METHODS(IPURE) \ - MAPIMETHOD(Advise) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulEventMask, \ - LPMAPIADVISESINK lpAdviseSink, \ - ULONG_PTR FAR * lpulConnection) IPURE; \ - MAPIMETHOD(Unadvise) \ - (THIS_ ULONG_PTR ulConnection) IPURE; \ - MAPIMETHOD(CompareEntryIDs) \ - (THIS_ ULONG cbEntryID1, \ - LPENTRYID lpEntryID1, \ - ULONG cbEntryID2, \ - LPENTRYID lpEntryID2, \ - ULONG ulFlags, \ - ULONG FAR * lpulResult) IPURE; \ - MAPIMETHOD(OpenEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(SetReceiveFolder) \ - (THIS_ LPTSTR lpszMessageClass, \ - ULONG ulFlags, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID) IPURE; \ - MAPIMETHOD(GetReceiveFolder) \ - (THIS_ LPTSTR lpszMessageClass, \ - ULONG ulFlags, \ - ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID, \ - LPTSTR FAR * lppszExplicitClass) IPURE; \ - MAPIMETHOD(GetReceiveFolderTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(StoreLogoff) \ - (THIS_ ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(AbortSubmit) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetOutgoingQueue) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(SetLockState) \ - (THIS_ LPMESSAGE lpMessage, \ - ULONG ulLockState) IPURE; \ - MAPIMETHOD(FinishedMsg) \ - (THIS_ ULONG ulFlags, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID) IPURE; \ - MAPIMETHOD(NotifyNewMail) \ - (THIS_ LPNOTIFICATION lpNotification) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMsgStore -DECLARE_MAPI_INTERFACE_(IMsgStore, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMSGSTORE_METHODS(PURE) -}; - -/* IMessage Interface ------------------------------------------------------ */ - -/* SubmitMessage */ - -#define FORCE_SUBMIT ((ULONG) 0x00000001) - -/* Flags defined in PR_MESSAGE_FLAGS */ - -#define MSGFLAG_READ ((ULONG) 0x00000001) -#define MSGFLAG_UNMODIFIED ((ULONG) 0x00000002) -#define MSGFLAG_SUBMIT ((ULONG) 0x00000004) -#define MSGFLAG_UNSENT ((ULONG) 0x00000008) -#define MSGFLAG_HASATTACH ((ULONG) 0x00000010) -#define MSGFLAG_FROMME ((ULONG) 0x00000020) -#define MSGFLAG_ASSOCIATED ((ULONG) 0x00000040) -#define MSGFLAG_RESEND ((ULONG) 0x00000080) -#define MSGFLAG_RN_PENDING ((ULONG) 0x00000100) -#define MSGFLAG_NRN_PENDING ((ULONG) 0x00000200) - -/* Flags defined in PR_SUBMIT_FLAGS */ - -#define SUBMITFLAG_LOCKED ((ULONG) 0x00000001) -#define SUBMITFLAG_PREPROCESS ((ULONG) 0x00000002) - -/* GetAttachmentTable() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* GetRecipientTable() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* ModifyRecipients */ - -/* ((ULONG) 0x00000001 is not a valid flag on ModifyRecipients. */ -#define MODRECIP_ADD ((ULONG) 0x00000002) -#define MODRECIP_MODIFY ((ULONG) 0x00000004) -#define MODRECIP_REMOVE ((ULONG) 0x00000008) - -/* SetReadFlag */ - -#define SUPPRESS_RECEIPT ((ULONG) 0x00000001) -#define CLEAR_READ_FLAG ((ULONG) 0x00000004) -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -#define GENERATE_RECEIPT_ONLY ((ULONG) 0x00000010) -#define CLEAR_RN_PENDING ((ULONG) 0x00000020) -#define CLEAR_NRN_PENDING ((ULONG) 0x00000040) - -/* DeleteAttach */ - -#define ATTACH_DIALOG ((ULONG) 0x00000001) - -/* PR_SECURITY values */ -#define SECURITY_SIGNED ((ULONG) 0x00000001) -#define SECURITY_ENCRYPTED ((ULONG) 0x00000002) - -/* PR_PRIORITY values */ -#define PRIO_URGENT ((long) 1) -#define PRIO_NORMAL ((long) 0) -#define PRIO_NONURGENT ((long) -1) - -/* PR_SENSITIVITY values */ -#define SENSITIVITY_NONE ((ULONG) 0x00000000) -#define SENSITIVITY_PERSONAL ((ULONG) 0x00000001) -#define SENSITIVITY_PRIVATE ((ULONG) 0x00000002) -#define SENSITIVITY_COMPANY_CONFIDENTIAL ((ULONG) 0x00000003) - -/* PR_IMPORTANCE values */ -#define IMPORTANCE_LOW ((long) 0) -#define IMPORTANCE_NORMAL ((long) 1) -#define IMPORTANCE_HIGH ((long) 2) - -#define MAPI_IMESSAGE_METHODS(IPURE) \ - MAPIMETHOD(GetAttachmentTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(OpenAttach) \ - (THIS_ ULONG ulAttachmentNum, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPATTACH FAR * lppAttach) IPURE; \ - MAPIMETHOD(CreateAttach) \ - (THIS_ LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulAttachmentNum, \ - LPATTACH FAR * lppAttach) IPURE; \ - MAPIMETHOD(DeleteAttach) \ - (THIS_ ULONG ulAttachmentNum, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetRecipientTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(ModifyRecipients) \ - (THIS_ ULONG ulFlags, \ - LPADRLIST lpMods) IPURE; \ - MAPIMETHOD(SubmitMessage) \ - (THIS_ ULONG ulFlags) IPURE; \ - MAPIMETHOD(SetReadFlag) \ - (THIS_ ULONG ulFlags) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMessage -DECLARE_MAPI_INTERFACE_(IMessage, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IMESSAGE_METHODS(PURE) -}; - -/* IAttach Interface ------------------------------------------------------- */ - -/* IAttach attachment methods: PR_ATTACH_METHOD values */ - -#define NO_ATTACHMENT ((ULONG) 0x00000000) -#define ATTACH_BY_VALUE ((ULONG) 0x00000001) -#define ATTACH_BY_REFERENCE ((ULONG) 0x00000002) -#define ATTACH_BY_REF_RESOLVE ((ULONG) 0x00000003) -#define ATTACH_BY_REF_ONLY ((ULONG) 0x00000004) -#define ATTACH_EMBEDDED_MSG ((ULONG) 0x00000005) -#define ATTACH_OLE ((ULONG) 0x00000006) - -#define MAPI_IATTACH_METHODS(IPURE) - -#undef INTERFACE -#define INTERFACE IAttach -DECLARE_MAPI_INTERFACE_(IAttach, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IATTACH_METHODS(PURE) -}; - -/* --------------------------------- */ -/* Address Book interface definition */ - -/* ADRPARM ulFlags - top 4 bits used for versioning */ - -#define GET_ADRPARM_VERSION(ulFlags) (((ULONG)ulFlags) & 0xF0000000) -#define SET_ADRPARM_VERSION(ulFlags, ulVersion) (((ULONG)ulVersion) | (((ULONG)ulFlags) & 0x0FFFFFFF)) - -/* Current versions of ADRPARM */ -#define ADRPARM_HELP_CTX ((ULONG) 0x00000000) - - -/* ulFlags - bit fields */ -#define DIALOG_MODAL ((ULONG) 0x00000001) -#define DIALOG_SDI ((ULONG) 0x00000002) -#define DIALOG_OPTIONS ((ULONG) 0x00000004) -#define ADDRESS_ONE ((ULONG) 0x00000008) -#define AB_SELECTONLY ((ULONG) 0x00000010) -#define AB_RESOLVE ((ULONG) 0x00000020) - -/* --------------------------------- */ -/* PR_DISPLAY_TYPEs */ -/* - * These standard display types are - * by default handled by MAPI. - * They have default icons associated - * with them. - */ - -/* For address book contents tables */ -#define DT_MAILUSER ((ULONG) 0x00000000) -#define DT_DISTLIST ((ULONG) 0x00000001) -#define DT_FORUM ((ULONG) 0x00000002) -#define DT_AGENT ((ULONG) 0x00000003) -#define DT_ORGANIZATION ((ULONG) 0x00000004) -#define DT_PRIVATE_DISTLIST ((ULONG) 0x00000005) -#define DT_REMOTE_MAILUSER ((ULONG) 0x00000006) - -/* For address book hierarchy tables */ -#define DT_MODIFIABLE ((ULONG) 0x00010000) -#define DT_GLOBAL ((ULONG) 0x00020000) -#define DT_LOCAL ((ULONG) 0x00030000) -#define DT_WAN ((ULONG) 0x00040000) -#define DT_NOT_SPECIFIC ((ULONG) 0x00050000) - -/* For folder hierarchy tables */ -#define DT_FOLDER ((ULONG) 0x01000000) -#define DT_FOLDER_LINK ((ULONG) 0x02000000) -#define DT_FOLDER_SPECIAL ((ULONG) 0x04000000) - -/* Accelerator callback for DIALOG_SDI form of AB UI */ -typedef BOOL (STDMETHODCALLTYPE ACCELERATEABSDI)(ULONG_PTR ulUIParam, - LPVOID lpvmsg); -typedef ACCELERATEABSDI FAR * LPFNABSDI; - -/* Callback to application telling it that the DIALOG_SDI form of the */ -/* AB UI has been dismissed. This is so that the above LPFNABSDI */ -/* function doesn't keep being called. */ -typedef void (STDMETHODCALLTYPE DISMISSMODELESS)(ULONG_PTR ulUIParam, - LPVOID lpvContext); -typedef DISMISSMODELESS FAR * LPFNDISMISS; - -/* - * Prototype for the client function hooked to an optional button on - * the address book dialog - */ - -typedef SCODE (STDMETHODCALLTYPE FAR * LPFNBUTTON)( - ULONG_PTR ulUIParam, - LPVOID lpvContext, - ULONG cbEntryID, - LPENTRYID lpSelection, - ULONG ulFlags -); - - -/* Parameters for the address book dialog */ -typedef struct _ADRPARM -{ - ULONG cbABContEntryID; - LPENTRYID lpABContEntryID; - ULONG ulFlags; - - LPVOID lpReserved; - ULONG ulHelpContext; - LPTSTR lpszHelpFileName; - - LPFNABSDI lpfnABSDI; - LPFNDISMISS lpfnDismiss; - LPVOID lpvDismissContext; - LPTSTR lpszCaption; - LPTSTR lpszNewEntryTitle; - LPTSTR lpszDestWellsTitle; - ULONG cDestFields; - ULONG nDestFieldFocus; - LPTSTR FAR * lppszDestTitles; - ULONG FAR * lpulDestComps; - LPSRestriction lpContRestriction; - LPSRestriction lpHierRestriction; -} ADRPARM, FAR * LPADRPARM; - - -/* ------------ */ -/* Random flags */ - -/* Flag for deferred error */ -#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) - -/* Flag for creating and using Folder Associated Information Messages */ -#define MAPI_ASSOCIATED ((ULONG) 0x00000040) - -/* Flags for OpenMessageStore() */ - -#define MDB_NO_DIALOG ((ULONG) 0x00000001) -#define MDB_WRITE ((ULONG) 0x00000004) -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) above */ -/****** MAPI_BEST_ACCESS ((ULONG) 0x00000010) above */ -#define MDB_TEMPORARY ((ULONG) 0x00000020) -#define MDB_NO_MAIL ((ULONG) 0x00000080) - -/* Flags for OpenAddressBook */ - -#define AB_NO_DIALOG ((ULONG) 0x00000001) - -/* IMAPIControl Interface -------------------------------------------------- */ - -/* Interface used in controls (particularly the button) defined by */ -/* Display Tables. */ - -/* Flags for GetState */ - -#define MAPI_ENABLED ((ULONG) 0x00000000) -#define MAPI_DISABLED ((ULONG) 0x00000001) - -#define MAPI_IMAPICONTROL_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Activate) \ - (THIS_ ULONG ulFlags, \ - ULONG_PTR ulUIParam) IPURE; \ - MAPIMETHOD(GetState) \ - (THIS_ ULONG ulFlags, \ - ULONG FAR * lpulState) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIControl -DECLARE_MAPI_INTERFACE_(IMAPIControl, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPICONTROL_METHODS(PURE) -}; - -DECLARE_MAPI_INTERFACE_PTR(IMAPIControl, LPMAPICONTROL); - -/* Display Tables ---------------------------------------------------------- */ - -/* Flags used in display tables - that is, PR_CONTROL_FLAGS */ - -#define DT_MULTILINE ((ULONG) 0x00000001) -#define DT_EDITABLE ((ULONG) 0x00000002) -#define DT_REQUIRED ((ULONG) 0x00000004) -#define DT_SET_IMMEDIATE ((ULONG) 0x00000008) -#define DT_PASSWORD_EDIT ((ULONG) 0x00000010) -#define DT_ACCEPT_DBCS ((ULONG) 0x00000020) -#define DT_SET_SELECTION ((ULONG) 0x00000040) - -/* Display Table structures */ - -#define DTCT_LABEL ((ULONG) 0x00000000) -#define DTCT_EDIT ((ULONG) 0x00000001) -#define DTCT_LBX ((ULONG) 0x00000002) -#define DTCT_COMBOBOX ((ULONG) 0x00000003) -#define DTCT_DDLBX ((ULONG) 0x00000004) -#define DTCT_CHECKBOX ((ULONG) 0x00000005) -#define DTCT_GROUPBOX ((ULONG) 0x00000006) -#define DTCT_BUTTON ((ULONG) 0x00000007) -#define DTCT_PAGE ((ULONG) 0x00000008) -#define DTCT_RADIOBUTTON ((ULONG) 0x00000009) -#define DTCT_MVLISTBOX ((ULONG) 0x0000000B) -#define DTCT_MVDDLBX ((ULONG) 0x0000000C) - -/* Labels */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLLABEL -{ - ULONG ulbLpszLabelName; - ULONG ulFlags; -} DTBLLABEL, FAR * LPDTBLLABEL; -#define SizedDtblLabel(n,u) \ -struct _DTBLLABEL_ ## u \ -{ \ - DTBLLABEL dtbllabel; \ - TCHAR lpszLabelName[n]; \ -} u - - -/* Simple Text Edits */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLEDIT -{ - ULONG ulbLpszCharsAllowed; - ULONG ulFlags; - ULONG ulNumCharsAllowed; - ULONG ulPropTag; -} DTBLEDIT, FAR * LPDTBLEDIT; -#define SizedDtblEdit(n,u) \ -struct _DTBLEDIT_ ## u \ -{ \ - DTBLEDIT dtbledit; \ - TCHAR lpszCharsAllowed[n]; \ -} u - -/* List Box */ -/* Valid ulFlags: - */ -#define MAPI_NO_HBAR ((ULONG) 0x00000001) -#define MAPI_NO_VBAR ((ULONG) 0x00000002) - -typedef struct _DTBLLBX -{ - ULONG ulFlags; - ULONG ulPRSetProperty; - ULONG ulPRTableName; -} DTBLLBX, FAR * LPDTBLLBX; - - -/* Combo Box */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLCOMBOBOX -{ - ULONG ulbLpszCharsAllowed; - ULONG ulFlags; - ULONG ulNumCharsAllowed; - ULONG ulPRPropertyName; - ULONG ulPRTableName; -} DTBLCOMBOBOX, FAR * LPDTBLCOMBOBOX; -#define SizedDtblComboBox(n,u) \ -struct _DTBLCOMBOBOX_ ## u \ -{ \ - DTBLCOMBOBOX dtblcombobox; \ - TCHAR lpszCharsAllowed[n]; \ -} u - - -/* Drop Down */ -/* Valid ulFlags: - * none - */ -typedef struct _DTBLDDLBX -{ - ULONG ulFlags; - ULONG ulPRDisplayProperty; - ULONG ulPRSetProperty; - ULONG ulPRTableName; -} DTBLDDLBX, FAR * LPDTBLDDLBX; - - -/* Check Box */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLCHECKBOX -{ - ULONG ulbLpszLabel; - ULONG ulFlags; - ULONG ulPRPropertyName; -} DTBLCHECKBOX, FAR * LPDTBLCHECKBOX; -#define SizedDtblCheckBox(n,u) \ -struct _DTBLCHECKBOX_ ## u \ -{ \ - DTBLCHECKBOX dtblcheckbox; \ - TCHAR lpszLabel[n]; \ -} u - - - -/* Group Box */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLGROUPBOX -{ - ULONG ulbLpszLabel; - ULONG ulFlags; -} DTBLGROUPBOX, FAR * LPDTBLGROUPBOX; -#define SizedDtblGroupBox(n,u) \ -struct _DTBLGROUPBOX_ ## u \ -{ \ - DTBLGROUPBOX dtblgroupbox; \ - TCHAR lpszLabel[n]; \ -} u - -/* Button control */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLBUTTON -{ - ULONG ulbLpszLabel; - ULONG ulFlags; - ULONG ulPRControl; -} DTBLBUTTON, FAR * LPDTBLBUTTON; -#define SizedDtblButton(n,u) \ -struct _DTBLBUTTON_ ## u \ -{ \ - DTBLBUTTON dtblbutton; \ - TCHAR lpszLabel[n]; \ -} u - -/* Pages */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLPAGE -{ - ULONG ulbLpszLabel; - ULONG ulFlags; - ULONG ulbLpszComponent; - ULONG ulContext; -} DTBLPAGE, FAR * LPDTBLPAGE; -#define SizedDtblPage(n,n1,u) \ -struct _DTBLPAGE_ ## u \ -{ \ - DTBLPAGE dtblpage; \ - TCHAR lpszLabel[n]; \ - TCHAR lpszComponent[n1]; \ -} u - -/* Radio button */ -/* Valid ulFlags: - * MAPI_UNICODE - */ -typedef struct _DTBLRADIOBUTTON -{ - ULONG ulbLpszLabel; - ULONG ulFlags; - ULONG ulcButtons; - ULONG ulPropTag; - long lReturnValue; -} DTBLRADIOBUTTON, FAR * LPDTBLRADIOBUTTON; -#define SizedDtblRadioButton(n,u) \ -struct _DTBLRADIOBUTTON_ ## u \ -{ \ - DTBLRADIOBUTTON dtblradiobutton; \ - TCHAR lpszLabel[n]; \ -} u - - -/* MultiValued listbox */ -/* Valid ulFlags: - * none - */ -typedef struct _DTBLMVLISTBOX -{ - ULONG ulFlags; - ULONG ulMVPropTag; -} DTBLMVLISTBOX, FAR * LPDTBLMVLISTBOX; - - -/* MultiValued dropdown */ -/* Valid ulFlags: - * none - */ -typedef struct _DTBLMVDDLBX -{ - ULONG ulFlags; - ULONG ulMVPropTag; -} DTBLMVDDLBX, FAR * LPDTBLMVDDLBX; - - - - - -/* IProviderAdmin Interface ---------------------------------------------- */ - -/* Flags for ConfigureMsgService */ - -#define UI_SERVICE 0x00000002 -#define SERVICE_UI_ALWAYS 0x00000002 /* Duplicate UI_SERVICE for consistency and compatibility */ -#define SERVICE_UI_ALLOWED 0x00000010 -#define UI_CURRENT_PROVIDER_FIRST 0x00000004 -/* MSG_SERVICE_UI_READ_ONLY 0x00000008 - in MAPISPI.H */ - -/* GetProviderTable() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ - -/* Values for PR_RESOURCE_FLAGS in message service table */ - -#define MAPI_IPROVIDERADMIN_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetProviderTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(CreateProvider) \ - (THIS_ LPTSTR lpszProvider, \ - ULONG cValues, \ - LPSPropValue lpProps, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - MAPIUID FAR * lpUID) IPURE; \ - MAPIMETHOD(DeleteProvider) \ - (THIS_ LPMAPIUID lpUID) IPURE; \ - MAPIMETHOD(OpenProfileSection) \ - (THIS_ LPMAPIUID lpUID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPPROFSECT FAR * lppProfSect) IPURE; \ - - -#undef INTERFACE -#define INTERFACE IProviderAdmin -DECLARE_MAPI_INTERFACE_(IProviderAdmin, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IPROVIDERADMIN_METHODS(PURE) -}; - - - -/* IMAPIClientShutdown Interface ----------------------------------------- */ -DECLARE_MAPI_INTERFACE_PTR(IMAPIClientShutdown, LPMAPICLIENTSHUTDOWN); - -#define MAPI_IMAPICLIENTSHUTDOWN_METHODS(IPURE) \ - MAPIMETHOD(QueryFastShutdown) \ - (THIS) IPURE; \ - MAPIMETHOD(NotifyProcessShutdown) \ - (THIS) IPURE; \ - MAPIMETHOD(DoFastShutdown) \ - (THIS) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIClientShutdown -DECLARE_MAPI_INTERFACE_(IMAPIClientShutdown, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPICLIENTSHUTDOWN_METHODS(PURE) -}; - - -/* IMAPIProviderShutdown Interface --------------------------------------- */ -DECLARE_MAPI_INTERFACE_PTR(IMAPIProviderShutdown, LPMAPIPROVIDERSHUTDOWN); - -#define MAPI_IMAPIPROVIDERSHUTDOWN_METHODS(IPURE) \ - MAPIMETHOD(QueryFastShutdown) \ - (THIS) IPURE; \ - MAPIMETHOD(NotifyProcessShutdown) \ - (THIS) IPURE; \ - MAPIMETHOD(DoFastShutdown) \ - (THIS) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIProviderShutdown -DECLARE_MAPI_INTERFACE_(IMAPIProviderShutdown, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROVIDERSHUTDOWN_METHODS(PURE) -}; - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* MAPIDEFS_H */ - - +/* + * M A P I D E F S . H + * + * Definitions used by MAPI clients and service providers. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPIDEFS_H +#define MAPIDEFS_H + +#if _MSC_VER > 1000 +#pragma once +#endif + +#if defined (WIN64) && !defined (_WIN64) +#define _WIN64 +#endif + +/* + * Under Win64 systems Win32 is also defined for backwards compatibility. + */ + +#if defined (WIN32) && !defined (_WIN32) +#define _WIN32 +#endif + +#if defined (_WIN64) || defined(_WIN32) || defined (_M_ARM) /* Must include WINDOWS.H on Win32/Win64 */ +#ifndef _WINDOWS_ +#define INC_OLE2 /* Get the OLE2 stuff */ +#define INC_RPC /* harmless on Windows NT; Windows 95 needs it */ +#define _INC_OLE /* Windows 95 will include OLE1 without this */ +#include +#endif + +#ifndef _OLEERROR_H_ +#include +#endif +#ifndef _OBJBASE_H_ +#include +#endif +#endif + +#if defined (DOS) +#ifndef _COMPOBJ_H_ +#include +#endif +#endif + +#ifndef _INC_STDDEF +#include +#endif + +/* Array dimension for structures with variable-sized arrays at the end. */ + +#pragma warning(push) +#pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union + +#ifndef MAPI_DIM +#define MAPI_DIM 1 +#endif + +/* Provider init type. Force to cdecl always */ + +#ifndef STDMAPIINITCALLTYPE +#if defined (_WIN64) || defined(_WIN32) || defined (_M_ARM) +#define STDMAPIINITCALLTYPE __cdecl +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif +#define STDINITMETHODIMP HRESULT STDMAPIINITCALLTYPE +#define STDINITMETHODIMP_(type) type STDMAPIINITCALLTYPE +#endif + + +#define MAPI_NT_SERVICE ((ULONG) 0x00010000) /* Provider is being loaded in an NT service */ + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Simple data types */ + +#if !defined (MIDL_PASS) /* MIDL doesn't want to see these */ + +typedef wchar_t WCHAR; // wc, 16-bit UNICODE character + +#ifdef UNICODE +typedef WCHAR TCHAR; +#else +typedef char TCHAR; +#endif + + +#if _SAL_VERSION >= 20 +typedef _Null_terminated_ WCHAR FAR * LPWSTR; +typedef _Null_terminated_ const WCHAR FAR * LPCWSTR; +#else +typedef WCHAR FAR * LPWSTR; +typedef const WCHAR FAR * LPCWSTR; +#endif +typedef TCHAR FAR * LPTSTR; +typedef const TCHAR FAR * LPCTSTR; +typedef BYTE FAR * LPBYTE; +#endif /* defined MIDL_PASS */ + +#if !defined(_LPULONG_DEFINED) //+MS_TARGET_APPLE +#define _LPULONG_DEFINED +typedef ULONG FAR * LPULONG; +#endif //_LPULONG_DEFINED + +#ifndef __LHANDLE +#define __LHANDLE +typedef ULONG_PTR LHANDLE, FAR * LPLHANDLE; +#endif + +#if !defined(_WINBASE_) && !defined(_FILETIME_) +#define _FILETIME_ +typedef struct _FILETIME +{ + DWORD dwLowDateTime; + DWORD dwHighDateTime; +} FILETIME, FAR * LPFILETIME; +#endif + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +/* + * This flag is used in many different MAPI calls to signify that + * the object opened by the call should be modifiable (MAPI_MODIFY). + * If the flag MAPI_MAX_ACCESS is set, the object returned should be + * returned at the maximum access level allowed. An additional + * property available on the object (PR_ACCESS_LEVEL) uses the same + * MAPI_MODIFY flag to say just what this new access level is. + */ + +#define MAPI_MODIFY ((ULONG) 0x00000001) + +/* + * The following flags are used to indicate to the client what access + * level is permissible in the object. They appear in PR_ACCESS in + * message and folder objects as well as in contents and associated + * contents tables + */ + +#define MAPI_ACCESS_MODIFY ((ULONG) 0x00000001) +#define MAPI_ACCESS_READ ((ULONG) 0x00000002) +#define MAPI_ACCESS_DELETE ((ULONG) 0x00000004) +#define MAPI_ACCESS_CREATE_HIERARCHY ((ULONG) 0x00000008) +#define MAPI_ACCESS_CREATE_CONTENTS ((ULONG) 0x00000010) +#define MAPI_ACCESS_CREATE_ASSOCIATED ((ULONG) 0x00000020) + +/* + * The MAPI_UNICODE flag is used in many different MAPI calls to signify + * that strings passed through the interface are in Unicode (a 16-bit + * character set). The default is an 8-bit character set. + * + * The value fMapiUnicode can be used as the 'normal' value for + * that bit, given the application's default character set. + */ + +#define MAPI_UNICODE ((ULONG) 0x80000000) + +#ifdef UNICODE +#define fMapiUnicode MAPI_UNICODE +#else +#define fMapiUnicode 0 +#endif + +/* successful HRESULT */ +#define hrSuccess 0 + + + +/* Recipient types */ +#ifndef MAPI_ORIG /* also defined in mapi.h */ +#define MAPI_ORIG 0 /* Recipient is message originator */ +#define MAPI_TO 1 /* Recipient is a primary recipient */ +#define MAPI_CC 2 /* Recipient is a copy recipient */ +#define MAPI_BCC 3 /* Recipient is blind copy recipient */ +#define MAPI_P1 0x10000000 /* Recipient is a P1 resend recipient */ +#define MAPI_SUBMITTED 0x80000000 /* Recipient is already processed */ +/* #define MAPI_AUTHORIZE 4 recipient is a CMC authorizing user */ +/*#define MAPI_DISCRETE 0x10000000 Recipient is a P1 resend recipient */ +#endif + +/* Bit definitions for abFlags[0] of ENTRYID */ +#define MAPI_SHORTTERM 0x80 +#define MAPI_NOTRECIP 0x40 +#define MAPI_THISSESSION 0x20 +#define MAPI_NOW 0x10 +#define MAPI_NOTRESERVED 0x08 + +/* Bit definitions for abFlags[1] of ENTRYID */ +#define MAPI_COMPOUND 0x80 + +/* ENTRYID */ +typedef struct +{ + BYTE abFlags[4]; + BYTE ab[MAPI_DIM]; +} ENTRYID, FAR *LPENTRYID; + +#define CbNewENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb)) +#define CbENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb)) +#define SizedENTRYID(_cb, _name) \ + struct _ENTRYID_ ## _name \ +{ \ + BYTE abFlags[4]; \ + BYTE ab[_cb]; \ +} _name + +/* Byte-order-independent version of GUID (world-unique identifier) */ +typedef struct _MAPIUID +{ + BYTE ab[16]; +} MAPIUID, FAR * LPMAPIUID; + +/* Note: need to include C run-times (memory.h) to use this macro */ + +#define IsEqualMAPIUID(lpuid1, lpuid2) (!memcmp(lpuid1, lpuid2, sizeof(MAPIUID))) + +/* + * Constants for one-off entry ID: + * The MAPIUID that identifies the one-off provider; + * the flag that defines whether the embedded strings are Unicode; + * the flag that specifies whether the recipient gets TNEF or not. + */ + +#define MAPI_ONE_OFF_UID { 0x81, 0x2b, 0x1f, 0xa4, 0xbe, 0xa3, 0x10, 0x19, \ + 0x9d, 0x6e, 0x00, 0xdd, 0x01, 0x0f, 0x54, 0x02 } +#define MAPI_ONE_OFF_UNICODE 0x8000 +#define MAPI_ONE_OFF_NO_RICH_INFO 0x0001 + +/* Object type */ + +#define MAPI_STORE ((ULONG) 0x00000001) /* Message Store */ +#define MAPI_ADDRBOOK ((ULONG) 0x00000002) /* Address Book */ +#define MAPI_FOLDER ((ULONG) 0x00000003) /* Folder */ +#define MAPI_ABCONT ((ULONG) 0x00000004) /* Address Book Container */ +#define MAPI_MESSAGE ((ULONG) 0x00000005) /* Message */ +#define MAPI_MAILUSER ((ULONG) 0x00000006) /* Individual Recipient */ +#define MAPI_ATTACH ((ULONG) 0x00000007) /* Attachment */ +#define MAPI_DISTLIST ((ULONG) 0x00000008) /* Distribution List Recipient */ +#define MAPI_PROFSECT ((ULONG) 0x00000009) /* Profile Section */ +#define MAPI_STATUS ((ULONG) 0x0000000A) /* Status Object */ +#define MAPI_SESSION ((ULONG) 0x0000000B) /* Session */ +#define MAPI_FORMINFO ((ULONG) 0x0000000C) /* Form Information */ + + +/* + * Maximum length of profile names and passwords, not including + * the null termination character. + */ +#ifndef cchProfileNameMax +#define cchProfileNameMax 64 +#define cchProfilePassMax 64 +#endif + + +/* Property Types */ + +#define MV_FLAG 0x1000 /* Multi-value flag */ + +#define PT_UNSPECIFIED ((ULONG) 0) /* (Reserved for interface use) type doesn't matter to caller */ +#define PT_NULL ((ULONG) 1) /* NULL property value */ +#define PT_I2 ((ULONG) 2) /* Signed 16-bit value */ +#define PT_LONG ((ULONG) 3) /* Signed 32-bit value */ +#define PT_R4 ((ULONG) 4) /* 4-byte floating point */ +#define PT_DOUBLE ((ULONG) 5) /* Floating point double */ +#define PT_CURRENCY ((ULONG) 6) /* Signed 64-bit int (decimal w/ 4 digits right of decimal pt) */ +#define PT_APPTIME ((ULONG) 7) /* Application time */ +#define PT_ERROR ((ULONG) 10) /* 32-bit error value */ +#define PT_BOOLEAN ((ULONG) 11) /* 16-bit boolean (non-zero true) */ +#define PT_OBJECT ((ULONG) 13) /* Embedded object in a property */ +#define PT_I8 ((ULONG) 20) /* 8-byte signed integer */ +#define PT_STRING8 ((ULONG) 30) /* Null terminated 8-bit character string */ +#define PT_UNICODE ((ULONG) 31) /* Null terminated Unicode string */ +#define PT_SYSTIME ((ULONG) 64) /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */ +#define PT_CLSID ((ULONG) 72) /* OLE GUID */ +#define PT_BINARY ((ULONG) 258) /* Uninterpreted (counted byte array) */ +#define PT_PTR ((ULONG) 259) /* Pointer Variable, scales to the platform */ +/* Changes are likely to these numbers, and to their structures. */ + +/* Alternate property type names for ease of use */ +#define PT_SHORT PT_I2 +#define PT_I4 PT_LONG +#define PT_FLOAT PT_R4 +#define PT_R8 PT_DOUBLE +#define PT_LONGLONG PT_I8 + +/* + * The type of a MAPI-defined string property is indirected, so + * that it defaults to Unicode string on a Unicode platform and to + * String8 on an ANSI or DBCS platform. + * + * Macros are defined here both for the property type, and for the + * field of the property value structure which should be + * dereferenced to obtain the string pointer. + */ + +#ifdef UNICODE +#define PT_TSTRING PT_UNICODE +#define PT_MV_TSTRING (MV_FLAG|PT_UNICODE) +#define LPSZ lpszW +#define LPPSZ lppszW +#define MVSZ MVszW +#else +#define PT_TSTRING PT_STRING8 +#define PT_MV_TSTRING (MV_FLAG|PT_STRING8) +#define LPSZ lpszA +#define LPPSZ lppszA +#define MVSZ MVszA +#endif + + +/* Property Tags + * + * By convention, MAPI never uses 0 or FFFF as a property ID. + * Use as null values, initializers, sentinels, or what have you. + */ + +#define PROP_TYPE_MASK ((ULONG)0x0000FFFF) /* Mask for Property type */ +#define PROP_TYPE(ulPropTag) (((ULONG)(ulPropTag))&PROP_TYPE_MASK) +#define PROP_ID(ulPropTag) (((ULONG)(ulPropTag))>>16) +#define PROP_TAG(ulPropType,ulPropID) ((((ULONG)(ulPropID))<<16)|((ULONG)(ulPropType))) +#define PROP_ID_NULL 0 +#define PROP_ID_INVALID 0xFFFF +#define PR_NULL PROP_TAG( PT_NULL, PROP_ID_NULL) +#define CHANGE_PROP_TYPE(ulPropTag, ulPropType) \ + (((ULONG)0xFFFF0000 & (ulPropTag)) | (ulPropType)) + + +/* Multi-valued Property Types */ + +#define PT_MV_I2 (MV_FLAG|PT_I2) +#define PT_MV_LONG (MV_FLAG|PT_LONG) +#define PT_MV_R4 (MV_FLAG|PT_R4) +#define PT_MV_DOUBLE (MV_FLAG|PT_DOUBLE) +#define PT_MV_CURRENCY (MV_FLAG|PT_CURRENCY) +#define PT_MV_APPTIME (MV_FLAG|PT_APPTIME) +#define PT_MV_SYSTIME (MV_FLAG|PT_SYSTIME) +#define PT_MV_STRING8 (MV_FLAG|PT_STRING8) +#define PT_MV_BINARY (MV_FLAG|PT_BINARY) +#define PT_MV_UNICODE (MV_FLAG|PT_UNICODE) +#define PT_MV_CLSID (MV_FLAG|PT_CLSID) +#define PT_MV_I8 (MV_FLAG|PT_I8) + +/* Alternate property type names for ease of use */ +#define PT_MV_SHORT PT_MV_I2 +#define PT_MV_I4 PT_MV_LONG +#define PT_MV_FLOAT PT_MV_R4 +#define PT_MV_R8 PT_MV_DOUBLE +#define PT_MV_LONGLONG PT_MV_I8 + +/* + * Property type reserved bits + * + * MV_INSTANCE is used as a flag in table operations to request + * that a multi-valued property be presented as a single-valued + * property appearing in multiple rows. + */ + +#define MV_INSTANCE 0x2000 +#define MVI_FLAG (MV_FLAG | MV_INSTANCE) +#define MVI_PROP(tag) ((tag) | MVI_FLAG) + +/* --------------- */ +/* Data Structures */ +/* --------------- */ + +/* Property Tag Array */ + +typedef struct _SPropTagArray +{ + ULONG cValues; + ULONG aulPropTag[MAPI_DIM]; +} SPropTagArray, FAR * LPSPropTagArray; + +#define CbNewSPropTagArray(_ctag) \ + (offsetof(SPropTagArray,aulPropTag) + (_ctag)*sizeof(ULONG)) +#define CbSPropTagArray(_lparray) \ + (offsetof(SPropTagArray,aulPropTag) + \ + (UINT)((_lparray)->cValues)*sizeof(ULONG)) +/* SPropTagArray */ +#define SizedSPropTagArray(_ctag, _name) \ +struct _SPropTagArray_ ## _name \ +{ \ + ULONG cValues; \ + ULONG aulPropTag[_ctag]; \ +} _name + +/* -------------- */ +/* Property Value */ +/* -------------- */ + +#if !MS_TARGET_APPLE +typedef struct _SPropValue SPropValue; +#endif + + +/* 32-bit CURRENCY definition stolen from oaidl.h */ +/* 16-bit CURRENCY definition stolen from variant.h */ + +#ifndef _tagCY_DEFINED +#define _tagCY_DEFINED +#define _CY_DEFINED +#if defined (DOS) && !defined (_VARIANT_H_) +typedef struct FARSTRUCT tagCY { +#if TARGET_RT_BIG_ENDIAN //def _MAC //MS_TARGET_APPLE: _MAC is obsolete + LONG Hi; + LONG Lo; +#else + ULONG Lo; + LONG Hi; +#endif +} CY; +#elif defined (_WIN64) || defined(_WIN32) || defined (_M_ARM) +/* real definition that makes the C++ compiler happy */ +typedef union tagCY { + struct { +#if TARGET_RT_BIG_ENDIAN //def _MAC //MS_TARGET_APPLE: _MAC is obsolete + LONG Hi; + LONG Lo; +#else + ULONG Lo; + LONG Hi; +#endif + }; + LONGLONG int64; +} CY; +#endif +#endif + /* size is 8 */ +#if !defined(_CURRENCY_DEFINED) //+MS_TARGET_APPLE +#define _CURRENCY_DEFINED +typedef CY CURRENCY; +#endif //!_CURRENCY_DEFINED +MS_TARGET_APPLE + +typedef struct _SBinary +{ + ULONG cb; + LPBYTE lpb; +} SBinary, FAR *LPSBinary; + +typedef struct _SShortArray +{ + ULONG cValues; + short int FAR *lpi; +} SShortArray; + +typedef struct _SGuidArray +{ + ULONG cValues; + GUID FAR *lpguid; +} SGuidArray; + +typedef struct _SRealArray +{ + ULONG cValues; + float FAR *lpflt; +} SRealArray; + +typedef struct _SLongArray +{ + ULONG cValues; + LONG FAR *lpl; +} SLongArray; + +typedef struct _SLargeIntegerArray +{ + ULONG cValues; + LARGE_INTEGER FAR *lpli; +} SLargeIntegerArray; + +typedef struct _SDateTimeArray +{ + ULONG cValues; + FILETIME FAR *lpft; +} SDateTimeArray; + +typedef struct _SAppTimeArray +{ + ULONG cValues; + double FAR *lpat; +} SAppTimeArray; + +typedef struct _SCurrencyArray +{ + ULONG cValues; + CURRENCY FAR *lpcur; +} SCurrencyArray; + +typedef struct _SBinaryArray +{ + ULONG cValues; + SBinary FAR *lpbin; +} SBinaryArray; + +typedef struct _SDoubleArray +{ + ULONG cValues; + double FAR *lpdbl; +} SDoubleArray; + +typedef struct _SWStringArray +{ + ULONG cValues; + LPWSTR FAR *lppszW; +} SWStringArray; + +typedef struct _SLPSTRArray +{ + ULONG cValues; + LPSTR FAR *lppszA; +} SLPSTRArray; + +typedef union _PV +{ + short int i; /* case PT_I2 */ + LONG l; /* case PT_LONG */ + ULONG ul; /* alias for PT_LONG */ + LPVOID lpv; /* alias for PT_PTR */ + float flt; /* case PT_R4 */ + double dbl; /* case PT_DOUBLE */ + unsigned short int b; /* case PT_BOOLEAN */ + CURRENCY cur; /* case PT_CURRENCY */ + double at; /* case PT_APPTIME */ + FILETIME ft; /* case PT_SYSTIME */ + LPSTR lpszA; /* case PT_STRING8 */ + SBinary bin; /* case PT_BINARY */ + LPWSTR lpszW; /* case PT_UNICODE */ + LPGUID lpguid; /* case PT_CLSID */ + LARGE_INTEGER li; /* case PT_I8 */ + SShortArray MVi; /* case PT_MV_I2 */ + SLongArray MVl; /* case PT_MV_LONG */ + SRealArray MVflt; /* case PT_MV_R4 */ + SDoubleArray MVdbl; /* case PT_MV_DOUBLE */ + SCurrencyArray MVcur; /* case PT_MV_CURRENCY */ + SAppTimeArray MVat; /* case PT_MV_APPTIME */ + SDateTimeArray MVft; /* case PT_MV_SYSTIME */ + SBinaryArray MVbin; /* case PT_MV_BINARY */ + SLPSTRArray MVszA; /* case PT_MV_STRING8 */ + SWStringArray MVszW; /* case PT_MV_UNICODE */ + SGuidArray MVguid; /* case PT_MV_CLSID */ + SLargeIntegerArray MVli; /* case PT_MV_I8 */ + SCODE err; /* case PT_ERROR */ + LONG x; /* case PT_NULL, PT_OBJECT (no usable value) */ +} __UPV; + +typedef struct _SPropValue +{ + ULONG ulPropTag; + ULONG dwAlignPad; + union _PV Value; +} SPropValue, FAR * LPSPropValue; + + +/* --------------------------------------------- */ +/* Property Problem and Property Problem Arrays */ +/* --------------------------------------------- */ + +typedef struct _SPropProblem +{ + ULONG ulIndex; + ULONG ulPropTag; + SCODE scode; +} SPropProblem, FAR * LPSPropProblem; + +typedef struct _SPropProblemArray +{ + ULONG cProblem; + SPropProblem aProblem[MAPI_DIM]; +} SPropProblemArray, FAR * LPSPropProblemArray; + +#define CbNewSPropProblemArray(_cprob) \ + (offsetof(SPropProblemArray,aProblem) + (_cprob)*sizeof(SPropProblem)) +#define CbSPropProblemArray(_lparray) \ + (offsetof(SPropProblemArray,aProblem) + \ + (UINT) ((_lparray)->cProblem*sizeof(SPropProblem))) +#define SizedSPropProblemArray(_cprob, _name) \ +struct _SPropProblemArray_ ## _name \ +{ \ + ULONG cProblem; \ + SPropProblem aProblem[_cprob]; \ +} _name + +/* + * ENTRYLIST + */ + +typedef SBinaryArray ENTRYLIST, FAR *LPENTRYLIST; + +/* + * FLATENTRYLIST + * MTSID + * FLATMTSIDLIST + */ + +typedef struct { + ULONG cb; + BYTE abEntry[MAPI_DIM]; +} FLATENTRY, FAR *LPFLATENTRY; + +typedef struct { + ULONG cEntries; + ULONG cbEntries; + BYTE abEntries[MAPI_DIM]; +} FLATENTRYLIST, FAR *LPFLATENTRYLIST; + +typedef struct { + ULONG cb; + BYTE ab[MAPI_DIM]; +} MTSID, FAR *LPMTSID; + +typedef struct { + ULONG cMTSIDs; + ULONG cbMTSIDs; + BYTE abMTSIDs[MAPI_DIM]; +} FLATMTSIDLIST, FAR *LPFLATMTSIDLIST; + +#define CbNewFLATENTRY(_cb) (offsetof(FLATENTRY,abEntry) + (_cb)) +#define CbFLATENTRY(_lpentry) (offsetof(FLATENTRY,abEntry) + (_lpentry)->cb) +#define CbNewFLATENTRYLIST(_cb) (offsetof(FLATENTRYLIST,abEntries) + (_cb)) +#define CbFLATENTRYLIST(_lplist) (offsetof(FLATENTRYLIST,abEntries) + (_lplist)->cbEntries) +#define CbNewMTSID(_cb) (offsetof(MTSID,ab) + (_cb)) +#define CbMTSID(_lpentry) (offsetof(MTSID,ab) + (_lpentry)->cb) +#define CbNewFLATMTSIDLIST(_cb) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_cb)) +#define CbFLATMTSIDLIST(_lplist) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_lplist)->cbMTSIDs) +/* No SizedXXX macros for these types. */ + +/* ------------------------------ */ +/* ADRENTRY, ADRLIST */ + +typedef struct _ADRENTRY +{ + ULONG ulReserved1; /* Never used */ + ULONG cValues; + LPSPropValue rgPropVals; +} ADRENTRY, FAR * LPADRENTRY; + +typedef struct _ADRLIST +{ + ULONG cEntries; + ADRENTRY aEntries[MAPI_DIM]; +} ADRLIST, FAR * LPADRLIST; + +#define CbNewADRLIST(_centries) \ + (offsetof(ADRLIST,aEntries) + (_centries)*sizeof(ADRENTRY)) +#define CbADRLIST(_lpadrlist) \ + (offsetof(ADRLIST,aEntries) + (UINT)(_lpadrlist)->cEntries*sizeof(ADRENTRY)) +#define SizedADRLIST(_centries, _name) \ +struct _ADRLIST_ ## _name \ +{ \ + ULONG cEntries; \ + ADRENTRY aEntries[_centries]; \ +} _name + +/* ------------------------------ */ +/* SRow, SRowSet */ + +typedef struct _SRow +{ + ULONG ulAdrEntryPad; /* Pad so SRow's can map to ADRENTRY's */ + ULONG cValues; /* Count of property values */ + LPSPropValue lpProps; /* Property value array */ +} SRow, FAR * LPSRow; + +typedef struct _SRowSet +{ + ULONG cRows; /* Count of rows */ + SRow aRow[MAPI_DIM]; /* Array of rows */ +} SRowSet, FAR * LPSRowSet; + +#define CbNewSRowSet(_crow) (offsetof(SRowSet,aRow) + (_crow)*sizeof(SRow)) +#define CbSRowSet(_lprowset) (offsetof(SRowSet,aRow) + \ + (UINT)((_lprowset)->cRows*sizeof(SRow))) +#define SizedSRowSet(_crow, _name) \ +struct _SRowSet_ ## _name \ +{ \ + ULONG cRows; \ + SRow aRow[_crow]; \ +} _name + +/* MAPI Allocation Routines ------------------------------------------------ */ + +typedef SCODE (STDMETHODCALLTYPE ALLOCATEBUFFER)( + ULONG cbSize, + LPVOID FAR * lppBuffer +); + +typedef SCODE (STDMETHODCALLTYPE ALLOCATEMORE)( + ULONG cbSize, + LPVOID lpObject, + LPVOID FAR * lppBuffer +); + +typedef ULONG (STDAPICALLTYPE FREEBUFFER)( + LPVOID lpBuffer +); + +typedef ALLOCATEBUFFER FAR *LPALLOCATEBUFFER; +typedef ALLOCATEMORE FAR * LPALLOCATEMORE; +typedef FREEBUFFER FAR * LPFREEBUFFER; + +/* MAPI Component Object Model Macros -------------------------------------- */ + +#if defined(MAPI_IF) && (!defined(__cplusplus) || defined(CINTERFACE)) +#define DECLARE_MAPI_INTERFACE(iface) \ + typedef struct iface##Vtbl iface##Vtbl, FAR * iface; \ + struct iface##Vtbl +#define DECLARE_MAPI_INTERFACE_(iface, baseiface) \ + DECLARE_MAPI_INTERFACE(iface) +#define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \ + typedef struct iface##Vtbl iface##Vtbl, FAR * iface, FAR * FAR * piface; +#else +#define DECLARE_MAPI_INTERFACE(iface) \ + DECLARE_INTERFACE(iface) +#define DECLARE_MAPI_INTERFACE_(iface, baseiface) \ + DECLARE_INTERFACE_(iface, baseiface) +#ifdef __cplusplus +#define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \ + interface iface; typedef iface FAR * piface +#else +#if !MS_TARGET_APPLE +#define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \ + typedef interface iface iface, FAR * piface +#else // MS_TARGET_APPLE +#define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \ + typedef interface iface FAR * piface +#endif //MS_TARGET_APPLE +#endif +#endif + +#define MAPIMETHOD(method) MAPIMETHOD_(HRESULT, method) +#define MAPIMETHOD_(type, method) STDMETHOD_(type, method) +#define MAPIMETHOD_DECLARE(type, method, prefix) \ + STDMETHODIMP_(type) prefix##method +#define MAPIMETHOD_TYPEDEF(type, method, prefix) \ + typedef type (STDMETHODCALLTYPE prefix##method##_METHOD) + +#define MAPI_IUNKNOWN_METHODS(IPURE) \ + MAPIMETHOD(QueryInterface) \ + (THIS_ REFIID riid, LPVOID FAR * ppvObj) IPURE; \ + MAPIMETHOD_(ULONG,AddRef) (THIS) IPURE; \ + MAPIMETHOD_(ULONG,Release) (THIS) IPURE; \ + +#undef IMPL +#define IMPL + +/* Pointers to MAPI Interfaces --------------------------------------------- */ + +typedef const IID FAR * LPCIID; + +DECLARE_MAPI_INTERFACE_PTR(IMsgStore, LPMDB); +DECLARE_MAPI_INTERFACE_PTR(IMAPIFolder, LPMAPIFOLDER); +DECLARE_MAPI_INTERFACE_PTR(IMessage, LPMESSAGE); +DECLARE_MAPI_INTERFACE_PTR(IAttach, LPATTACH); +DECLARE_MAPI_INTERFACE_PTR(IAddrBook, LPADRBOOK); +DECLARE_MAPI_INTERFACE_PTR(IABContainer, LPABCONT); +DECLARE_MAPI_INTERFACE_PTR(IMailUser, LPMAILUSER); +DECLARE_MAPI_INTERFACE_PTR(IDistList, LPDISTLIST); +DECLARE_MAPI_INTERFACE_PTR(IMAPIStatus, LPMAPISTATUS); +DECLARE_MAPI_INTERFACE_PTR(IMAPITable, LPMAPITABLE); +DECLARE_MAPI_INTERFACE_PTR(IProfSect, LPPROFSECT); +DECLARE_MAPI_INTERFACE_PTR(IMAPIProp, LPMAPIPROP); +DECLARE_MAPI_INTERFACE_PTR(IMAPIContainer, LPMAPICONTAINER); +DECLARE_MAPI_INTERFACE_PTR(IMAPIAdviseSink, LPMAPIADVISESINK); +DECLARE_MAPI_INTERFACE_PTR(IMAPIProgress, LPMAPIPROGRESS); +DECLARE_MAPI_INTERFACE_PTR(IProviderAdmin, LPPROVIDERADMIN); + +/* Extended MAPI Error Information ----------------------------------------- */ + +typedef struct _MAPIERROR +{ + ULONG ulVersion; + LPTSTR lpszError; + LPTSTR lpszComponent; + ULONG ulLowLevelError; + ULONG ulContext; + +} MAPIERROR, FAR * LPMAPIERROR; + + +/* IMAPIAdviseSink Interface ----------------------------------------------- */ + +/* + * Notification event types. The event types can be combined in a bitmask + * for filtering. Each one has a parameter structure associated with it: + * + * fnevCriticalError ERROR_NOTIFICATION + * fnevNewMail NEWMAIL_NOTIFICATION + * fnevObjectCreated OBJECT_NOTIFICATION + * fnevObjectDeleted OBJECT_NOTIFICATION + * fnevObjectModified OBJECT_NOTIFICATION + * fnevObjectCopied OBJECT_NOTIFICATION + * fnevSearchComplete OBJECT_NOTIFICATION + * fnevTableModified TABLE_NOTIFICATION + * fnevStatusObjectModified ? + * + * fnevExtended EXTENDED_NOTIFICATION + */ + +#define fnevCriticalError ((ULONG) 0x00000001) +#define fnevNewMail ((ULONG) 0x00000002) +#define fnevObjectCreated ((ULONG) 0x00000004) +#define fnevObjectDeleted ((ULONG) 0x00000008) +#define fnevObjectModified ((ULONG) 0x00000010) +#define fnevObjectMoved ((ULONG) 0x00000020) +#define fnevObjectCopied ((ULONG) 0x00000040) +#define fnevSearchComplete ((ULONG) 0x00000080) +#define fnevTableModified ((ULONG) 0x00000100) +#define fnevStatusObjectModified ((ULONG) 0x00000200) +#define fnevReservedForMapi ((ULONG) 0x40000000) +#define fnevExtended ((ULONG) 0x80000000) + +/* TABLE_NOTIFICATION event types passed in ulTableEvent */ + +#define TABLE_CHANGED 1 +#define TABLE_ERROR 2 +#define TABLE_ROW_ADDED 3 +#define TABLE_ROW_DELETED 4 +#define TABLE_ROW_MODIFIED 5 +#define TABLE_SORT_DONE 6 +#define TABLE_RESTRICT_DONE 7 +#define TABLE_SETCOL_DONE 8 +#define TABLE_RELOAD 9 + +/* Event Structures */ + +typedef struct _ERROR_NOTIFICATION +{ + ULONG cbEntryID; + LPENTRYID lpEntryID; + SCODE scode; + ULONG ulFlags; /* 0 or MAPI_UNICODE */ + LPMAPIERROR lpMAPIError; /* Detailed error information */ +} ERROR_NOTIFICATION; + +typedef struct _NEWMAIL_NOTIFICATION +{ + ULONG cbEntryID; + LPENTRYID lpEntryID; /* identifies the new message */ + ULONG cbParentID; + LPENTRYID lpParentID; /* identifies the folder it lives in */ + ULONG ulFlags; /* 0 or MAPI_UNICODE */ + LPTSTR lpszMessageClass; /* message class (UNICODE or string8) */ + ULONG ulMessageFlags; /* copy of PR_MESSAGE_FLAGS */ +} NEWMAIL_NOTIFICATION; + +typedef struct _OBJECT_NOTIFICATION +{ + ULONG cbEntryID; + LPENTRYID lpEntryID; /* EntryID of object */ + ULONG ulObjType; /* Type of object */ + ULONG cbParentID; + LPENTRYID lpParentID; /* EntryID of parent object */ + ULONG cbOldID; + LPENTRYID lpOldID; /* EntryID of old object */ + ULONG cbOldParentID; + LPENTRYID lpOldParentID; /* EntryID of old parent */ + LPSPropTagArray lpPropTagArray; +} OBJECT_NOTIFICATION; + +typedef struct _TABLE_NOTIFICATION +{ + ULONG ulTableEvent; /* Identifies WHICH table event */ + HRESULT hResult; /* Value for TABLE_ERROR */ + SPropValue propIndex; /* This row's "index property" */ + SPropValue propPrior; /* Preceding row's "index property" */ + SRow row; /* New data of added/modified row */ + ULONG ulPad; /* Force to 8-byte boundary */ +} TABLE_NOTIFICATION; + +typedef struct _EXTENDED_NOTIFICATION +{ + ULONG ulEvent; /* extended event code */ + ULONG cb; /* size of event parameters */ + LPBYTE pbEventParameters; /* event parameters */ +} EXTENDED_NOTIFICATION; + +typedef struct +{ + ULONG cbEntryID; + LPENTRYID lpEntryID; + ULONG cValues; + LPSPropValue lpPropVals; +} STATUS_OBJECT_NOTIFICATION; + +typedef struct _NOTIFICATION +{ + ULONG ulEventType; /* notification type, i.e. fnevSomething */ + ULONG ulAlignPad; /* Force to 8-byte boundary */ + union + { + ERROR_NOTIFICATION err; + NEWMAIL_NOTIFICATION newmail; + OBJECT_NOTIFICATION obj; + TABLE_NOTIFICATION tab; + EXTENDED_NOTIFICATION ext; + STATUS_OBJECT_NOTIFICATION statobj; + } info; +} NOTIFICATION, FAR * LPNOTIFICATION; + + +/* Interface used for registering and issuing notification callbacks. */ + +#define MAPI_IMAPIADVISESINK_METHODS(IPURE) \ + MAPIMETHOD_(ULONG, OnNotify) \ + (THIS_ ULONG cNotif, \ + LPNOTIFICATION lpNotifications) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIAdviseSink +DECLARE_MAPI_INTERFACE_(IMAPIAdviseSink, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIADVISESINK_METHODS(PURE) +}; + +/* Callback function type for MAPIAllocAdviseSink */ + +typedef LONG (STDAPICALLTYPE NOTIFCALLBACK) ( + LPVOID lpvContext, + ULONG cNotification, + LPNOTIFICATION lpNotifications); +typedef NOTIFCALLBACK FAR * LPNOTIFCALLBACK; + +/* + * Message name for the 16-bit MAPI notififcation engine. + * This can be used in 16-bit applications to force processing + * of notification callbacks. + */ + +#define szMAPINotificationMsg "MAPI Notify window message" + + +/* IMAPIProgress Interface ------------------------------------------------- */ + +/* Flag values for the progress indicator */ + +#define MAPI_TOP_LEVEL ((ULONG) 0x00000001) + +#define MAPI_IMAPIPROGRESS_METHODS(IPURE) \ + MAPIMETHOD(Progress) \ + (THIS_ ULONG ulValue, \ + ULONG ulCount, \ + ULONG ulTotal) IPURE; \ + MAPIMETHOD(GetFlags) \ + (THIS_ ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(GetMax) \ + (THIS_ ULONG FAR * lpulMax) IPURE; \ + MAPIMETHOD(GetMin) \ + (THIS_ ULONG FAR * lpulMin) IPURE; \ + MAPIMETHOD(SetLimits) \ + (THIS_ LPULONG lpulMin, \ + LPULONG lpulMax, \ + LPULONG lpulFlags) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIProgress +DECLARE_MAPI_INTERFACE_(IMAPIProgress, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROGRESS_METHODS(PURE) +}; + + +/* IMAPIProp Interface ----------------------------------------------------- */ + +/* GetLastError */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* + * Version: + */ +#define MAPI_ERROR_VERSION 0x00000000L + +/* GetPropList */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* GetProps */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* SaveChanges */ + +#define KEEP_OPEN_READONLY ((ULONG) 0x00000001) +#define KEEP_OPEN_READWRITE ((ULONG) 0x00000002) +#define FORCE_SAVE ((ULONG) 0x00000004) +/* define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ + +/* OpenProperty - ulFlags */ +/****** MAPI_MODIFY ((ULONG) 0x00000001) above */ +#define MAPI_CREATE ((ULONG) 0x00000002) +#define STREAM_APPEND ((ULONG) 0x00000004) +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ + +/* OpenProperty - ulInterfaceOptions, IID_IMAPITable */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* CopyTo, CopyProps */ + +#define MAPI_MOVE ((ULONG) 0x00000001) +#define MAPI_NOREPLACE ((ULONG) 0x00000002) +#define MAPI_DECLINE_OK ((ULONG) 0x00000004) + +#ifndef MAPI_DIALOG /* also defined in mapi.h */ +#define MAPI_DIALOG ((ULONG) 0x00000008) +#endif + +#ifndef MAPI_USE_DEFAULT /* also defined in mapi.h */ +#define MAPI_USE_DEFAULT 0x00000040 /* Use default profile in logon */ +#endif + +/* Flags used in GetIDsFromNames */ +/****** MAPI_CREATE ((ULONG) 0x00000002) above */ + +/* Flags used in GetNamesFromIDs (bit fields) */ +#define MAPI_NO_STRINGS ((ULONG) 0x00000001) +#define MAPI_NO_IDS ((ULONG) 0x00000002) + +/* Union discriminator */ +#define MNID_ID 0 +#define MNID_STRING 1 +typedef struct _MAPINAMEID +{ + LPGUID lpguid; + ULONG ulKind; + union { + LONG_PTR lID_Reserved; + LONG lID; + LPWSTR lpwstrName; + } Kind; + +} MAPINAMEID, FAR * LPMAPINAMEID; + +#define MAPI_IMAPIPROP_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(SaveChanges) \ + (THIS_ ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetProps) \ + (THIS_ LPSPropTagArray lpPropTagArray, \ + ULONG ulFlags, \ + ULONG FAR * lpcValues, \ + LPSPropValue FAR * lppPropArray) IPURE; \ + MAPIMETHOD(GetPropList) \ + (THIS_ ULONG ulFlags, \ + LPSPropTagArray FAR * lppPropTagArray) IPURE; \ + MAPIMETHOD(OpenProperty) \ + (THIS_ ULONG ulPropTag, \ + LPCIID lpiid, \ + ULONG ulInterfaceOptions, \ + ULONG ulFlags, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(SetProps) \ + (THIS_ ULONG cValues, \ + LPSPropValue lpPropArray, \ + LPSPropProblemArray FAR * lppProblems) IPURE; \ + MAPIMETHOD(DeleteProps) \ + (THIS_ LPSPropTagArray lpPropTagArray, \ + LPSPropProblemArray FAR * lppProblems) IPURE; \ + MAPIMETHOD(CopyTo) \ + (THIS_ ULONG ciidExclude, \ + LPCIID rgiidExclude, \ + LPSPropTagArray lpExcludeProps, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + LPCIID lpInterface, \ + LPVOID lpDestObj, \ + ULONG ulFlags, \ + LPSPropProblemArray FAR * lppProblems) IPURE; \ + MAPIMETHOD(CopyProps) \ + (THIS_ LPSPropTagArray lpIncludeProps, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + LPCIID lpInterface, \ + LPVOID lpDestObj, \ + ULONG ulFlags, \ + LPSPropProblemArray FAR * lppProblems) IPURE; \ + MAPIMETHOD(GetNamesFromIDs) \ + (THIS_ LPSPropTagArray FAR * lppPropTags, \ + LPGUID lpPropSetGuid, \ + ULONG ulFlags, \ + ULONG FAR * lpcPropNames, \ + LPMAPINAMEID FAR * FAR * lpppPropNames) IPURE; \ + MAPIMETHOD(GetIDsFromNames) \ + (THIS_ ULONG cPropNames, \ + LPMAPINAMEID FAR * lppPropNames, \ + ULONG ulFlags, \ + LPSPropTagArray FAR * lppPropTags) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIProp +DECLARE_MAPI_INTERFACE_(IMAPIProp, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) +}; + +/* IMAPITable Interface ---------------------------------------------------- */ + +/* Table status */ + +#define TBLSTAT_COMPLETE ((ULONG) 0) +#define TBLSTAT_QCHANGED ((ULONG) 7) +#define TBLSTAT_SORTING ((ULONG) 9) +#define TBLSTAT_SORT_ERROR ((ULONG) 10) +#define TBLSTAT_SETTING_COLS ((ULONG) 11) +#define TBLSTAT_SETCOL_ERROR ((ULONG) 13) +#define TBLSTAT_RESTRICTING ((ULONG) 14) +#define TBLSTAT_RESTRICT_ERROR ((ULONG) 15) + + +/* Table Type */ + +#define TBLTYPE_SNAPSHOT ((ULONG) 0) +#define TBLTYPE_KEYSET ((ULONG) 1) +#define TBLTYPE_DYNAMIC ((ULONG) 2) + + +/* Sort order */ + +/* bit 0: set if descending, clear if ascending */ + +#define TABLE_SORT_ASCEND ((ULONG) 0x00000000) +#define TABLE_SORT_DESCEND ((ULONG) 0x00000001) +#define TABLE_SORT_COMBINE ((ULONG) 0x00000002) + +// Documented here: https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/ssortorder +#define TABLE_SORT_CATEG_MAX ((ULONG) 0x00000004) +#define TABLE_SORT_CATEG_MIN ((ULONG) 0x00000008) + +/* Data structures */ + +typedef struct _SSortOrder +{ + ULONG ulPropTag; /* Column to sort on */ + ULONG ulOrder; /* Ascending, descending, combine to left */ +} SSortOrder, FAR * LPSSortOrder; + +typedef struct _SSortOrderSet +{ + ULONG cSorts; /* Number of sort columns in aSort below*/ + ULONG cCategories; /* 0 for non-categorized, up to cSorts */ + ULONG cExpanded; /* 0 if no categories start expanded, */ + /* up to cExpanded */ + SSortOrder aSort[MAPI_DIM]; /* The sort orders */ +} SSortOrderSet, FAR * LPSSortOrderSet; + +#define CbNewSSortOrderSet(_csort) \ + (offsetof(SSortOrderSet,aSort) + (_csort)*sizeof(SSortOrder)) +#define CbSSortOrderSet(_lpset) \ + (offsetof(SSortOrderSet,aSort) + \ + (UINT)((_lpset)->cSorts*sizeof(SSortOrder))) +#define SizedSSortOrderSet(_csort, _name) \ +struct _SSortOrderSet_ ## _name \ +{ \ + ULONG cSorts; \ + ULONG cCategories; \ + ULONG cExpanded; \ + SSortOrder aSort[_csort]; \ +} _name + +typedef ULONG_PTR BOOKMARK; + +#define BOOKMARK_BEGINNING ((BOOKMARK) 0) /* Before first row */ +#define BOOKMARK_CURRENT ((BOOKMARK) 1) /* Before current row */ +#define BOOKMARK_END ((BOOKMARK) 2) /* After last row */ + +/* Fuzzy Level */ + +#define FL_FULLSTRING ((ULONG) 0x00000000) +#define FL_SUBSTRING ((ULONG) 0x00000001) +#define FL_PREFIX ((ULONG) 0x00000002) + +#define FL_IGNORECASE ((ULONG) 0x00010000) +#define FL_IGNORENONSPACE ((ULONG) 0x00020000) +#define FL_LOOSE ((ULONG) 0x00040000) + +/* Restrictions */ + +typedef struct _SRestriction FAR * LPSRestriction; + +/* Restriction types */ + +#define RES_AND ((ULONG) 0x00000000) +#define RES_OR ((ULONG) 0x00000001) +#define RES_NOT ((ULONG) 0x00000002) +#define RES_CONTENT ((ULONG) 0x00000003) +#define RES_PROPERTY ((ULONG) 0x00000004) +#define RES_COMPAREPROPS ((ULONG) 0x00000005) +#define RES_BITMASK ((ULONG) 0x00000006) +#define RES_SIZE ((ULONG) 0x00000007) +#define RES_EXIST ((ULONG) 0x00000008) +#define RES_SUBRESTRICTION ((ULONG) 0x00000009) +#define RES_COMMENT ((ULONG) 0x0000000A) +#define RES_COUNT ((ULONG) 0x0000000B) // OFFICEDEV: Count restriction to CAP results +#define RES_ANNOTATION ((ULONG) 0x0000000C) // OFFICEDEV: Annotation restriction to pass information like LCID, etc. + +/* Relational operators. These apply to all property comparison restrictions. */ + +#define RELOP_LT ((ULONG) 0) /* < */ +#define RELOP_LE ((ULONG) 1) /* <= */ +#define RELOP_GT ((ULONG) 2) /* > */ +#define RELOP_GE ((ULONG) 3) /* >= */ +#define RELOP_EQ ((ULONG) 4) /* == */ +#define RELOP_NE ((ULONG) 5) /* != */ +#define RELOP_RE ((ULONG) 6) /* LIKE (Regular expression) */ + +/* Bitmask operators, for RES_BITMASK only. */ + +#define BMR_EQZ ((ULONG) 0) /* ==0 */ +#define BMR_NEZ ((ULONG) 1) /* !=0 */ + +/* Subobject identifiers for RES_SUBRESTRICTION only. See MAPITAGS.H. */ + +/* #define PR_MESSAGE_RECIPIENTS PROP_TAG(PT_OBJECT,0x0E12) */ +/* #define PR_MESSAGE_ATTACHMENTS PROP_TAG(PT_OBJECT,0x0E13) */ + +typedef struct _SAndRestriction +{ + ULONG cRes; + LPSRestriction lpRes; +} SAndRestriction; + +typedef struct _SOrRestriction +{ + ULONG cRes; + LPSRestriction lpRes; +} SOrRestriction; + +typedef struct _SNotRestriction +{ + ULONG ulReserved; + LPSRestriction lpRes; +} SNotRestriction; + +typedef struct _SContentRestriction +{ + ULONG ulFuzzyLevel; + ULONG ulPropTag; + LPSPropValue lpProp; +} SContentRestriction; + +typedef struct _SBitMaskRestriction +{ + ULONG relBMR; + ULONG ulPropTag; + ULONG ulMask; +} SBitMaskRestriction; + +typedef struct _SPropertyRestriction +{ + ULONG relop; + ULONG ulPropTag; + LPSPropValue lpProp; +} SPropertyRestriction; + +typedef struct _SComparePropsRestriction +{ + ULONG relop; + ULONG ulPropTag1; + ULONG ulPropTag2; +} SComparePropsRestriction; + +typedef struct _SSizeRestriction +{ + ULONG relop; + ULONG ulPropTag; + ULONG cb; +} SSizeRestriction; + +typedef struct _SExistRestriction +{ + ULONG ulReserved1; + ULONG ulPropTag; + ULONG ulReserved2; +} SExistRestriction; + +typedef struct _SSubRestriction +{ + ULONG ulSubObject; + LPSRestriction lpRes; +} SSubRestriction; + +typedef struct _SCommentRestriction +{ + ULONG cValues; /* # of properties in lpProp */ + LPSRestriction lpRes; + LPSPropValue lpProp; +} SCommentRestriction; + +// OFFICEDEV: The following two restrictions are new to Office 12 and are not +// backwards compatible with older clients. +typedef struct _SAnnotationRestriction +{ + ULONG cValues; /* # of properties in lpProp */ + LPSRestriction lpRes; + LPSPropValue lpProp; +} SAnnotationRestriction; + +typedef struct _SCountRestriction +{ + ULONG ulCount; + LPSRestriction lpRes; +} SCountRestriction; + +typedef struct _SRestriction +{ + ULONG rt; /* Restriction type */ + union + { + SComparePropsRestriction resCompareProps; /* first */ + SAndRestriction resAnd; + SOrRestriction resOr; + SNotRestriction resNot; + SContentRestriction resContent; + SPropertyRestriction resProperty; + SBitMaskRestriction resBitMask; + SSizeRestriction resSize; + SExistRestriction resExist; + SSubRestriction resSub; + SCommentRestriction resComment; + SAnnotationRestriction resAnnotation; // OFFICEDEV: not backwards compatible with Office 11 and older + SCountRestriction resCount; // OFFICEDEV: not backwards compatible with Office 11 and older + } res; +} SRestriction; + +/* SComparePropsRestriction is first in the union so that */ +/* static initializations of 3-value restriction work. */ + +/* Flags of the methods of IMAPITable */ + +/* QueryColumn */ + +#define TBL_ALL_COLUMNS ((ULONG) 0x00000001) + +/* QueryRows */ +/* Possible values for PR_ROW_TYPE (for categorization) */ + +#define TBL_LEAF_ROW ((ULONG) 1) +#define TBL_EMPTY_CATEGORY ((ULONG) 2) +#define TBL_EXPANDED_CATEGORY ((ULONG) 3) +#define TBL_COLLAPSED_CATEGORY ((ULONG) 4) + +/* Table wait flag */ + +#define TBL_NOWAIT ((ULONG) 0x00000001) +/* alternative name for TBL_NOWAIT */ +#define TBL_ASYNC ((ULONG) 0x00000001) +#define TBL_BATCH ((ULONG) 0x00000002) + +/* FindRow */ + +#define DIR_BACKWARD ((ULONG) 0x00000001) + +/* Table cursor states */ + +#define TBL_NOADVANCE ((ULONG) 0x00000001) + +#define MAPI_IMAPITABLE_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Advise) \ + (THIS_ ULONG ulEventMask, \ + LPMAPIADVISESINK lpAdviseSink, \ + ULONG_PTR FAR * lpulConnection) IPURE; \ + MAPIMETHOD(Unadvise) \ + (THIS_ ULONG_PTR ulConnection) IPURE; \ + MAPIMETHOD(GetStatus) \ + (THIS_ ULONG FAR * lpulTableStatus, \ + ULONG FAR * lpulTableType) IPURE; \ + MAPIMETHOD(SetColumns) \ + (THIS_ LPSPropTagArray lpPropTagArray, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(QueryColumns) \ + (THIS_ ULONG ulFlags, \ + LPSPropTagArray FAR * lpPropTagArray) IPURE; \ + MAPIMETHOD(GetRowCount) \ + (THIS_ ULONG ulFlags, \ + ULONG FAR * lpulCount) IPURE; \ + MAPIMETHOD(SeekRow) \ + (THIS_ BOOKMARK bkOrigin, \ + LONG lRowCount, \ + LONG FAR * lplRowsSought) IPURE; \ + MAPIMETHOD(SeekRowApprox) \ + (THIS_ ULONG ulNumerator, \ + ULONG ulDenominator) IPURE; \ + MAPIMETHOD(QueryPosition) \ + (THIS_ ULONG FAR * lpulRow, \ + ULONG FAR * lpulNumerator, \ + ULONG FAR * lpulDenominator) IPURE; \ + MAPIMETHOD(FindRow) \ + (THIS_ LPSRestriction lpRestriction, \ + BOOKMARK bkOrigin, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(Restrict) \ + (THIS_ LPSRestriction lpRestriction, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(CreateBookmark) \ + (THIS_ BOOKMARK FAR * lpbkPosition) IPURE; \ + MAPIMETHOD(FreeBookmark) \ + (THIS_ BOOKMARK bkPosition) IPURE; \ + MAPIMETHOD(SortTable) \ + (THIS_ LPSSortOrderSet lpSortCriteria, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(QuerySortOrder) \ + (THIS_ LPSSortOrderSet FAR * lppSortCriteria) IPURE; \ + MAPIMETHOD(QueryRows) \ + (THIS_ LONG lRowCount, \ + ULONG ulFlags, \ + LPSRowSet FAR * lppRows) IPURE; \ + MAPIMETHOD(Abort) (THIS) IPURE; \ + MAPIMETHOD(ExpandRow) \ + (THIS_ ULONG cbInstanceKey, \ + LPBYTE pbInstanceKey, \ + ULONG ulRowCount, \ + ULONG ulFlags, \ + LPSRowSet FAR * lppRows, \ + ULONG FAR * lpulMoreRows) IPURE; \ + MAPIMETHOD(CollapseRow) \ + (THIS_ ULONG cbInstanceKey, \ + LPBYTE pbInstanceKey, \ + ULONG ulFlags, \ + ULONG FAR * lpulRowCount) IPURE; \ + MAPIMETHOD(WaitForCompletion) \ + (THIS_ ULONG ulFlags, \ + ULONG ulTimeout, \ + ULONG FAR * lpulTableStatus) IPURE; \ + MAPIMETHOD(GetCollapseState) \ + (THIS_ ULONG ulFlags, \ + ULONG cbInstanceKey, \ + LPBYTE lpbInstanceKey, \ + ULONG FAR * lpcbCollapseState, \ + LPBYTE FAR * lppbCollapseState) IPURE; \ + MAPIMETHOD(SetCollapseState) \ + (THIS_ ULONG ulFlags, \ + ULONG cbCollapseState, \ + _Pre_writable_size_(cbCollapseState) LPBYTE pbCollapseState, \ + BOOKMARK FAR * lpbkLocation) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPITable +DECLARE_MAPI_INTERFACE_(IMAPITable, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPITABLE_METHODS(PURE) +}; + +/* IProfSect Interface ----------------------------------------------------- */ + +/* Standard section for public profile properties */ + +#define PS_PROFILE_PROPERTIES_INIT \ +{ 0x98, 0x15, 0xAC, 0x08, 0xAA, 0xB0, 0x10, 0x1A, \ + 0x8C, 0x93, 0x08, 0x00, 0x2B, 0x2A, 0x56, 0xC2 } + + +#define MAPI_IPROFSECT_METHODS(IPURE) + +#undef INTERFACE +#define INTERFACE IProfSect +DECLARE_MAPI_INTERFACE_(IProfSect, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IPROFSECT_METHODS(PURE) +}; + +/* IMAPIStatus Interface --------------------------------------------------- */ + +/* Values for PR_RESOURCE_TYPE, _METHODS, _FLAGS */ + +#define MAPI_STORE_PROVIDER ((ULONG) 33) /* Message Store */ +#define MAPI_AB ((ULONG) 34) /* Address Book */ +#define MAPI_AB_PROVIDER ((ULONG) 35) /* Address Book Provider */ +#define MAPI_TRANSPORT_PROVIDER ((ULONG) 36) /* Transport Provider */ +#define MAPI_SPOOLER ((ULONG) 37) /* Message Spooler */ +#define MAPI_PROFILE_PROVIDER ((ULONG) 38) /* Profile Provider */ +#define MAPI_SUBSYSTEM ((ULONG) 39) /* Overall Subsystem Status */ +#define MAPI_HOOK_PROVIDER ((ULONG) 40) /* Spooler Hook */ + +#define STATUS_VALIDATE_STATE ((ULONG) 0x00000001) +#define STATUS_SETTINGS_DIALOG ((ULONG) 0x00000002) +#define STATUS_CHANGE_PASSWORD ((ULONG) 0x00000004) +#define STATUS_FLUSH_QUEUES ((ULONG) 0x00000008) + +#define STATUS_DEFAULT_OUTBOUND ((ULONG) 0x00000001) +#define STATUS_DEFAULT_STORE ((ULONG) 0x00000002) +#define STATUS_PRIMARY_IDENTITY ((ULONG) 0x00000004) +#define STATUS_SIMPLE_STORE ((ULONG) 0x00000008) +#define STATUS_XP_PREFER_LAST ((ULONG) 0x00000010) +#define STATUS_NO_PRIMARY_IDENTITY ((ULONG) 0x00000020) +#define STATUS_NO_DEFAULT_STORE ((ULONG) 0x00000040) +#define STATUS_TEMP_SECTION ((ULONG) 0x00000080) +#define STATUS_OWN_STORE ((ULONG) 0x00000100) +/****** HOOK_INBOUND ((ULONG) 0x00000200) Defined in MAPIHOOK.H */ +/****** HOOK_OUTBOUND ((ULONG) 0x00000400) Defined in MAPIHOOK.H */ +#define STATUS_NEED_IPM_TREE ((ULONG) 0x00000800) +#define STATUS_PRIMARY_STORE ((ULONG) 0x00001000) +#define STATUS_SECONDARY_STORE ((ULONG) 0x00002000) + + +/* + * PR_STATUS_CODE bit. Low 16 bits for common values; High 16 bits + * for provider type-specific values. (DCR 304) + */ + +#define STATUS_AVAILABLE ((ULONG) 0x00000001) +#define STATUS_OFFLINE ((ULONG) 0x00000002) +#define STATUS_FAILURE ((ULONG) 0x00000004) + +/* Transport values of PR_STATUS_CODE */ + +#define STATUS_INBOUND_ENABLED ((ULONG) 0x00010000) +#define STATUS_INBOUND_ACTIVE ((ULONG) 0x00020000) +#define STATUS_INBOUND_FLUSH ((ULONG) 0x00040000) +#define STATUS_OUTBOUND_ENABLED ((ULONG) 0x00100000) +#define STATUS_OUTBOUND_ACTIVE ((ULONG) 0x00200000) +#define STATUS_OUTBOUND_FLUSH ((ULONG) 0x00400000) +#define STATUS_REMOTE_ACCESS ((ULONG) 0x00800000) + +/* ValidateState flags */ + +#define SUPPRESS_UI ((ULONG) 0x00000001) +#define REFRESH_XP_HEADER_CACHE ((ULONG) 0x00010000) +#define PROCESS_XP_HEADER_CACHE ((ULONG) 0x00020000) +#define FORCE_XP_CONNECT ((ULONG) 0x00040000) +#define FORCE_XP_DISCONNECT ((ULONG) 0x00080000) +#define CONFIG_CHANGED ((ULONG) 0x00100000) +#define ABORT_XP_HEADER_OPERATION ((ULONG) 0x00200000) +#define SHOW_XP_SESSION_UI ((ULONG) 0x00400000) + +/* SettingsDialog flags */ + +#define UI_READONLY ((ULONG) 0x00000001) + +/* FlushQueues flags */ + +#define FLUSH_UPLOAD ((ULONG) 0x00000002) +#define FLUSH_DOWNLOAD ((ULONG) 0x00000004) +#define FLUSH_FORCE ((ULONG) 0x00000008) +#define FLUSH_NO_UI ((ULONG) 0x00000010) +#define FLUSH_ASYNC_OK ((ULONG) 0x00000020) + +#define MAPI_IMAPISTATUS_METHODS(IPURE) \ + MAPIMETHOD(ValidateState) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(SettingsDialog) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(ChangePassword) \ + (THIS_ LPTSTR lpOldPass, \ + LPTSTR lpNewPass, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(FlushQueues) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG cbTargetTransport, \ + LPENTRYID lpTargetTransport, \ + ULONG ulFlags) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIStatus +DECLARE_MAPI_INTERFACE_(IMAPIStatus, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMAPISTATUS_METHODS(PURE) +}; + +/* IMAPIContainer Interface ------------------------------------------------ */ + +/* Flags for OpenEntry() */ + +/****** MAPI_MODIFY ((ULONG) 0x00000001) above */ +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +#define MAPI_BEST_ACCESS ((ULONG) 0x00000010) + +/* GetContentsTable() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +/****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */ + +/* GetHierarchyTable() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ +#define CONVENIENT_DEPTH ((ULONG) 0x00000001) +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ + +/* GetSearchCriteria */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ +#define SEARCH_RUNNING ((ULONG) 0x00000001) +#define SEARCH_REBUILD ((ULONG) 0x00000002) +#define SEARCH_RECURSIVE ((ULONG) 0x00000004) +#define SEARCH_FOREGROUND ((ULONG) 0x00000008) + +/* SetSearchCriteria */ +#define STOP_SEARCH ((ULONG) 0x00000001) +#define RESTART_SEARCH ((ULONG) 0x00000002) +#define RECURSIVE_SEARCH ((ULONG) 0x00000004) +#define SHALLOW_SEARCH ((ULONG) 0x00000008) +#define FOREGROUND_SEARCH ((ULONG) 0x00000010) +#define BACKGROUND_SEARCH ((ULONG) 0x00000020) + +#define MAPI_IMAPICONTAINER_METHODS(IPURE) \ + MAPIMETHOD(GetContentsTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(GetHierarchyTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(OpenEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(SetSearchCriteria) \ + (THIS_ LPSRestriction lpRestriction, \ + LPENTRYLIST lpContainerList, \ + ULONG ulSearchFlags) IPURE; \ + MAPIMETHOD(GetSearchCriteria) \ + (THIS_ ULONG ulFlags, \ + LPSRestriction FAR * lppRestriction, \ + LPENTRYLIST FAR * lppContainerList, \ + ULONG FAR * lpulSearchState)IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIContainer +DECLARE_MAPI_INTERFACE_(IMAPIContainer, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMAPICONTAINER_METHODS(PURE) +}; + +/* IABContainer Interface -------------------------------------------------- */ + +/* + * IABContainer PR_CONTAINER_FLAGS values + * If AB_UNMODIFIABLE and AB_MODIFIABLE are both set, it means the container + * doesn't know if it's modifiable or not, and the client should + * try to modify the contents but we won't expect it to work. + * If the AB_RECIPIENTS flag is set and neither AB_MODIFIABLE or AB_UNMODIFIABLE + * bits are set, it is an error. + */ + +typedef struct _flaglist +{ + ULONG cFlags; + ULONG ulFlag[MAPI_DIM]; +} FlagList, FAR * LPFlagList; + + +/* + * Container flags + */ +#define AB_RECIPIENTS ((ULONG) 0x00000001) +#define AB_SUBCONTAINERS ((ULONG) 0x00000002) +#define AB_MODIFIABLE ((ULONG) 0x00000004) +#define AB_UNMODIFIABLE ((ULONG) 0x00000008) +#define AB_FIND_ON_OPEN ((ULONG) 0x00000010) +#define AB_NOT_DEFAULT ((ULONG) 0x00000020) + +/* CreateEntry() */ + +#define CREATE_CHECK_DUP_STRICT ((ULONG) 0x00000001) +#define CREATE_CHECK_DUP_LOOSE ((ULONG) 0x00000002) +#define CREATE_REPLACE ((ULONG) 0x00000004) + +/* ResolveNames() - ulFlags */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* ResolveNames() - rgulFlags */ +#define MAPI_UNRESOLVED ((ULONG) 0x00000000) +#define MAPI_AMBIGUOUS ((ULONG) 0x00000001) +#define MAPI_RESOLVED ((ULONG) 0x00000002) + + +#define MAPI_IABCONTAINER_METHODS(IPURE) \ + MAPIMETHOD(CreateEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulCreateFlags, \ + LPMAPIPROP FAR * lppMAPIPropEntry) IPURE; \ + MAPIMETHOD(CopyEntries) \ + (THIS_ LPENTRYLIST lpEntries, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(DeleteEntries) \ + (THIS_ LPENTRYLIST lpEntries, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(ResolveNames) \ + (THIS_ LPSPropTagArray lpPropTagArray, \ + ULONG ulFlags, \ + LPADRLIST lpAdrList, \ + LPFlagList lpFlagList) IPURE; \ + +#undef INTERFACE +#define INTERFACE IABContainer +DECLARE_MAPI_INTERFACE_(IABContainer, IMAPIContainer) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMAPICONTAINER_METHODS(PURE) + MAPI_IABCONTAINER_METHODS(PURE) +}; + +/* IMailUser Interface ----------------------------------------------------- */ + +/* Any call which can create a one-off entryID (i.e. MAPISupport::CreateOneOff + or IAdrBook::CreateOneOff) can encode the value for PR_SEND_RICH_INFO by + passing in the following flag in the ulFlags parameter. Setting this flag + indicates that PR_SEND_RICH_INFO will be FALSE. +*/ +#define MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) + + + + +/* Values of PR_NDR_DIAG_CODE */ + +#define MAPI_DIAG(_code) ((LONG) _code) + +#define MAPI_DIAG_NO_DIAGNOSTIC MAPI_DIAG( -1 ) +#define MAPI_DIAG_OR_NAME_UNRECOGNIZED MAPI_DIAG( 0 ) +#define MAPI_DIAG_OR_NAME_AMBIGUOUS MAPI_DIAG( 1 ) +#define MAPI_DIAG_MTS_CONGESTED MAPI_DIAG( 2 ) +#define MAPI_DIAG_LOOP_DETECTED MAPI_DIAG( 3 ) +#define MAPI_DIAG_RECIPIENT_UNAVAILABLE MAPI_DIAG( 4 ) +#define MAPI_DIAG_MAXIMUM_TIME_EXPIRED MAPI_DIAG( 5 ) +#define MAPI_DIAG_EITS_UNSUPPORTED MAPI_DIAG( 6 ) +#define MAPI_DIAG_CONTENT_TOO_LONG MAPI_DIAG( 7 ) +#define MAPI_DIAG_IMPRACTICAL_TO_CONVERT MAPI_DIAG( 8 ) +#define MAPI_DIAG_PROHIBITED_TO_CONVERT MAPI_DIAG( 9 ) +#define MAPI_DIAG_CONVERSION_UNSUBSCRIBED MAPI_DIAG( 10 ) +#define MAPI_DIAG_PARAMETERS_INVALID MAPI_DIAG( 11 ) +#define MAPI_DIAG_CONTENT_SYNTAX_IN_ERROR MAPI_DIAG( 12 ) +#define MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD MAPI_DIAG( 13 ) +#define MAPI_DIAG_NUMBER_CONSTRAINT_VIOLATD MAPI_DIAG( 14 ) +#define MAPI_DIAG_CONTENT_TYPE_UNSUPPORTED MAPI_DIAG( 15 ) +#define MAPI_DIAG_TOO_MANY_RECIPIENTS MAPI_DIAG( 16 ) +#define MAPI_DIAG_NO_BILATERAL_AGREEMENT MAPI_DIAG( 17 ) +#define MAPI_DIAG_CRITICAL_FUNC_UNSUPPORTED MAPI_DIAG( 18 ) +#define MAPI_DIAG_CONVERSION_LOSS_PROHIB MAPI_DIAG( 19 ) +#define MAPI_DIAG_LINE_TOO_LONG MAPI_DIAG( 20 ) +#define MAPI_DIAG_PAGE_TOO_LONG MAPI_DIAG( 21 ) +#define MAPI_DIAG_PICTORIAL_SYMBOL_LOST MAPI_DIAG( 22 ) +#define MAPI_DIAG_PUNCTUATION_SYMBOL_LOST MAPI_DIAG( 23 ) +#define MAPI_DIAG_ALPHABETIC_CHARACTER_LOST MAPI_DIAG( 24 ) +#define MAPI_DIAG_MULTIPLE_INFO_LOSSES MAPI_DIAG( 25 ) +#define MAPI_DIAG_REASSIGNMENT_PROHIBITED MAPI_DIAG( 26 ) +#define MAPI_DIAG_REDIRECTION_LOOP_DETECTED MAPI_DIAG( 27 ) +#define MAPI_DIAG_EXPANSION_PROHIBITED MAPI_DIAG( 28 ) +#define MAPI_DIAG_SUBMISSION_PROHIBITED MAPI_DIAG( 29 ) +#define MAPI_DIAG_EXPANSION_FAILED MAPI_DIAG( 30 ) +#define MAPI_DIAG_RENDITION_UNSUPPORTED MAPI_DIAG( 31 ) +#define MAPI_DIAG_MAIL_ADDRESS_INCORRECT MAPI_DIAG( 32 ) +#define MAPI_DIAG_MAIL_OFFICE_INCOR_OR_INVD MAPI_DIAG( 33 ) +#define MAPI_DIAG_MAIL_ADDRESS_INCOMPLETE MAPI_DIAG( 34 ) +#define MAPI_DIAG_MAIL_RECIPIENT_UNKNOWN MAPI_DIAG( 35 ) +#define MAPI_DIAG_MAIL_RECIPIENT_DECEASED MAPI_DIAG( 36 ) +#define MAPI_DIAG_MAIL_ORGANIZATION_EXPIRED MAPI_DIAG( 37 ) +#define MAPI_DIAG_MAIL_REFUSED MAPI_DIAG( 38 ) +#define MAPI_DIAG_MAIL_UNCLAIMED MAPI_DIAG( 39 ) +#define MAPI_DIAG_MAIL_RECIPIENT_MOVED MAPI_DIAG( 40 ) +#define MAPI_DIAG_MAIL_RECIPIENT_TRAVELLING MAPI_DIAG( 41 ) +#define MAPI_DIAG_MAIL_RECIPIENT_DEPARTED MAPI_DIAG( 42 ) +#define MAPI_DIAG_MAIL_NEW_ADDRESS_UNKNOWN MAPI_DIAG( 43 ) +#define MAPI_DIAG_MAIL_FORWARDING_UNWANTED MAPI_DIAG( 44 ) +#define MAPI_DIAG_MAIL_FORWARDING_PROHIB MAPI_DIAG( 45 ) +#define MAPI_DIAG_SECURE_MESSAGING_ERROR MAPI_DIAG( 46 ) +#define MAPI_DIAG_DOWNGRADING_IMPOSSIBLE MAPI_DIAG( 47 ) + +/* Values of PR_DELIVERY_POINT (MH_T_DELIVERY_POINT) */ + +#define MAPI_MH_DP_PUBLIC_UA ((ULONG) 0) +#define MAPI_MH_DP_PRIVATE_UA ((ULONG) 1) +#define MAPI_MH_DP_MS ((ULONG) 2) +#define MAPI_MH_DP_ML ((ULONG) 3) +#define MAPI_MH_DP_PDAU ((ULONG) 4) +#define MAPI_MH_DP_PDS_PATRON ((ULONG) 5) +#define MAPI_MH_DP_OTHER_AU ((ULONG) 6) + + +#define MAPI_IMAILUSER_METHODS(IPURE) + +#undef INTERFACE +#define INTERFACE IMailUser +DECLARE_MAPI_INTERFACE_(IMailUser, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMAILUSER_METHODS(PURE) +}; + +/* IDistList Interface ----------------------------------------------------- */ + +#define MAPI_IDISTLIST_METHODS(IPURE) \ + MAPIMETHOD(CreateEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulCreateFlags, \ + LPMAPIPROP FAR * lppMAPIPropEntry) IPURE; \ + MAPIMETHOD(CopyEntries) \ + (THIS_ LPENTRYLIST lpEntries, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(DeleteEntries) \ + (THIS_ LPENTRYLIST lpEntries, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(ResolveNames) \ + (THIS_ LPSPropTagArray lpPropTagArray, \ + ULONG ulFlags, \ + LPADRLIST lpAdrList, \ + LPFlagList lpFlagList) IPURE; \ + +#undef INTERFACE +#define INTERFACE IDistList +DECLARE_MAPI_INTERFACE_(IDistList, IMAPIContainer) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMAPICONTAINER_METHODS(PURE) + MAPI_IDISTLIST_METHODS(PURE) +}; + +/* IMAPIFolder Interface --------------------------------------------------- */ + +/* IMAPIFolder folder type (enum) */ + +#define FOLDER_ROOT ((ULONG) 0x00000000) +#define FOLDER_GENERIC ((ULONG) 0x00000001) +#define FOLDER_SEARCH ((ULONG) 0x00000002) + +/* CreateMessage */ +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +/****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */ + +/* CopyMessages */ + +#define MESSAGE_MOVE ((ULONG) 0x00000001) +#define MESSAGE_DIALOG ((ULONG) 0x00000002) +/****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */ + +/* CreateFolder */ + +#define OPEN_IF_EXISTS ((ULONG) 0x00000001) +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* DeleteFolder */ + +#define DEL_MESSAGES ((ULONG) 0x00000001) +#define FOLDER_DIALOG ((ULONG) 0x00000002) +#define DEL_FOLDERS ((ULONG) 0x00000004) + +/* EmptyFolder */ +#define DEL_ASSOCIATED ((ULONG) 0x00000008) + +/* CopyFolder */ + +#define FOLDER_MOVE ((ULONG) 0x00000001) +/****** FOLDER_DIALOG ((ULONG) 0x00000002) above */ +/****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */ +#define COPY_SUBFOLDERS ((ULONG) 0x00000010) +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + + +/* SetReadFlags */ + +/****** SUPPRESS_RECEIPT ((ULONG) 0x00000001) below */ +/****** FOLDER_DIALOG ((ULONG) 0x00000002) above */ +/****** CLEAR_READ_FLAG ((ULONG) 0x00000004) below */ +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +/****** GENERATE_RECEIPT_ONLY ((ULONG) 0x00000010) below */ +/****** CLEAR_RN_PENDING ((ULONG) 0x00000020) below */ +/****** CLEAR_NRN_PENDING ((ULONG) 0x00000040) below */ + + +/* GetMessageStatus */ + +#define MSGSTATUS_HIGHLIGHTED ((ULONG) 0x00000001) +#define MSGSTATUS_TAGGED ((ULONG) 0x00000002) +#define MSGSTATUS_HIDDEN ((ULONG) 0x00000004) +#define MSGSTATUS_DELMARKED ((ULONG) 0x00000008) + +/* Bits for remote message status */ + +#define MSGSTATUS_REMOTE_DOWNLOAD ((ULONG) 0x00001000) +#define MSGSTATUS_REMOTE_DELETE ((ULONG) 0x00002000) + +/* SaveContentsSort */ + +#define RECURSIVE_SORT ((ULONG) 0x00000002) + +/* PR_STATUS property */ + +#define FLDSTATUS_HIGHLIGHTED ((ULONG) 0x00000001) +#define FLDSTATUS_TAGGED ((ULONG) 0x00000002) +#define FLDSTATUS_HIDDEN ((ULONG) 0x00000004) +#define FLDSTATUS_DELMARKED ((ULONG) 0x00000008) + +#define MAPI_IMAPIFOLDER_METHODS(IPURE) \ + MAPIMETHOD(CreateMessage) \ + (THIS_ LPCIID lpInterface, \ + ULONG ulFlags, \ + LPMESSAGE FAR * lppMessage) IPURE; \ + MAPIMETHOD(CopyMessages) \ + (THIS_ LPENTRYLIST lpMsgList, \ + LPCIID lpInterface, \ + LPVOID lpDestFolder, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(DeleteMessages) \ + (THIS_ LPENTRYLIST lpMsgList, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(CreateFolder) \ + (THIS_ ULONG ulFolderType, \ + LPTSTR lpszFolderName, \ + LPTSTR lpszFolderComment, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPMAPIFOLDER FAR * lppFolder) IPURE; \ + MAPIMETHOD(CopyFolder) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + LPVOID lpDestFolder, \ + LPTSTR lpszNewFolderName, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(DeleteFolder) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(SetReadFlags) \ + (THIS_ LPENTRYLIST lpMsgList, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetMessageStatus) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulFlags, \ + ULONG FAR * lpulMessageStatus) IPURE; \ + MAPIMETHOD(SetMessageStatus) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulNewStatus, \ + ULONG ulNewStatusMask, \ + ULONG FAR * lpulOldStatus) IPURE; \ + MAPIMETHOD(SaveContentsSort) \ + (THIS_ LPSSortOrderSet lpSortCriteria, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(EmptyFolder) \ + (THIS_ ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIFolder +DECLARE_MAPI_INTERFACE_(IMAPIFolder, IMAPIContainer) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMAPICONTAINER_METHODS(PURE) + MAPI_IMAPIFOLDER_METHODS(PURE) +}; + +/* IMsgStore Interface ----------------------------------------------------- */ + +/* PR_STORE_SUPPORT_MASK bits */ +#define STORE_ENTRYID_UNIQUE ((ULONG) 0x00000001) +#define STORE_READONLY ((ULONG) 0x00000002) +#define STORE_SEARCH_OK ((ULONG) 0x00000004) +#define STORE_MODIFY_OK ((ULONG) 0x00000008) +#define STORE_CREATE_OK ((ULONG) 0x00000010) +#define STORE_ATTACH_OK ((ULONG) 0x00000020) +#define STORE_OLE_OK ((ULONG) 0x00000040) +#define STORE_SUBMIT_OK ((ULONG) 0x00000080) +#define STORE_NOTIFY_OK ((ULONG) 0x00000100) +#define STORE_MV_PROPS_OK ((ULONG) 0x00000200) +#define STORE_CATEGORIZE_OK ((ULONG) 0x00000400) +#define STORE_RTF_OK ((ULONG) 0x00000800) +#define STORE_RESTRICTION_OK ((ULONG) 0x00001000) +#define STORE_SORT_OK ((ULONG) 0x00002000) +#define STORE_PUBLIC_FOLDERS ((ULONG) 0x00004000) +#define STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) + +/* PR_STORE_STATE bits, try not to collide with PR_STORE_SUPPORT_MASK */ + +#define STORE_HAS_SEARCHES ((ULONG) 0x01000000) + + +/* OpenEntry() */ + +/****** MAPI_MODIFY ((ULONG) 0x00000001) above */ +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +/****** MAPI_BEST_ACCESS ((ULONG) 0x00000010) above */ + +/* SetReceiveFolder() */ + +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* GetReceiveFolder() */ + +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* GetReceiveFolderTable() */ + +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ + +/* StoreLogoff() */ + +#define LOGOFF_NO_WAIT ((ULONG) 0x00000001) +#define LOGOFF_ORDERLY ((ULONG) 0x00000002) +#define LOGOFF_PURGE ((ULONG) 0x00000004) +#define LOGOFF_ABORT ((ULONG) 0x00000008) +#define LOGOFF_QUIET ((ULONG) 0x00000010) + +#define LOGOFF_COMPLETE ((ULONG) 0x00010000) +#define LOGOFF_INBOUND ((ULONG) 0x00020000) +#define LOGOFF_OUTBOUND ((ULONG) 0x00040000) +#define LOGOFF_OUTBOUND_QUEUE ((ULONG) 0x00080000) + +/* SetLockState() */ + +#define MSG_LOCKED ((ULONG) 0x00000001) +#define MSG_UNLOCKED ((ULONG) 0x00000000) + +/* Flag bits for PR_VALID_FOLDER_MASK */ + +#define FOLDER_IPM_SUBTREE_VALID ((ULONG) 0x00000001) +#define FOLDER_IPM_INBOX_VALID ((ULONG) 0x00000002) +#define FOLDER_IPM_OUTBOX_VALID ((ULONG) 0x00000004) +#define FOLDER_IPM_WASTEBASKET_VALID ((ULONG) 0x00000008) +#define FOLDER_IPM_SENTMAIL_VALID ((ULONG) 0x00000010) +#define FOLDER_VIEWS_VALID ((ULONG) 0x00000020) +#define FOLDER_COMMON_VIEWS_VALID ((ULONG) 0x00000040) +#define FOLDER_FINDER_VALID ((ULONG) 0x00000080) + +#define MAPI_IMSGSTORE_METHODS(IPURE) \ + MAPIMETHOD(Advise) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulEventMask, \ + LPMAPIADVISESINK lpAdviseSink, \ + ULONG_PTR FAR * lpulConnection) IPURE; \ + MAPIMETHOD(Unadvise) \ + (THIS_ ULONG_PTR ulConnection) IPURE; \ + MAPIMETHOD(CompareEntryIDs) \ + (THIS_ ULONG cbEntryID1, \ + LPENTRYID lpEntryID1, \ + ULONG cbEntryID2, \ + LPENTRYID lpEntryID2, \ + ULONG ulFlags, \ + ULONG FAR * lpulResult) IPURE; \ + MAPIMETHOD(OpenEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(SetReceiveFolder) \ + (THIS_ LPTSTR lpszMessageClass, \ + ULONG ulFlags, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID) IPURE; \ + MAPIMETHOD(GetReceiveFolder) \ + (THIS_ LPTSTR lpszMessageClass, \ + ULONG ulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID, \ + LPTSTR FAR * lppszExplicitClass) IPURE; \ + MAPIMETHOD(GetReceiveFolderTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(StoreLogoff) \ + (THIS_ ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(AbortSubmit) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetOutgoingQueue) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(SetLockState) \ + (THIS_ LPMESSAGE lpMessage, \ + ULONG ulLockState) IPURE; \ + MAPIMETHOD(FinishedMsg) \ + (THIS_ ULONG ulFlags, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID) IPURE; \ + MAPIMETHOD(NotifyNewMail) \ + (THIS_ LPNOTIFICATION lpNotification) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMsgStore +DECLARE_MAPI_INTERFACE_(IMsgStore, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMSGSTORE_METHODS(PURE) +}; + +/* IMessage Interface ------------------------------------------------------ */ + +/* SubmitMessage */ + +#define FORCE_SUBMIT ((ULONG) 0x00000001) + +/* Flags defined in PR_MESSAGE_FLAGS */ + +#define MSGFLAG_READ ((ULONG) 0x00000001) +#define MSGFLAG_UNMODIFIED ((ULONG) 0x00000002) +#define MSGFLAG_SUBMIT ((ULONG) 0x00000004) +#define MSGFLAG_UNSENT ((ULONG) 0x00000008) +#define MSGFLAG_HASATTACH ((ULONG) 0x00000010) +#define MSGFLAG_FROMME ((ULONG) 0x00000020) +#define MSGFLAG_ASSOCIATED ((ULONG) 0x00000040) +#define MSGFLAG_RESEND ((ULONG) 0x00000080) +#define MSGFLAG_RN_PENDING ((ULONG) 0x00000100) +#define MSGFLAG_NRN_PENDING ((ULONG) 0x00000200) + +/* Flags defined in PR_SUBMIT_FLAGS */ + +#define SUBMITFLAG_LOCKED ((ULONG) 0x00000001) +#define SUBMITFLAG_PREPROCESS ((ULONG) 0x00000002) + +/* GetAttachmentTable() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* GetRecipientTable() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* ModifyRecipients */ + +/* ((ULONG) 0x00000001 is not a valid flag on ModifyRecipients. */ +#define MODRECIP_ADD ((ULONG) 0x00000002) +#define MODRECIP_MODIFY ((ULONG) 0x00000004) +#define MODRECIP_REMOVE ((ULONG) 0x00000008) + +/* SetReadFlag */ + +#define SUPPRESS_RECEIPT ((ULONG) 0x00000001) +#define CLEAR_READ_FLAG ((ULONG) 0x00000004) +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ +#define GENERATE_RECEIPT_ONLY ((ULONG) 0x00000010) +#define CLEAR_RN_PENDING ((ULONG) 0x00000020) +#define CLEAR_NRN_PENDING ((ULONG) 0x00000040) + +/* DeleteAttach */ + +#define ATTACH_DIALOG ((ULONG) 0x00000001) + +/* PR_SECURITY values */ +#define SECURITY_SIGNED ((ULONG) 0x00000001) +#define SECURITY_ENCRYPTED ((ULONG) 0x00000002) + +/* PR_PRIORITY values */ +#define PRIO_URGENT ((LONG) 1) +#define PRIO_NORMAL ((LONG) 0) +#define PRIO_NONURGENT ((LONG) -1) + +/* PR_SENSITIVITY values */ +#define SENSITIVITY_NONE ((ULONG) 0x00000000) +#define SENSITIVITY_PERSONAL ((ULONG) 0x00000001) +#define SENSITIVITY_PRIVATE ((ULONG) 0x00000002) +#define SENSITIVITY_COMPANY_CONFIDENTIAL ((ULONG) 0x00000003) + +/* PR_IMPORTANCE values */ +#define IMPORTANCE_LOW ((LONG) 0) +#define IMPORTANCE_NORMAL ((LONG) 1) +#define IMPORTANCE_HIGH ((LONG) 2) + +/* PR_ICON_INDEX values */ +#define ICON_INDEX_NEW_MAIL ((LONG) 0xFFFFFFFF) +#define ICON_INDEX_POST ((LONG) 0x00000001) +#define ICON_INDEX_OTHER ((LONG) 0x00000003) + +/* PR_ICON_INDEX values: Mail */ +#define ICON_INDEX_READ_MAIL ((LONG) 0x00000100) +#define ICON_INDEX_UNREAD_MAIL ((LONG) 0x00000101) +#define ICON_INDEX_SUBMITTED_MAIL ((LONG) 0x00000102) +#define ICON_INDEX_UNSENT_MAIL ((LONG) 0x00000103) +#define ICON_INDEX_RECEIPT_MAIL ((LONG) 0x00000104) +#define ICON_INDEX_REPLIED_MAIL ((LONG) 0x00000105) +#define ICON_INDEX_FORWARDED_MAIL ((LONG) 0x00000106) +#define ICON_INDEX_REMOTE_MAIL ((LONG) 0x00000107) +#define ICON_INDEX_DELIVERY_MAIL ((LONG) 0x00000108) +#define ICON_INDEX_READ_RECEIPT_MAIL ((LONG) 0x00000109) +#define ICON_INDEX_NONDELIVERY_MAIL ((LONG) 0x0000010A) +#define ICON_INDEX_NONREAD_MAIL ((LONG) 0x0000010B) +#define ICON_INDEX_RECALL_S_MAIL ((LONG) 0x0000010C) +#define ICON_INDEX_RECALL_F_MAIL ((LONG) 0x0000010D) +#define ICON_INDEX_TRACKING_MAIL ((LONG) 0x0000010E) + +/* PR_ICON_INDEX values: S/MIME mail */ +#define ICON_INDEX_MAIL_SIGNED ((LONG) 0x0000010F) +#define ICON_INDEX_MAIL_ENCRYPTED ((LONG) 0x00000110) +#define ICON_INDEX_MAIL_SMIME_SIGNED ((LONG) 0x00000111) +#define ICON_INDEX_MAIL_SMIME_RECEIPT ((LONG) 0x00000112) +#define ICON_INDEX_MAIL_ENCRYPTED_REPLIED ((LONG) 0x00000113) +#define ICON_INDEX_MAIL_SMIME_SIGNED_REPLIED ((LONG) 0x00000114) +#define ICON_INDEX_MAIL_ENCRYPTED_FORWARDED ((LONG) 0x00000115) +#define ICON_INDEX_MAIL_SMIME_SIGNED_FORWARDED ((LONG) 0x00000116) +#define ICON_INDEX_MAIL_ENCRYPTED_READ ((LONG) 0x00000117) +#define ICON_INDEX_MAIL_SMIME_SIGNED_READ ((LONG) 0x00000118) + +/* PR_ICON_INDEX values: Additional mail */ +#define ICON_INDEX_OUT_OF_OFFICE_MAIL ((LONG) 0x0000011B) +#define ICON_INDEX_RECALL_MAIL ((LONG) 0x0000011C) +#define ICON_INDEX_TRACKED_MAIL ((LONG) 0x00000130) + +/* PR_ICON_INDEX values: IRM mail */ +#define ICON_INDEX_IRM_READ_MAIL ((LONG) 0x00000131) +#define ICON_INDEX_IRM_UNREAD_MAIL ((LONG) 0x00000132) +#define ICON_INDEX_IRM_FORWARDED_MAIL ((LONG) 0x00000133) +#define ICON_INDEX_IRM_REPLIED_MAIL ((LONG) 0x00000134) +#define ICON_INDEX_IRM_COMPOSE_MAIL ((LONG) 0x00000135) + +/* PR_ICON_INDEX values: Contact */ +#define ICON_INDEX_CONTACT ((LONG) 0x00000200) +#define ICON_INDEX_DISTRIBUTION_LIST ((LONG) 0x00000202) + +/* PR_ICON_INDEX values: Sticky note */ +#define ICON_INDEX_STICKY_NOTE_BLUE ((LONG) 0x00000300) +#define ICON_INDEX_STICKY_NOTE_GREEN ((LONG) 0x00000301) +#define ICON_INDEX_STICKY_NOTE_PINK ((LONG) 0x00000302) +#define ICON_INDEX_STICKY_NOTE_YELLOW ((LONG) 0x00000303) +#define ICON_INDEX_STICKY_NOTE_WHITE ((LONG) 0x00000304) + +/* PR_ICON_INDEX values: Calendar */ +#define ICON_INDEX_SINGLE_INSTANCE_APPOINTMENT ((LONG) 0x00000400) +#define ICON_INDEX_RECURRING_APPOINTMENT ((LONG) 0x00000401) +#define ICON_INDEX_SINGLE_INSTANCE_MEETING ((LONG) 0x00000402) +#define ICON_INDEX_RECURRING_MEETING ((LONG) 0x00000403) +#define ICON_INDEX_MEETING_REQUEST ((LONG) 0x00000404) +#define ICON_INDEX_ACCEPT ((LONG) 0x00000405) +#define ICON_INDEX_DECLINE ((LONG) 0x00000406) +#define ICON_INDEX_TENTATIVE ((LONG) 0x00000407) +#define ICON_INDEX_CANCELATION ((LONG) 0x00000408) +#define ICON_INDEX_INFORMATIONAL_UPDATE ((LONG) 0x00000409) + +/* PR_ICON_INDEX values: Task */ +#define ICON_INDEX_TASK ((LONG) 0x00000500) +#define ICON_INDEX_UNASSIGNED_RECURRING_TASK ((LONG) 0x00000501) +#define ICON_INDEX_ASSIGNEE_TASK ((LONG) 0x00000502) +#define ICON_INDEX_ASSIGNER_TASK ((LONG) 0x00000503) +#define ICON_INDEX_TASK_REQUEST ((LONG) 0x00000504) +#define ICON_INDEX_TASK_ACCEPTANCE ((LONG) 0x00000505) +#define ICON_INDEX_TASK_REJECTION ((LONG) 0x00000506) + +/* PR_ICON_INDEX values: Journal */ +#define ICON_INDEX_JOURNAL_CONVERSATION ((LONG) 0x00000601) +#define ICON_INDEX_JOURNAL_EMAIL_MESSAGE ((LONG) 0x00000602) +#define ICON_INDEX_JOURNAL_MEETING_REQUEST ((LONG) 0x00000603) +#define ICON_INDEX_JOURNAL_MEETING_RESPONSE ((LONG) 0x00000604) +#define ICON_INDEX_JOURNAL_TASK_REQUEST ((LONG) 0x00000606) +#define ICON_INDEX_JOURNAL_TASK_RESPONSE ((LONG) 0x00000607) +#define ICON_INDEX_JOURNAL_NOTE ((LONG) 0x00000608) +#define ICON_INDEX_JOURNAL_FAX ((LONG) 0x00000609) +#define ICON_INDEX_JOURNAL_PHONE_CALL ((LONG) 0x0000060A) +#define ICON_INDEX_JOURNAL_LETTER ((LONG) 0x0000060C) +#define ICON_INDEX_JOURNAL_MICROSOFT_OFFICE_WORD ((LONG) 0x0000060D) +#define ICON_INDEX_JOURNAL_MICROSOFT_OFFICE_EXCEL ((LONG) 0x0000060E) +#define ICON_INDEX_JOURNAL_MICROSOFT_OFFICE_POWER_POINT ((LONG) 0x0000060F) +#define ICON_INDEX_JOURNAL_MICROSOFT_OFFICE_ACCESS ((LONG) 0x00000610) +#define ICON_INDEX_JOURNAL_DOCUMENT ((LONG) 0x00000612) +#define ICON_INDEX_JOURNAL_MEETING ((LONG) 0x00000613) +#define ICON_INDEX_JOURNAL_MEETING_CANCELLATION ((LONG) 0x00000614) +#define ICON_INDEX_JOURNAL_REMOTE_SESSION ((LONG) 0x00000615) + +#define MAPI_IMESSAGE_METHODS(IPURE) \ + MAPIMETHOD(GetAttachmentTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(OpenAttach) \ + (THIS_ ULONG ulAttachmentNum, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPATTACH FAR * lppAttach) IPURE; \ + MAPIMETHOD(CreateAttach) \ + (THIS_ LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulAttachmentNum, \ + LPATTACH FAR * lppAttach) IPURE; \ + MAPIMETHOD(DeleteAttach) \ + (THIS_ ULONG ulAttachmentNum, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetRecipientTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(ModifyRecipients) \ + (THIS_ ULONG ulFlags, \ + LPADRLIST lpMods) IPURE; \ + MAPIMETHOD(SubmitMessage) \ + (THIS_ ULONG ulFlags) IPURE; \ + MAPIMETHOD(SetReadFlag) \ + (THIS_ ULONG ulFlags) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMessage +DECLARE_MAPI_INTERFACE_(IMessage, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IMESSAGE_METHODS(PURE) +}; + +/* IAttach Interface ------------------------------------------------------- */ + +/* IAttach attachment methods: PR_ATTACH_METHOD values */ + +#define NO_ATTACHMENT ((ULONG) 0x00000000) +#define ATTACH_BY_VALUE ((ULONG) 0x00000001) +#define ATTACH_BY_REFERENCE ((ULONG) 0x00000002) +#define ATTACH_BY_REF_RESOLVE ((ULONG) 0x00000003) +#define ATTACH_BY_REF_ONLY ((ULONG) 0x00000004) +#define ATTACH_EMBEDDED_MSG ((ULONG) 0x00000005) +#define ATTACH_OLE ((ULONG) 0x00000006) +#define ATTACH_BY_WEBREFERENCE ((ULONG) 0x00000007) + +#define MAPI_IATTACH_METHODS(IPURE) + +#undef INTERFACE +#define INTERFACE IAttach +DECLARE_MAPI_INTERFACE_(IAttach, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IATTACH_METHODS(PURE) +}; + +/* --------------------------------- */ +/* Address Book interface definition */ + +/* ADRPARM ulFlags - top 4 bits used for versioning */ + +#define GET_ADRPARM_VERSION(ulFlags) (((ULONG)ulFlags) & 0xF0000000) +#define SET_ADRPARM_VERSION(ulFlags, ulVersion) (((ULONG)ulVersion) | (((ULONG)ulFlags) & 0x0FFFFFFF)) + +/* Current versions of ADRPARM */ +#define ADRPARM_HELP_CTX ((ULONG) 0x00000000) + + +/* ulFlags - bit fields */ +#define DIALOG_MODAL ((ULONG) 0x00000001) +#define DIALOG_SDI ((ULONG) 0x00000002) +#define DIALOG_OPTIONS ((ULONG) 0x00000004) +#define ADDRESS_ONE ((ULONG) 0x00000008) +#define AB_SELECTONLY ((ULONG) 0x00000010) +#define AB_RESOLVE ((ULONG) 0x00000020) + +/* --------------------------------- */ +/* PR_DISPLAY_TYPEs */ +/* + * These standard display types are + * by default handled by MAPI. + * They have default icons associated + * with them. + */ + +/* For address book contents tables */ +#define DT_MAILUSER ((ULONG) 0x00000000) +#define DT_DISTLIST ((ULONG) 0x00000001) +#define DT_FORUM ((ULONG) 0x00000002) +#define DT_AGENT ((ULONG) 0x00000003) +#define DT_ORGANIZATION ((ULONG) 0x00000004) +#define DT_PRIVATE_DISTLIST ((ULONG) 0x00000005) +#define DT_REMOTE_MAILUSER ((ULONG) 0x00000006) + +/* For address book hierarchy tables */ +#define DT_MODIFIABLE ((ULONG) 0x00010000) +#define DT_GLOBAL ((ULONG) 0x00020000) +#define DT_LOCAL ((ULONG) 0x00030000) +#define DT_WAN ((ULONG) 0x00040000) +#define DT_NOT_SPECIFIC ((ULONG) 0x00050000) + +/* For folder hierarchy tables */ +#define DT_FOLDER ((ULONG) 0x01000000) +#define DT_FOLDER_LINK ((ULONG) 0x02000000) +#define DT_FOLDER_SPECIAL ((ULONG) 0x04000000) + +/* Accelerator callback for DIALOG_SDI form of AB UI */ +typedef BOOL (STDMETHODCALLTYPE ACCELERATEABSDI)(ULONG_PTR ulUIParam, + LPVOID lpvmsg); +typedef ACCELERATEABSDI FAR * LPFNABSDI; + +/* Callback to application telling it that the DIALOG_SDI form of the */ +/* AB UI has been dismissed. This is so that the above LPFNABSDI */ +/* function doesn't keep being called. */ +typedef void (STDMETHODCALLTYPE DISMISSMODELESS)(ULONG_PTR ulUIParam, + LPVOID lpvContext); +typedef DISMISSMODELESS FAR * LPFNDISMISS; + +/* + * Prototype for the client function hooked to an optional button on + * the address book dialog + */ + +typedef SCODE (STDMETHODCALLTYPE FAR * LPFNBUTTON)( + ULONG_PTR ulUIParam, + LPVOID lpvContext, + ULONG cbEntryID, + LPENTRYID lpSelection, + ULONG ulFlags +); + + +/* Parameters for the address book dialog */ +typedef struct _ADRPARM +{ + ULONG cbABContEntryID; + LPENTRYID lpABContEntryID; + ULONG ulFlags; + + LPVOID lpReserved; + ULONG ulHelpContext; + LPTSTR lpszHelpFileName; + + LPFNABSDI lpfnABSDI; + LPFNDISMISS lpfnDismiss; + LPVOID lpvDismissContext; + LPTSTR lpszCaption; + LPTSTR lpszNewEntryTitle; + LPTSTR lpszDestWellsTitle; + ULONG cDestFields; + ULONG nDestFieldFocus; + LPTSTR FAR * lppszDestTitles; + ULONG FAR * lpulDestComps; + LPSRestriction lpContRestriction; + LPSRestriction lpHierRestriction; +} ADRPARM, FAR * LPADRPARM; + + +/* ------------ */ +/* Random flags */ + +/* Flag for deferred error */ +#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) + +/* Flag for creating and using Folder Associated Information Messages */ +#define MAPI_ASSOCIATED ((ULONG) 0x00000040) + +/* Flags for OpenMessageStore() */ + +#define MDB_NO_DIALOG ((ULONG) 0x00000001) +#define MDB_WRITE ((ULONG) 0x00000004) +/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) above */ +/****** MAPI_BEST_ACCESS ((ULONG) 0x00000010) above */ +#define MDB_TEMPORARY ((ULONG) 0x00000020) +#define MDB_NO_MAIL ((ULONG) 0x00000080) + +/* Flags for OpenAddressBook */ + +#define AB_NO_DIALOG ((ULONG) 0x00000001) + +#ifndef AB_UNICODEUI +#define AB_UNICODEUI ((ULONG) 0x00000040) +#endif + + +/* IMAPIControl Interface -------------------------------------------------- */ + +/* Interface used in controls (particularly the button) defined by */ +/* Display Tables. */ + +/* Flags for GetState */ + +#define MAPI_ENABLED ((ULONG) 0x00000000) +#define MAPI_DISABLED ((ULONG) 0x00000001) + +#define MAPI_IMAPICONTROL_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Activate) \ + (THIS_ ULONG ulFlags, \ + ULONG_PTR ulUIParam) IPURE; \ + MAPIMETHOD(GetState) \ + (THIS_ ULONG ulFlags, \ + ULONG FAR * lpulState) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIControl +DECLARE_MAPI_INTERFACE_(IMAPIControl, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPICONTROL_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IMAPIControl, LPMAPICONTROL); + +/* Display Tables ---------------------------------------------------------- */ + +/* Flags used in display tables - that is, PR_CONTROL_FLAGS */ + +#define DT_MULTILINE ((ULONG) 0x00000001) +#define DT_EDITABLE ((ULONG) 0x00000002) +#define DT_REQUIRED ((ULONG) 0x00000004) +#define DT_SET_IMMEDIATE ((ULONG) 0x00000008) +#define DT_PASSWORD_EDIT ((ULONG) 0x00000010) +#define DT_ACCEPT_DBCS ((ULONG) 0x00000020) +#define DT_SET_SELECTION ((ULONG) 0x00000040) + +/* Display Table structures */ + +#define DTCT_LABEL ((ULONG) 0x00000000) +#define DTCT_EDIT ((ULONG) 0x00000001) +#define DTCT_LBX ((ULONG) 0x00000002) +#define DTCT_COMBOBOX ((ULONG) 0x00000003) +#define DTCT_DDLBX ((ULONG) 0x00000004) +#define DTCT_CHECKBOX ((ULONG) 0x00000005) +#define DTCT_GROUPBOX ((ULONG) 0x00000006) +#define DTCT_BUTTON ((ULONG) 0x00000007) +#define DTCT_PAGE ((ULONG) 0x00000008) +#define DTCT_RADIOBUTTON ((ULONG) 0x00000009) +#define DTCT_MVLISTBOX ((ULONG) 0x0000000B) +#define DTCT_MVDDLBX ((ULONG) 0x0000000C) + +/* Labels */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLLABEL +{ + ULONG ulbLpszLabelName; + ULONG ulFlags; +} DTBLLABEL, FAR * LPDTBLLABEL; +#define SizedDtblLabel(n,u) \ +struct _DTBLLABEL_ ## u \ +{ \ + DTBLLABEL dtbllabel; \ + TCHAR lpszLabelName[n]; \ +} u + + +/* Simple Text Edits */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLEDIT +{ + ULONG ulbLpszCharsAllowed; + ULONG ulFlags; + ULONG ulNumCharsAllowed; + ULONG ulPropTag; +} DTBLEDIT, FAR * LPDTBLEDIT; +#define SizedDtblEdit(n,u) \ +struct _DTBLEDIT_ ## u \ +{ \ + DTBLEDIT dtbledit; \ + TCHAR lpszCharsAllowed[n]; \ +} u + +/* List Box */ +/* Valid ulFlags: + */ +#define MAPI_NO_HBAR ((ULONG) 0x00000001) +#define MAPI_NO_VBAR ((ULONG) 0x00000002) + +typedef struct _DTBLLBX +{ + ULONG ulFlags; + ULONG ulPRSetProperty; + ULONG ulPRTableName; +} DTBLLBX, FAR * LPDTBLLBX; + + +/* Combo Box */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLCOMBOBOX +{ + ULONG ulbLpszCharsAllowed; + ULONG ulFlags; + ULONG ulNumCharsAllowed; + ULONG ulPRPropertyName; + ULONG ulPRTableName; +} DTBLCOMBOBOX, FAR * LPDTBLCOMBOBOX; +#define SizedDtblComboBox(n,u) \ +struct _DTBLCOMBOBOX_ ## u \ +{ \ + DTBLCOMBOBOX dtblcombobox; \ + TCHAR lpszCharsAllowed[n]; \ +} u + + +/* Drop Down */ +/* Valid ulFlags: + * none + */ +typedef struct _DTBLDDLBX +{ + ULONG ulFlags; + ULONG ulPRDisplayProperty; + ULONG ulPRSetProperty; + ULONG ulPRTableName; +} DTBLDDLBX, FAR * LPDTBLDDLBX; + + +/* Check Box */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLCHECKBOX +{ + ULONG ulbLpszLabel; + ULONG ulFlags; + ULONG ulPRPropertyName; +} DTBLCHECKBOX, FAR * LPDTBLCHECKBOX; +#define SizedDtblCheckBox(n,u) \ +struct _DTBLCHECKBOX_ ## u \ +{ \ + DTBLCHECKBOX dtblcheckbox; \ + TCHAR lpszLabel[n]; \ +} u + + + +/* Group Box */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLGROUPBOX +{ + ULONG ulbLpszLabel; + ULONG ulFlags; +} DTBLGROUPBOX, FAR * LPDTBLGROUPBOX; +#define SizedDtblGroupBox(n,u) \ +struct _DTBLGROUPBOX_ ## u \ +{ \ + DTBLGROUPBOX dtblgroupbox; \ + TCHAR lpszLabel[n]; \ +} u + +/* Button control */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLBUTTON +{ + ULONG ulbLpszLabel; + ULONG ulFlags; + ULONG ulPRControl; +} DTBLBUTTON, FAR * LPDTBLBUTTON; +#define SizedDtblButton(n,u) \ +struct _DTBLBUTTON_ ## u \ +{ \ + DTBLBUTTON dtblbutton; \ + TCHAR lpszLabel[n]; \ +} u + +/* Pages */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLPAGE +{ + ULONG ulbLpszLabel; + ULONG ulFlags; + ULONG ulbLpszComponent; + ULONG ulContext; +} DTBLPAGE, FAR * LPDTBLPAGE; +#define SizedDtblPage(n,n1,u) \ +struct _DTBLPAGE_ ## u \ +{ \ + DTBLPAGE dtblpage; \ + TCHAR lpszLabel[n]; \ + TCHAR lpszComponent[n1]; \ +} u + +/* Radio button */ +/* Valid ulFlags: + * MAPI_UNICODE + */ +typedef struct _DTBLRADIOBUTTON +{ + ULONG ulbLpszLabel; + ULONG ulFlags; + ULONG ulcButtons; + ULONG ulPropTag; + LONG lReturnValue; +} DTBLRADIOBUTTON, FAR * LPDTBLRADIOBUTTON; +#define SizedDtblRadioButton(n,u) \ +struct _DTBLRADIOBUTTON_ ## u \ +{ \ + DTBLRADIOBUTTON dtblradiobutton; \ + TCHAR lpszLabel[n]; \ +} u + + +/* MultiValued listbox */ +/* Valid ulFlags: + * none + */ +typedef struct _DTBLMVLISTBOX +{ + ULONG ulFlags; + ULONG ulMVPropTag; +} DTBLMVLISTBOX, FAR * LPDTBLMVLISTBOX; + + +/* MultiValued dropdown */ +/* Valid ulFlags: + * none + */ +typedef struct _DTBLMVDDLBX +{ + ULONG ulFlags; + ULONG ulMVPropTag; +} DTBLMVDDLBX, FAR * LPDTBLMVDDLBX; + + + + + +/* IProviderAdmin Interface ---------------------------------------------- */ + +/* Flags for ConfigureMsgService */ + +#define UI_SERVICE 0x00000002 +#define SERVICE_UI_ALWAYS 0x00000002 /* Duplicate UI_SERVICE for consistency and compatibility */ +#define SERVICE_UI_ALLOWED 0x00000010 +#define UI_CURRENT_PROVIDER_FIRST 0x00000004 +/* MSG_SERVICE_UI_READ_ONLY 0x00000008 - in MAPISPI.H */ + +/* GetProviderTable() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ + +/* Values for PR_RESOURCE_FLAGS in message service table */ + +#define MAPI_IPROVIDERADMIN_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetProviderTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(CreateProvider) \ + (THIS_ LPTSTR lpszProvider, \ + ULONG cValues, \ + LPSPropValue lpProps, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + MAPIUID FAR * lpUID) IPURE; \ + MAPIMETHOD(DeleteProvider) \ + (THIS_ LPMAPIUID lpUID) IPURE; \ + MAPIMETHOD(OpenProfileSection) \ + (THIS_ LPMAPIUID lpUID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPPROFSECT FAR * lppProfSect) IPURE; \ + + +#undef INTERFACE +#define INTERFACE IProviderAdmin +DECLARE_MAPI_INTERFACE_(IProviderAdmin, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IPROVIDERADMIN_METHODS(PURE) +}; + + + +/* IMAPIClientShutdown Interface ----------------------------------------- */ +DECLARE_MAPI_INTERFACE_PTR(IMAPIClientShutdown, LPMAPICLIENTSHUTDOWN); + +#define MAPI_IMAPICLIENTSHUTDOWN_METHODS(IPURE) \ + MAPIMETHOD(QueryFastShutdown) \ + (THIS) IPURE; \ + MAPIMETHOD(NotifyProcessShutdown) \ + (THIS) IPURE; \ + MAPIMETHOD(DoFastShutdown) \ + (THIS) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIClientShutdown +DECLARE_MAPI_INTERFACE_(IMAPIClientShutdown, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPICLIENTSHUTDOWN_METHODS(PURE) +}; + + +/* IMAPIProviderShutdown Interface --------------------------------------- */ +DECLARE_MAPI_INTERFACE_PTR(IMAPIProviderShutdown, LPMAPIPROVIDERSHUTDOWN); + +#define MAPI_IMAPIPROVIDERSHUTDOWN_METHODS(IPURE) \ + MAPIMETHOD(QueryFastShutdown) \ + (THIS) IPURE; \ + MAPIMETHOD(NotifyProcessShutdown) \ + (THIS) IPURE; \ + MAPIMETHOD(DoFastShutdown) \ + (THIS) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIProviderShutdown +DECLARE_MAPI_INTERFACE_(IMAPIProviderShutdown, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROVIDERSHUTDOWN_METHODS(PURE) +}; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#pragma warning(pop) + +#endif /* MAPIDEFS_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIForm.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIForm.h similarity index 97% rename from com/win32comext/mapi/src/mapi_headers/MAPIForm.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIForm.h index cfdd84ae9..a58de9319 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIForm.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIForm.h @@ -1,635 +1,640 @@ -/* - * M A P I F O R M . H - * - * Declarations of interfaces for clients and providers of MAPI - * forms and form registries. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef MAPIFORM_H -#define MAPIFORM_H - -#if _MSC_VER > 1000 -#pragma once -#endif - -/* Include common MAPI header files if they haven't been already. */ - -#ifndef MAPIDEFS_H -#include -#include -#include -#include -#endif - -#ifndef BEGIN_INTERFACE -#define BEGIN_INTERFACE -#endif - -#ifndef _MAC -typedef const RECT FAR *LPCRECT; -#endif - -/* HFRMREG is an enumeration which represents a registry container. - * Microsoft reserves the values from 0 to 0x3FFF for its own use. - */ - -typedef ULONG HFRMREG; - -#define HFRMREG_DEFAULT 0 -#define HFRMREG_LOCAL 1 -#define HFRMREG_PERSONAL 2 -#define HFRMREG_FOLDER 3 - -DECLARE_MAPI_INTERFACE_PTR(IPersistMessage, LPPERSISTMESSAGE); -DECLARE_MAPI_INTERFACE_PTR(IMAPIMessageSite, LPMAPIMESSAGESITE); -DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION); -DECLARE_MAPI_INTERFACE_PTR(IMAPIViewContext, LPMAPIVIEWCONTEXT); -DECLARE_MAPI_INTERFACE_PTR(IMAPIViewAdviseSink, LPMAPIVIEWADVISESINK); -DECLARE_MAPI_INTERFACE_PTR(IMAPIFormAdviseSink, LPMAPIFORMADVISESINK); -DECLARE_MAPI_INTERFACE_PTR(IMAPIFormInfo, LPMAPIFORMINFO); -DECLARE_MAPI_INTERFACE_PTR(IMAPIFormMgr, LPMAPIFORMMGR); -DECLARE_MAPI_INTERFACE_PTR(IMAPIFormContainer, LPMAPIFORMCONTAINER); -DECLARE_MAPI_INTERFACE_PTR(IMAPIForm, LPMAPIFORM); -DECLARE_MAPI_INTERFACE_PTR(IMAPIFormFactory, LPMAPIFORMFACTORY); - -typedef const char FAR *FAR * LPPCSTR; -typedef LPMAPIFORMINFO FAR *LPPMAPIFORMINFO; - -STDAPI MAPIOpenFormMgr(LPMAPISESSION pSession, LPMAPIFORMMGR FAR * ppmgr); -STDAPI MAPIOpenLocalFormContainer(LPMAPIFORMCONTAINER FAR * ppfcnt); - - -/*-- GetLastError ----------------------------------------------------------*/ -/* This defines the GetLastError method held in common by most mapiform - * interfaces. It is defined separately so that an implementor may include - * more than one mapiform interface in a class. - */ - -#define MAPI_GETLASTERROR_METHOD(IPURE) \ - MAPIMETHOD(GetLastError) (THIS_ \ - /*in*/ HRESULT hResult, \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPMAPIERROR FAR * lppMAPIError) IPURE; \ - - -/*-- IPersistMessage -------------------------------------------------------*/ -/* This interface is implemented by forms and is used to save, - * initialize and load forms to and from messages. - */ - -#define MAPI_IPERSISTMESSAGE_METHODS(IPURE) \ - MAPIMETHOD(GetClassID) (THIS_ LPCLSID lpClassID) IPURE; \ - MAPIMETHOD(IsDirty)(THIS) IPURE; \ - MAPIMETHOD(InitNew)(THIS_ \ - /*in*/ LPMAPIMESSAGESITE pMessageSite, \ - /*in*/ LPMESSAGE pMessage) IPURE; \ - MAPIMETHOD(Load)(THIS_ \ - /*in*/ LPMAPIMESSAGESITE pMessageSite, \ - /*in*/ LPMESSAGE pMessage, \ - /*in*/ ULONG ulMessageStatus, \ - /*in*/ ULONG ulMessageFlags) IPURE; \ - MAPIMETHOD(Save)(THIS_ \ - /*in*/ LPMESSAGE pMessage, \ - /*in*/ ULONG fSameAsLoad) IPURE; \ - MAPIMETHOD(SaveCompleted)(THIS_ \ - /*in*/ LPMESSAGE pMessage) IPURE; \ - MAPIMETHOD(HandsOffMessage)(THIS) IPURE; \ - -#undef INTERFACE -#define INTERFACE IPersistMessage -DECLARE_MAPI_INTERFACE_(IPersistMessage, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_GETLASTERROR_METHOD(PURE) - MAPI_IPERSISTMESSAGE_METHODS(PURE) -}; - - -/*-- IMAPIMessageSite ------------------------------------------------------*/ - -#define MAPI_IMAPIMESSAGESITE_METHODS(IPURE) \ - MAPIMETHOD(GetSession) (THIS_ \ - /*out*/ LPMAPISESSION FAR * ppSession) IPURE; \ - MAPIMETHOD(GetStore) (THIS_ \ - /*out*/ LPMDB FAR * ppStore) IPURE; \ - MAPIMETHOD(GetFolder) (THIS_ \ - /*out*/ LPMAPIFOLDER FAR * ppFolder) IPURE; \ - MAPIMETHOD(GetMessage) (THIS_ \ - /*out*/ LPMESSAGE FAR * ppmsg) IPURE; \ - MAPIMETHOD(GetFormManager) (THIS_ \ - /*out*/ LPMAPIFORMMGR FAR * ppFormMgr) IPURE; \ - MAPIMETHOD(NewMessage) (THIS_ \ - /*in*/ ULONG fComposeInFolder, \ - /*in*/ LPMAPIFOLDER pFolderFocus, \ - /*in*/ LPPERSISTMESSAGE pPersistMessage, \ - /*out*/ LPMESSAGE FAR * ppMessage, \ - /*out*/ LPMAPIMESSAGESITE FAR * ppMessageSite, \ - /*out*/ LPMAPIVIEWCONTEXT FAR * ppViewContext) IPURE; \ - MAPIMETHOD(CopyMessage) (THIS_ \ - /*in*/ LPMAPIFOLDER pFolderDestination) IPURE; \ - MAPIMETHOD(MoveMessage) (THIS_ \ - /*in*/ LPMAPIFOLDER pFolderDestination, \ - /*in*/ LPMAPIVIEWCONTEXT pViewContext, \ - /*in*/ LPCRECT prcPosRect) IPURE; \ - MAPIMETHOD(DeleteMessage) (THIS_ \ - /*in*/ LPMAPIVIEWCONTEXT pViewContext, \ - /*in*/ LPCRECT prcPosRect) IPURE; \ - MAPIMETHOD(SaveMessage) (THIS) IPURE; \ - MAPIMETHOD(SubmitMessage) (THIS_ \ - /*in*/ ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetSiteStatus) (THIS_ \ - /*out*/ LPULONG lpulStatus) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIMessageSite -DECLARE_MAPI_INTERFACE_(IMAPIMessageSite, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_GETLASTERROR_METHOD(PURE) - MAPI_IMAPIMESSAGESITE_METHODS(PURE) -}; - - -/*-- IMAPIForm -------------------------------------------------------------*/ -/* This interface is implemented by forms for the benefit of viewers. - * One method (ShutdownForm) is provided such that simple forms implementing - * only IMAPIForm and IPersistMessage have reasonable embedding behavior. - */ - -#define MAPI_IMAPIFORM_METHODS(IPURE) \ - MAPIMETHOD(SetViewContext) (THIS_ \ - /*in*/ LPMAPIVIEWCONTEXT pViewContext) IPURE; \ - MAPIMETHOD(GetViewContext) (THIS_ \ - /*out*/ LPMAPIVIEWCONTEXT FAR * ppViewContext) IPURE; \ - MAPIMETHOD(ShutdownForm)(THIS_ \ - /*in*/ ULONG ulSaveOptions) IPURE; \ - MAPIMETHOD(DoVerb) (THIS_ \ - /*in*/ LONG iVerb, \ - /*in*/ LPMAPIVIEWCONTEXT lpViewContext, /* can be null */ \ - /*in*/ ULONG_PTR hwndParent, \ - /*in*/ LPCRECT lprcPosRect) IPURE; \ - MAPIMETHOD(Advise)(THIS_ \ - /*in*/ LPMAPIVIEWADVISESINK pAdvise, \ - /*out*/ ULONG_PTR FAR * pdwStatus) IPURE; \ - MAPIMETHOD(Unadvise) (THIS_ \ - /*in*/ ULONG_PTR ulConnection) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIForm -DECLARE_MAPI_INTERFACE_(IMAPIForm, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_GETLASTERROR_METHOD(PURE) - MAPI_IMAPIFORM_METHODS(PURE) -}; - -typedef enum tagSAVEOPTS -{ - SAVEOPTS_SAVEIFDIRTY = 0, - SAVEOPTS_NOSAVE = 1, - SAVEOPTS_PROMPTSAVE = 2 -} SAVEOPTS; - - -/*-- IMAPIViewContext ------------------------------------------------------*/ -/* Implemented by viewers to support next/previous in forms. - */ - -/* Structure passed in GetPrintSetup */ - -typedef struct { - ULONG ulFlags; /* MAPI_UNICODE */ - HGLOBAL hDevMode; - HGLOBAL hDevNames; - ULONG ulFirstPageNumber; - ULONG fPrintAttachments; -} FORMPRINTSETUP, FAR * LPFORMPRINTSETUP; - -/* Values for pulFormat in GetSaveStream */ - -#define SAVE_FORMAT_TEXT 1 -#define SAVE_FORMAT_RICHTEXT 2 - -/* Values from 0 to 0x3fff are reserved for future definition by Microsoft */ - -#define MAPI_IMAPIVIEWCONTEXT_METHODS(IPURE) \ - MAPIMETHOD(SetAdviseSink)(THIS_ \ - /*in*/ LPMAPIFORMADVISESINK pmvns) IPURE; \ - MAPIMETHOD(ActivateNext)(THIS_ \ - /*in*/ ULONG ulDir, \ - /*in*/ LPCRECT prcPosRect) IPURE; \ - MAPIMETHOD(GetPrintSetup)(THIS_ \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPFORMPRINTSETUP FAR * lppFormPrintSetup) IPURE; \ - MAPIMETHOD(GetSaveStream)(THIS_ \ - /*out*/ ULONG FAR * pulFlags, \ - /*out*/ ULONG FAR * pulFormat, \ - /*out*/ LPSTREAM FAR * ppstm) IPURE; \ - MAPIMETHOD(GetViewStatus) (THIS_ \ - /*out*/ LPULONG lpulStatus) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIViewContext -DECLARE_MAPI_INTERFACE_(IMAPIViewContext, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_GETLASTERROR_METHOD(PURE) - MAPI_IMAPIVIEWCONTEXT_METHODS(PURE) -}; - -#define VCSTATUS_NEXT 0x00000001 -#define VCSTATUS_PREV 0x00000002 -#define VCSTATUS_MODAL 0x00000004 -#define VCSTATUS_INTERACTIVE 0x00000008 -#define VCSTATUS_READONLY 0x00000010 -#define VCSTATUS_DELETE 0x00010000 -#define VCSTATUS_COPY 0x00020000 -#define VCSTATUS_MOVE 0x00040000 -#define VCSTATUS_SUBMIT 0x00080000 -#define VCSTATUS_DELETE_IS_MOVE 0x00100000 -#define VCSTATUS_SAVE 0x00200000 -#define VCSTATUS_NEW_MESSAGE 0x00400000 - -#define VCDIR_NEXT VCSTATUS_NEXT -#define VCDIR_PREV VCSTATUS_PREV -#define VCDIR_DELETE VCSTATUS_DELETE -#define VCDIR_MOVE VCSTATUS_MOVE - - -/*-- IMAPIFormAdviseSink ---------------------------------------------------*/ -/* Part of form server, held by view; receives notifications from the view. - * - * This part of the form server, but is not an interface on the form - * object. This means that clients should not expect to QueryInterface - * from an IMAPIForm* or IOleObject* to this interface, or vice versa. - */ - -#define MAPI_IMAPIFORMADVISESINK_METHODS(IPURE) \ - STDMETHOD(OnChange)(THIS_ ULONG ulDir) IPURE; \ - STDMETHOD(OnActivateNext)(THIS_ \ - /*in*/ LPCSTR lpszMessageClass, \ - /*in*/ ULONG ulMessageStatus, \ - /*in*/ ULONG ulMessageFlags, \ - /*out*/ LPPERSISTMESSAGE FAR * ppPersistMessage) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIFormAdviseSink -DECLARE_MAPI_INTERFACE_(IMAPIFormAdviseSink, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIFORMADVISESINK_METHODS(PURE) -}; - - -/*-- IMAPIViewAdviseSink ---------------------------------------------------*/ -/* Part of view context, held by form; receives notifications from the form. - */ - -#define MAPI_IMAPIVIEWADVISESINK_METHODS(IPURE) \ - MAPIMETHOD(OnShutdown)(THIS) IPURE; \ - MAPIMETHOD(OnNewMessage)(THIS) IPURE; \ - MAPIMETHOD(OnPrint)(THIS_ \ - /*in*/ ULONG dwPageNumber, \ - /*in*/ HRESULT hrStatus) IPURE; \ - MAPIMETHOD(OnSubmitted) (THIS) IPURE; \ - MAPIMETHOD(OnSaved) (THIS) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIViewAdviseSink -DECLARE_MAPI_INTERFACE_(IMAPIViewAdviseSink, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIVIEWADVISESINK_METHODS(PURE) -}; - - -/*-- IMAPIFormInfo ---------------------------------------------------------*/ -/* Is implemented by registries. Describes the form. - */ - -/* Single enum value */ - -typedef struct -{ /* fpev */ - LPTSTR pszDisplayName; /* carries the display string */ - ULONG nVal; /* the value for the above enumeration */ -} SMAPIFormPropEnumVal, FAR * LPMAPIFORMPROPENUMVAL; - -/* MAPI Form property descriptor */ - -/* - * Values for the tag in the SMAPIFormProp structure - * - * Microsoft reserves the range from 0 to 0x3FFF for future use in its other - * forms registry implementations. - */ - -typedef ULONG FORMPROPSPECIALTYPE; - -#define FPST_VANILLA 0 -#define FPST_ENUM_PROP 1 - -typedef struct -{ - ULONG ulFlags; /* Contains MAPI_UNICODE if strings are UNICODE */ - ULONG nPropType; /* type of the property, hiword is 0 */ - MAPINAMEID nmid; /* id of the property */ - LPTSTR pszDisplayName; - FORMPROPSPECIALTYPE nSpecialType; /* tag for the following union */ - union - { - struct - { - MAPINAMEID nmidIdx; - ULONG cfpevAvailable; /* # of enums */ - LPMAPIFORMPROPENUMVAL pfpevAvailable; - } s1; /* Property String/Number association Enumeration */ - } u; -} SMAPIFormProp, FAR * LPMAPIFORMPROP; - -/* Array of form properties */ - -typedef struct -{ - ULONG cProps; - ULONG ulPad; /* Pad to 8-byte alignment for insurance */ - SMAPIFormProp aFormProp[MAPI_DIM]; -} SMAPIFormPropArray, FAR * LPMAPIFORMPROPARRAY; - -#define CbMAPIFormPropArray(_c) \ - (offsetof(SMAPIFormPropArray, aFormProp) + \ - (_c)*sizeof(SMAPIFormProp)) - -/* Structure defining the layout of an mapi verb description */ - -typedef struct -{ - LONG lVerb; - LPTSTR szVerbname; - DWORD fuFlags; - DWORD grfAttribs; - ULONG ulFlags; /* Either 0 or MAPI_UNICODE */ -} SMAPIVerb, FAR * LPMAPIVERB; - -/* Structure used for returning arrays of mapi verbs */ - -typedef struct -{ - ULONG cMAPIVerb; /* Number of verbs in the structure */ - SMAPIVerb aMAPIVerb[MAPI_DIM]; -} SMAPIVerbArray, FAR * LPMAPIVERBARRAY; - -#define CbMAPIVerbArray(_c) \ - (offsetof(SMAPIVerbArray, aMAPIVerb) + \ - (_c)*sizeof(SMAPIVerb)) - -#define MAPI_IMAPIFORMINFO_METHODS(IPURE) \ - MAPIMETHOD(CalcFormPropSet)(THIS_ \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPMAPIFORMPROPARRAY FAR * ppFormPropArray) IPURE; \ - MAPIMETHOD(CalcVerbSet)(THIS_ \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPMAPIVERBARRAY FAR * ppMAPIVerbArray) IPURE; \ - MAPIMETHOD(MakeIconFromBinary)(THIS_ \ - /*in*/ ULONG nPropID, \ - /*out*/ HICON FAR* phicon) IPURE; \ - MAPIMETHOD(SaveForm)(THIS_ \ - /*in*/ LPCTSTR szFileName) IPURE; \ - MAPIMETHOD(OpenFormContainer)(THIS_ \ - /*out*/ LPMAPIFORMCONTAINER FAR * ppformcontainer) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIFormInfo -DECLARE_MAPI_INTERFACE_(IMAPIFormInfo, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) /* note: subsumes getlasterror */ - MAPI_IMAPIFORMINFO_METHODS(PURE) -}; - - -/* Enumeration of permissible values for PR_FORM_MESSAGE_BEHAVIOR */ - -#define MAPI_MESSAGE_BEHAVIOR_IPM 0 -#define MAPI_MESSAGE_BEHAVIOR_FOLDER 1 - - -/*-- IMAPIFormMgr ----------------------------------------------------------*/ -/* The client-visible interface for form resolution and dispatch. - */ - -/* Structure containing an array of message class strings */ - -typedef struct -{ - ULONG cValues; - LPCSTR aMessageClass[MAPI_DIM]; -} SMessageClassArray, FAR * LPSMESSAGECLASSARRAY; - -#define CbMessageClassArray(_c) \ - (offsetof(SMessageClassArray, aMessageClass) + (_c)*sizeof(LPCSTR)) - -/* Structure containing an array of IMAPIFormInfo interfaces */ - -typedef struct -{ - ULONG cForms; - LPMAPIFORMINFO aFormInfo[MAPI_DIM]; -} SMAPIFormInfoArray, FAR * LPSMAPIFORMINFOARRAY; - -#define CbMAPIFormInfoArray(_c) \ - (offsetof(SMAPIFormInfoArray, aFormInfo) + \ - (_c)*sizeof(LPMAPIFORMINFO)) - -/* Flags for IMAPIFormMgr::SelectFormContainer */ - -#define MAPIFORM_SELECT_ALL_REGISTRIES 0 -#define MAPIFORM_SELECT_FOLDER_REGISTRY_ONLY 1 -#define MAPIFORM_SELECT_NON_FOLDER_REGISTRY_ONLY 2 - -/* Flags for IMAPIFormMgr::CalcFormPropSet */ - -#define FORMPROPSET_UNION 0 -#define FORMPROPSET_INTERSECTION 1 - -/* Flags for IMAPIFormMgr::ResolveMessageClass and - IMAPIFormMgr::ResolveMultipleMessageClasses */ - -#define MAPIFORM_EXACTMATCH 0x0020 - -#define MAPI_IMAPIFORMMGR_METHODS(IPURE) \ - MAPIMETHOD(LoadForm)(THIS_ \ - /*in*/ ULONG_PTR ulUIParam, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPCSTR lpszMessageClass, \ - /*in*/ ULONG ulMessageStatus, \ - /*in*/ ULONG ulMessageFlags, \ - /*in*/ LPMAPIFOLDER pFolderFocus, \ - /*in*/ LPMAPIMESSAGESITE pMessageSite, \ - /*in*/ LPMESSAGE pmsg, \ - /*in*/ LPMAPIVIEWCONTEXT pViewContext, \ - /*in*/ REFIID riid, \ - /*out*/ LPVOID FAR *ppvObj) IPURE; \ - MAPIMETHOD(ResolveMessageClass)(THIS_ \ - /*in*/ LPCSTR szMsgClass, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPMAPIFOLDER pFolderFocus, /* can be null */ \ - /*out*/ LPMAPIFORMINFO FAR* ppResult) IPURE; \ - MAPIMETHOD(ResolveMultipleMessageClasses)(THIS_ \ - /*in*/ LPSMESSAGECLASSARRAY pMsgClasses, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPMAPIFOLDER pFolderFocus, /* can be null */ \ - /*out*/ LPSMAPIFORMINFOARRAY FAR * pfrminfoarray) IPURE; \ - MAPIMETHOD(CalcFormPropSet)(THIS_ \ - /*in*/ LPSMAPIFORMINFOARRAY pfrminfoarray, \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPMAPIFORMPROPARRAY FAR* ppResults) IPURE; \ - MAPIMETHOD(CreateForm)(THIS_ \ - /*in*/ ULONG_PTR ulUIParam, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPMAPIFORMINFO pfrminfoToActivate, \ - /*in*/ REFIID refiidToAsk, \ - /*out*/ LPVOID FAR* ppvObj) IPURE; \ - MAPIMETHOD(SelectForm)(THIS_ \ - /*in*/ ULONG_PTR ulUIParam, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPCTSTR pszTitle, \ - /*in*/ LPMAPIFOLDER pfld, \ - /*out*/ LPMAPIFORMINFO FAR * ppfrminfoReturned) IPURE; \ - MAPIMETHOD(SelectMultipleForms)(THIS_ \ - /*in*/ ULONG_PTR ulUIParam, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPCTSTR pszTitle, \ - /*in*/ LPMAPIFOLDER pfld, \ - /*in*/ LPSMAPIFORMINFOARRAY pfrminfoarray, \ - /*out*/ LPSMAPIFORMINFOARRAY FAR * ppfrminfoarray) IPURE; \ - MAPIMETHOD(SelectFormContainer)(THIS_ \ - /*in*/ ULONG_PTR ulUIParam, \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPMAPIFORMCONTAINER FAR * lppfcnt) IPURE; \ - MAPIMETHOD(OpenFormContainer)(THIS_ \ - /*in*/ HFRMREG hfrmreg, \ - /*in*/ LPUNKNOWN lpunk, \ - /*out*/ LPMAPIFORMCONTAINER FAR * lppfcnt) IPURE; \ - MAPIMETHOD(PrepareForm)(THIS_ \ - /*in*/ ULONG_PTR ulUIParam, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPMAPIFORMINFO pfrminfo) IPURE; \ - MAPIMETHOD(IsInConflict)(THIS_ \ - /*in*/ ULONG ulMessageFlags, \ - /*in*/ ULONG ulMessageStatus, \ - /*in*/ LPCSTR szMessageClass, \ - /*in*/ LPMAPIFOLDER pFolderFocus) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIFormMgr -DECLARE_MAPI_INTERFACE_(IMAPIFormMgr, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_GETLASTERROR_METHOD(PURE) - MAPI_IMAPIFORMMGR_METHODS(PURE) -}; - -/* Platform numbers (used in .CFG files for forms) */ - -#define MAPIFORM_CPU_X86 1 -#define MAPIFORM_CPU_MIP 2 -#define MAPIFORM_CPU_AXP 3 -#define MAPIFORM_CPU_PPC 4 -#define MAPIFORM_CPU_M68 5 -#define MAPIFORM_CPU_X64 6 - -#define MAPIFORM_OS_WIN_31 1 -#define MAPIFORM_OS_WINNT_35 2 -#define MAPIFORM_OS_WIN_95 3 -#define MAPIFORM_OS_MAC_7x 4 -#define MAPIFORM_OS_WINNT_40 5 -#define MAPIFORM_OS_WINNT_50 6 -#define MAPIFORM_OS_WINNT_60 7 - -#define MAPIFORM_PLATFORM(CPU, OS) ((ULONG) ((((ULONG) CPU) << 16) | OS)) - - -/*-- IMAPIFormContainer -------------------------------------------------*/ - -/* Flags for IMAPIFormMgr::CalcFormPropSet */ - -/* #define FORMPROPSET_UNION 0 */ -/* #define FORMPROPSET_INTERSECTION 1 */ - -/* Flags for IMAPIFormMgr::InstallForm */ - -#define MAPIFORM_INSTALL_DIALOG MAPI_DIALOG -#define MAPIFORM_INSTALL_OVERWRITEONCONFLICT 0x0010 - -/* Flags for IMAPIFormContainer::ResolveMessageClass and - IMAPIFormContainer::ResolveMultipleMessageClasses */ -/* #define MAPIFORM_EXACTIMATCH 0x0020 */ - -#define MAPI_IMAPIFORMCONTAINER_METHODS(IPURE) \ - MAPIMETHOD(InstallForm)(THIS_ \ - /*in*/ ULONG_PTR ulUIParam, \ - /*in*/ ULONG ulFlags, \ - /*in*/ LPCTSTR szCfgPathName) IPURE; \ - MAPIMETHOD(RemoveForm)(THIS_ \ - /*in*/ LPCSTR szMessageClass) IPURE; \ - MAPIMETHOD(ResolveMessageClass) (THIS_ \ - /*in*/ LPCSTR szMessageClass, \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPMAPIFORMINFO FAR * pforminfo) IPURE; \ - MAPIMETHOD(ResolveMultipleMessageClasses) (THIS_ \ - /*in*/ LPSMESSAGECLASSARRAY pMsgClassArray, \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPSMAPIFORMINFOARRAY FAR * ppfrminfoarray) IPURE; \ - MAPIMETHOD(CalcFormPropSet)(THIS_ \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPMAPIFORMPROPARRAY FAR * ppResults) IPURE; \ - MAPIMETHOD(GetDisplay)(THIS_ \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPTSTR FAR * pszDisplayName) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIFormContainer -DECLARE_MAPI_INTERFACE_(IMAPIFormContainer, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_GETLASTERROR_METHOD(PURE) - MAPI_IMAPIFORMCONTAINER_METHODS(PURE) -}; - -/*-- IMAPIFormFactory ------------------------------------------------------*/ - -#define MAPI_IMAPIFORMFACTORY_METHODS(IPURE) \ - MAPIMETHOD(CreateClassFactory) (THIS_ \ - /*in*/ REFCLSID clsidForm, \ - /*in*/ ULONG ulFlags, \ - /*out*/ LPCLASSFACTORY FAR * lppClassFactory) IPURE; \ - MAPIMETHOD(LockServer) (THIS_ \ - /*in*/ ULONG ulFlags, \ - /*in*/ ULONG fLockServer) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPIFormFactory -DECLARE_MAPI_INTERFACE_(IMAPIFormFactory, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_GETLASTERROR_METHOD(PURE) - MAPI_IMAPIFORMFACTORY_METHODS(PURE) -}; - -#endif /* MAPIFORM_H */ - - - +/* + * M A P I F O R M . H + * + * Declarations of interfaces for clients and providers of MAPI + * forms and form registries. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPIFORM_H +#define MAPIFORM_H + +#if _MSC_VER > 1000 +#pragma once +#endif + +/* Include common MAPI header files if they haven't been already. */ + +#ifndef MAPIDEFS_H +#include +#include +#include +#include +#endif + +#pragma warning(push) +#pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union + + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +#ifndef _MAC +typedef const RECT FAR *LPCRECT; +#endif + +/* HFRMREG is an enumeration which represents a registry container. + * Microsoft reserves the values from 0 to 0x3FFF for its own use. + */ + +typedef ULONG HFRMREG; + +#define HFRMREG_DEFAULT 0 +#define HFRMREG_LOCAL 1 +#define HFRMREG_PERSONAL 2 +#define HFRMREG_FOLDER 3 + +DECLARE_MAPI_INTERFACE_PTR(IPersistMessage, LPPERSISTMESSAGE); +DECLARE_MAPI_INTERFACE_PTR(IMAPIMessageSite, LPMAPIMESSAGESITE); +DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION); +DECLARE_MAPI_INTERFACE_PTR(IMAPIViewContext, LPMAPIVIEWCONTEXT); +DECLARE_MAPI_INTERFACE_PTR(IMAPIViewAdviseSink, LPMAPIVIEWADVISESINK); +DECLARE_MAPI_INTERFACE_PTR(IMAPIFormAdviseSink, LPMAPIFORMADVISESINK); +DECLARE_MAPI_INTERFACE_PTR(IMAPIFormInfo, LPMAPIFORMINFO); +DECLARE_MAPI_INTERFACE_PTR(IMAPIFormMgr, LPMAPIFORMMGR); +DECLARE_MAPI_INTERFACE_PTR(IMAPIFormContainer, LPMAPIFORMCONTAINER); +DECLARE_MAPI_INTERFACE_PTR(IMAPIForm, LPMAPIFORM); +DECLARE_MAPI_INTERFACE_PTR(IMAPIFormFactory, LPMAPIFORMFACTORY); + +typedef const char FAR *FAR * LPPCSTR; +typedef LPMAPIFORMINFO FAR *LPPMAPIFORMINFO; + +STDAPI MAPIOpenFormMgr(LPMAPISESSION pSession, LPMAPIFORMMGR FAR * ppmgr); +STDAPI MAPIOpenLocalFormContainer(LPMAPIFORMCONTAINER FAR * ppfcnt); + + +/*-- GetLastError ----------------------------------------------------------*/ +/* This defines the GetLastError method held in common by most mapiform + * interfaces. It is defined separately so that an implementor may include + * more than one mapiform interface in a class. + */ + +#define MAPI_GETLASTERROR_METHOD(IPURE) \ + MAPIMETHOD(GetLastError) (THIS_ \ + /*in*/ HRESULT hResult, \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPMAPIERROR FAR * lppMAPIError) IPURE; \ + + +/*-- IPersistMessage -------------------------------------------------------*/ +/* This interface is implemented by forms and is used to save, + * initialize and load forms to and from messages. + */ + +#define MAPI_IPERSISTMESSAGE_METHODS(IPURE) \ + MAPIMETHOD(GetClassID) (THIS_ LPCLSID lpClassID) IPURE; \ + MAPIMETHOD(IsDirty)(THIS) IPURE; \ + MAPIMETHOD(InitNew)(THIS_ \ + /*in*/ LPMAPIMESSAGESITE pMessageSite, \ + /*in*/ LPMESSAGE pMessage) IPURE; \ + MAPIMETHOD(Load)(THIS_ \ + /*in*/ LPMAPIMESSAGESITE pMessageSite, \ + /*in*/ LPMESSAGE pMessage, \ + /*in*/ ULONG ulMessageStatus, \ + /*in*/ ULONG ulMessageFlags) IPURE; \ + MAPIMETHOD(Save)(THIS_ \ + /*in*/ LPMESSAGE pMessage, \ + /*in*/ ULONG fSameAsLoad) IPURE; \ + MAPIMETHOD(SaveCompleted)(THIS_ \ + /*in*/ LPMESSAGE pMessage) IPURE; \ + MAPIMETHOD(HandsOffMessage)(THIS) IPURE; \ + +#undef INTERFACE +#define INTERFACE IPersistMessage +DECLARE_MAPI_INTERFACE_(IPersistMessage, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_GETLASTERROR_METHOD(PURE) + MAPI_IPERSISTMESSAGE_METHODS(PURE) +}; + + +/*-- IMAPIMessageSite ------------------------------------------------------*/ + +#define MAPI_IMAPIMESSAGESITE_METHODS(IPURE) \ + MAPIMETHOD(GetSession) (THIS_ \ + /*out*/ LPMAPISESSION FAR * ppSession) IPURE; \ + MAPIMETHOD(GetStore) (THIS_ \ + /*out*/ LPMDB FAR * ppStore) IPURE; \ + MAPIMETHOD(GetFolder) (THIS_ \ + /*out*/ LPMAPIFOLDER FAR * ppFolder) IPURE; \ + MAPIMETHOD(GetMessage) (THIS_ \ + /*out*/ LPMESSAGE FAR * ppmsg) IPURE; \ + MAPIMETHOD(GetFormManager) (THIS_ \ + /*out*/ LPMAPIFORMMGR FAR * ppFormMgr) IPURE; \ + MAPIMETHOD(NewMessage) (THIS_ \ + /*in*/ ULONG fComposeInFolder, \ + /*in*/ LPMAPIFOLDER pFolderFocus, \ + /*in*/ LPPERSISTMESSAGE pPersistMessage, \ + /*out*/ LPMESSAGE FAR * ppMessage, \ + /*out*/ LPMAPIMESSAGESITE FAR * ppMessageSite, \ + /*out*/ LPMAPIVIEWCONTEXT FAR * ppViewContext) IPURE; \ + MAPIMETHOD(CopyMessage) (THIS_ \ + /*in*/ LPMAPIFOLDER pFolderDestination) IPURE; \ + MAPIMETHOD(MoveMessage) (THIS_ \ + /*in*/ LPMAPIFOLDER pFolderDestination, \ + /*in*/ LPMAPIVIEWCONTEXT pViewContext, \ + /*in*/ LPCRECT prcPosRect) IPURE; \ + MAPIMETHOD(DeleteMessage) (THIS_ \ + /*in*/ LPMAPIVIEWCONTEXT pViewContext, \ + /*in*/ LPCRECT prcPosRect) IPURE; \ + MAPIMETHOD(SaveMessage) (THIS) IPURE; \ + MAPIMETHOD(SubmitMessage) (THIS_ \ + /*in*/ ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetSiteStatus) (THIS_ \ + /*out*/ LPULONG lpulStatus) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIMessageSite +DECLARE_MAPI_INTERFACE_(IMAPIMessageSite, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_GETLASTERROR_METHOD(PURE) + MAPI_IMAPIMESSAGESITE_METHODS(PURE) +}; + + +/*-- IMAPIForm -------------------------------------------------------------*/ +/* This interface is implemented by forms for the benefit of viewers. + * One method (ShutdownForm) is provided such that simple forms implementing + * only IMAPIForm and IPersistMessage have reasonable embedding behavior. + */ + +#define MAPI_IMAPIFORM_METHODS(IPURE) \ + MAPIMETHOD(SetViewContext) (THIS_ \ + /*in*/ LPMAPIVIEWCONTEXT pViewContext) IPURE; \ + MAPIMETHOD(GetViewContext) (THIS_ \ + /*out*/ LPMAPIVIEWCONTEXT FAR * ppViewContext) IPURE; \ + MAPIMETHOD(ShutdownForm)(THIS_ \ + /*in*/ ULONG ulSaveOptions) IPURE; \ + MAPIMETHOD(DoVerb) (THIS_ \ + /*in*/ LONG iVerb, \ + /*in*/ LPMAPIVIEWCONTEXT lpViewContext, /* can be null */ \ + /*in*/ ULONG_PTR hwndParent, \ + /*in*/ LPCRECT lprcPosRect) IPURE; \ + MAPIMETHOD(Advise)(THIS_ \ + /*in*/ LPMAPIVIEWADVISESINK pAdvise, \ + /*out*/ ULONG_PTR FAR * pdwStatus) IPURE; \ + MAPIMETHOD(Unadvise) (THIS_ \ + /*in*/ ULONG_PTR ulConnection) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIForm +DECLARE_MAPI_INTERFACE_(IMAPIForm, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_GETLASTERROR_METHOD(PURE) + MAPI_IMAPIFORM_METHODS(PURE) +}; + +typedef enum tagSAVEOPTS +{ + SAVEOPTS_SAVEIFDIRTY = 0, + SAVEOPTS_NOSAVE = 1, + SAVEOPTS_PROMPTSAVE = 2 +} SAVEOPTS; + + +/*-- IMAPIViewContext ------------------------------------------------------*/ +/* Implemented by viewers to support next/previous in forms. + */ + +/* Structure passed in GetPrintSetup */ + +typedef struct { + ULONG ulFlags; /* MAPI_UNICODE */ + HGLOBAL hDevMode; + HGLOBAL hDevNames; + ULONG ulFirstPageNumber; + ULONG fPrintAttachments; +} FORMPRINTSETUP, FAR * LPFORMPRINTSETUP; + +/* Values for pulFormat in GetSaveStream */ + +#define SAVE_FORMAT_TEXT 1 +#define SAVE_FORMAT_RICHTEXT 2 + +/* Values from 0 to 0x3fff are reserved for future definition by Microsoft */ + +#define MAPI_IMAPIVIEWCONTEXT_METHODS(IPURE) \ + MAPIMETHOD(SetAdviseSink)(THIS_ \ + /*in*/ LPMAPIFORMADVISESINK pmvns) IPURE; \ + MAPIMETHOD(ActivateNext)(THIS_ \ + /*in*/ ULONG ulDir, \ + /*in*/ LPCRECT prcPosRect) IPURE; \ + MAPIMETHOD(GetPrintSetup)(THIS_ \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPFORMPRINTSETUP FAR * lppFormPrintSetup) IPURE; \ + MAPIMETHOD(GetSaveStream)(THIS_ \ + /*out*/ ULONG FAR * pulFlags, \ + /*out*/ ULONG FAR * pulFormat, \ + /*out*/ LPSTREAM FAR * ppstm) IPURE; \ + MAPIMETHOD(GetViewStatus) (THIS_ \ + /*out*/ LPULONG lpulStatus) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIViewContext +DECLARE_MAPI_INTERFACE_(IMAPIViewContext, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_GETLASTERROR_METHOD(PURE) + MAPI_IMAPIVIEWCONTEXT_METHODS(PURE) +}; + +#define VCSTATUS_NEXT 0x00000001 +#define VCSTATUS_PREV 0x00000002 +#define VCSTATUS_MODAL 0x00000004 +#define VCSTATUS_INTERACTIVE 0x00000008 +#define VCSTATUS_READONLY 0x00000010 +#define VCSTATUS_DELETE 0x00010000 +#define VCSTATUS_COPY 0x00020000 +#define VCSTATUS_MOVE 0x00040000 +#define VCSTATUS_SUBMIT 0x00080000 +#define VCSTATUS_DELETE_IS_MOVE 0x00100000 +#define VCSTATUS_SAVE 0x00200000 +#define VCSTATUS_NEW_MESSAGE 0x00400000 + +#define VCDIR_NEXT VCSTATUS_NEXT +#define VCDIR_PREV VCSTATUS_PREV +#define VCDIR_DELETE VCSTATUS_DELETE +#define VCDIR_MOVE VCSTATUS_MOVE + + +/*-- IMAPIFormAdviseSink ---------------------------------------------------*/ +/* Part of form server, held by view; receives notifications from the view. + * + * This part of the form server, but is not an interface on the form + * object. This means that clients should not expect to QueryInterface + * from an IMAPIForm* or IOleObject* to this interface, or vice versa. + */ + +#define MAPI_IMAPIFORMADVISESINK_METHODS(IPURE) \ + STDMETHOD(OnChange)(THIS_ ULONG ulDir) IPURE; \ + STDMETHOD(OnActivateNext)(THIS_ \ + /*in*/ LPCSTR lpszMessageClass, \ + /*in*/ ULONG ulMessageStatus, \ + /*in*/ ULONG ulMessageFlags, \ + /*out*/ LPPERSISTMESSAGE FAR * ppPersistMessage) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIFormAdviseSink +DECLARE_MAPI_INTERFACE_(IMAPIFormAdviseSink, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIFORMADVISESINK_METHODS(PURE) +}; + + +/*-- IMAPIViewAdviseSink ---------------------------------------------------*/ +/* Part of view context, held by form; receives notifications from the form. + */ + +#define MAPI_IMAPIVIEWADVISESINK_METHODS(IPURE) \ + MAPIMETHOD(OnShutdown)(THIS) IPURE; \ + MAPIMETHOD(OnNewMessage)(THIS) IPURE; \ + MAPIMETHOD(OnPrint)(THIS_ \ + /*in*/ ULONG dwPageNumber, \ + /*in*/ HRESULT hrStatus) IPURE; \ + MAPIMETHOD(OnSubmitted) (THIS) IPURE; \ + MAPIMETHOD(OnSaved) (THIS) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIViewAdviseSink +DECLARE_MAPI_INTERFACE_(IMAPIViewAdviseSink, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIVIEWADVISESINK_METHODS(PURE) +}; + + +/*-- IMAPIFormInfo ---------------------------------------------------------*/ +/* Is implemented by registries. Describes the form. + */ + +/* Single enum value */ + +typedef struct +{ /* fpev */ + LPTSTR pszDisplayName; /* carries the display string */ + ULONG nVal; /* the value for the above enumeration */ +} SMAPIFormPropEnumVal, FAR * LPMAPIFORMPROPENUMVAL; + +/* MAPI Form property descriptor */ + +/* + * Values for the tag in the SMAPIFormProp structure + * + * Microsoft reserves the range from 0 to 0x3FFF for future use in its other + * forms registry implementations. + */ + +typedef ULONG FORMPROPSPECIALTYPE; + +#define FPST_VANILLA 0 +#define FPST_ENUM_PROP 1 + +typedef struct +{ + ULONG ulFlags; /* Contains MAPI_UNICODE if strings are UNICODE */ + ULONG nPropType; /* type of the property, hiword is 0 */ + MAPINAMEID nmid; /* id of the property */ + LPTSTR pszDisplayName; + FORMPROPSPECIALTYPE nSpecialType; /* tag for the following union */ + union + { + struct + { + MAPINAMEID nmidIdx; + ULONG cfpevAvailable; /* # of enums */ + LPMAPIFORMPROPENUMVAL pfpevAvailable; + } s1; /* Property String/Number association Enumeration */ + } u; +} SMAPIFormProp, FAR * LPMAPIFORMPROP; + +/* Array of form properties */ + +typedef struct +{ + ULONG cProps; + ULONG ulPad; /* Pad to 8-byte alignment for insurance */ + SMAPIFormProp aFormProp[MAPI_DIM]; +} SMAPIFormPropArray, FAR * LPMAPIFORMPROPARRAY; + +#define CbMAPIFormPropArray(_c) \ + (offsetof(SMAPIFormPropArray, aFormProp) + \ + (_c)*sizeof(SMAPIFormProp)) + +/* Structure defining the layout of an mapi verb description */ + +typedef struct +{ + LONG lVerb; + LPTSTR szVerbname; + DWORD fuFlags; + DWORD grfAttribs; + ULONG ulFlags; /* Either 0 or MAPI_UNICODE */ +} SMAPIVerb, FAR * LPMAPIVERB; + +/* Structure used for returning arrays of mapi verbs */ + +typedef struct +{ + ULONG cMAPIVerb; /* Number of verbs in the structure */ + SMAPIVerb aMAPIVerb[MAPI_DIM]; +} SMAPIVerbArray, FAR * LPMAPIVERBARRAY; + +#define CbMAPIVerbArray(_c) \ + (offsetof(SMAPIVerbArray, aMAPIVerb) + \ + (_c)*sizeof(SMAPIVerb)) + +#define MAPI_IMAPIFORMINFO_METHODS(IPURE) \ + MAPIMETHOD(CalcFormPropSet)(THIS_ \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPMAPIFORMPROPARRAY FAR * ppFormPropArray) IPURE; \ + MAPIMETHOD(CalcVerbSet)(THIS_ \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPMAPIVERBARRAY FAR * ppMAPIVerbArray) IPURE; \ + MAPIMETHOD(MakeIconFromBinary)(THIS_ \ + /*in*/ ULONG nPropID, \ + /*out*/ HICON FAR* phicon) IPURE; \ + MAPIMETHOD(SaveForm)(THIS_ \ + /*in*/ LPCTSTR szFileName) IPURE; \ + MAPIMETHOD(OpenFormContainer)(THIS_ \ + /*out*/ LPMAPIFORMCONTAINER FAR * ppformcontainer) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIFormInfo +DECLARE_MAPI_INTERFACE_(IMAPIFormInfo, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) /* note: subsumes getlasterror */ + MAPI_IMAPIFORMINFO_METHODS(PURE) +}; + + +/* Enumeration of permissible values for PR_FORM_MESSAGE_BEHAVIOR */ + +#define MAPI_MESSAGE_BEHAVIOR_IPM 0 +#define MAPI_MESSAGE_BEHAVIOR_FOLDER 1 + + +/*-- IMAPIFormMgr ----------------------------------------------------------*/ +/* The client-visible interface for form resolution and dispatch. + */ + +/* Structure containing an array of message class strings */ + +typedef struct +{ + ULONG cValues; + LPCSTR aMessageClass[MAPI_DIM]; +} SMessageClassArray, FAR * LPSMESSAGECLASSARRAY; + +#define CbMessageClassArray(_c) \ + (offsetof(SMessageClassArray, aMessageClass) + (_c)*sizeof(LPCSTR)) + +/* Structure containing an array of IMAPIFormInfo interfaces */ + +typedef struct +{ + ULONG cForms; + LPMAPIFORMINFO aFormInfo[MAPI_DIM]; +} SMAPIFormInfoArray, FAR * LPSMAPIFORMINFOARRAY; + +#define CbMAPIFormInfoArray(_c) \ + (offsetof(SMAPIFormInfoArray, aFormInfo) + \ + (_c)*sizeof(LPMAPIFORMINFO)) + +/* Flags for IMAPIFormMgr::SelectFormContainer */ + +#define MAPIFORM_SELECT_ALL_REGISTRIES 0 +#define MAPIFORM_SELECT_FOLDER_REGISTRY_ONLY 1 +#define MAPIFORM_SELECT_NON_FOLDER_REGISTRY_ONLY 2 + +/* Flags for IMAPIFormMgr::CalcFormPropSet */ + +#define FORMPROPSET_UNION 0 +#define FORMPROPSET_INTERSECTION 1 + +/* Flags for IMAPIFormMgr::ResolveMessageClass and + IMAPIFormMgr::ResolveMultipleMessageClasses */ + +#define MAPIFORM_EXACTMATCH 0x0020 + +#define MAPI_IMAPIFORMMGR_METHODS(IPURE) \ + MAPIMETHOD(LoadForm)(THIS_ \ + /*in*/ ULONG_PTR ulUIParam, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPCSTR lpszMessageClass, \ + /*in*/ ULONG ulMessageStatus, \ + /*in*/ ULONG ulMessageFlags, \ + /*in*/ LPMAPIFOLDER pFolderFocus, \ + /*in*/ LPMAPIMESSAGESITE pMessageSite, \ + /*in*/ LPMESSAGE pmsg, \ + /*in*/ LPMAPIVIEWCONTEXT pViewContext, \ + /*in*/ REFIID riid, \ + /*out*/ LPVOID FAR *ppvObj) IPURE; \ + MAPIMETHOD(ResolveMessageClass)(THIS_ \ + /*in*/ LPCSTR szMsgClass, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPMAPIFOLDER pFolderFocus, /* can be null */ \ + /*out*/ LPMAPIFORMINFO FAR* ppResult) IPURE; \ + MAPIMETHOD(ResolveMultipleMessageClasses)(THIS_ \ + /*in*/ LPSMESSAGECLASSARRAY pMsgClasses, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPMAPIFOLDER pFolderFocus, /* can be null */ \ + /*out*/ LPSMAPIFORMINFOARRAY FAR * pfrminfoarray) IPURE; \ + MAPIMETHOD(CalcFormPropSet)(THIS_ \ + /*in*/ LPSMAPIFORMINFOARRAY pfrminfoarray, \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPMAPIFORMPROPARRAY FAR* ppResults) IPURE; \ + MAPIMETHOD(CreateForm)(THIS_ \ + /*in*/ ULONG_PTR ulUIParam, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPMAPIFORMINFO pfrminfoToActivate, \ + /*in*/ REFIID refiidToAsk, \ + /*out*/ LPVOID FAR* ppvObj) IPURE; \ + MAPIMETHOD(SelectForm)(THIS_ \ + /*in*/ ULONG_PTR ulUIParam, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPCTSTR pszTitle, \ + /*in*/ LPMAPIFOLDER pfld, \ + /*out*/ LPMAPIFORMINFO FAR * ppfrminfoReturned) IPURE; \ + MAPIMETHOD(SelectMultipleForms)(THIS_ \ + /*in*/ ULONG_PTR ulUIParam, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPCTSTR pszTitle, \ + /*in*/ LPMAPIFOLDER pfld, \ + /*in*/ LPSMAPIFORMINFOARRAY pfrminfoarray, \ + /*out*/ LPSMAPIFORMINFOARRAY FAR * ppfrminfoarray) IPURE; \ + MAPIMETHOD(SelectFormContainer)(THIS_ \ + /*in*/ ULONG_PTR ulUIParam, \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPMAPIFORMCONTAINER FAR * lppfcnt) IPURE; \ + MAPIMETHOD(OpenFormContainer)(THIS_ \ + /*in*/ HFRMREG hfrmreg, \ + /*in*/ LPUNKNOWN lpunk, \ + /*out*/ LPMAPIFORMCONTAINER FAR * lppfcnt) IPURE; \ + MAPIMETHOD(PrepareForm)(THIS_ \ + /*in*/ ULONG_PTR ulUIParam, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPMAPIFORMINFO pfrminfo) IPURE; \ + MAPIMETHOD(IsInConflict)(THIS_ \ + /*in*/ ULONG ulMessageFlags, \ + /*in*/ ULONG ulMessageStatus, \ + /*in*/ LPCSTR szMessageClass, \ + /*in*/ LPMAPIFOLDER pFolderFocus) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIFormMgr +DECLARE_MAPI_INTERFACE_(IMAPIFormMgr, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_GETLASTERROR_METHOD(PURE) + MAPI_IMAPIFORMMGR_METHODS(PURE) +}; + +/* Platform numbers (used in .CFG files for forms) */ + +#define MAPIFORM_CPU_X86 1 +#define MAPIFORM_CPU_MIP 2 +#define MAPIFORM_CPU_AXP 3 +#define MAPIFORM_CPU_PPC 4 +#define MAPIFORM_CPU_M68 5 +#define MAPIFORM_CPU_X64 6 + +#define MAPIFORM_OS_WIN_31 1 +#define MAPIFORM_OS_WINNT_35 2 +#define MAPIFORM_OS_WIN_95 3 +#define MAPIFORM_OS_MAC_7x 4 +#define MAPIFORM_OS_WINNT_40 5 +#define MAPIFORM_OS_WINNT_50 6 +#define MAPIFORM_OS_WINNT_60 7 + +#define MAPIFORM_PLATFORM(CPU, OS) ((ULONG) ((((ULONG) CPU) << 16) | OS)) + + +/*-- IMAPIFormContainer -------------------------------------------------*/ + +/* Flags for IMAPIFormMgr::CalcFormPropSet */ + +/* #define FORMPROPSET_UNION 0 */ +/* #define FORMPROPSET_INTERSECTION 1 */ + +/* Flags for IMAPIFormMgr::InstallForm */ + +#define MAPIFORM_INSTALL_DIALOG MAPI_DIALOG +#define MAPIFORM_INSTALL_OVERWRITEONCONFLICT 0x0010 + +/* Flags for IMAPIFormContainer::ResolveMessageClass and + IMAPIFormContainer::ResolveMultipleMessageClasses */ +/* #define MAPIFORM_EXACTIMATCH 0x0020 */ + +#define MAPI_IMAPIFORMCONTAINER_METHODS(IPURE) \ + MAPIMETHOD(InstallForm)(THIS_ \ + /*in*/ ULONG_PTR ulUIParam, \ + /*in*/ ULONG ulFlags, \ + /*in*/ LPCTSTR szCfgPathName) IPURE; \ + MAPIMETHOD(RemoveForm)(THIS_ \ + /*in*/ LPCSTR szMessageClass) IPURE; \ + MAPIMETHOD(ResolveMessageClass) (THIS_ \ + /*in*/ LPCSTR szMessageClass, \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPMAPIFORMINFO FAR * pforminfo) IPURE; \ + MAPIMETHOD(ResolveMultipleMessageClasses) (THIS_ \ + /*in*/ LPSMESSAGECLASSARRAY pMsgClassArray, \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPSMAPIFORMINFOARRAY FAR * ppfrminfoarray) IPURE; \ + MAPIMETHOD(CalcFormPropSet)(THIS_ \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPMAPIFORMPROPARRAY FAR * ppResults) IPURE; \ + MAPIMETHOD(GetDisplay)(THIS_ \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPTSTR FAR * pszDisplayName) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIFormContainer +DECLARE_MAPI_INTERFACE_(IMAPIFormContainer, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_GETLASTERROR_METHOD(PURE) + MAPI_IMAPIFORMCONTAINER_METHODS(PURE) +}; + +/*-- IMAPIFormFactory ------------------------------------------------------*/ + +#define MAPI_IMAPIFORMFACTORY_METHODS(IPURE) \ + MAPIMETHOD(CreateClassFactory) (THIS_ \ + /*in*/ REFCLSID clsidForm, \ + /*in*/ ULONG ulFlags, \ + /*out*/ LPCLASSFACTORY FAR * lppClassFactory) IPURE; \ + MAPIMETHOD(LockServer) (THIS_ \ + /*in*/ ULONG ulFlags, \ + /*in*/ ULONG fLockServer) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPIFormFactory +DECLARE_MAPI_INTERFACE_(IMAPIFormFactory, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_GETLASTERROR_METHOD(PURE) + MAPI_IMAPIFORMFACTORY_METHODS(PURE) +}; + +#pragma warning(pop) + +#endif /* MAPIFORM_H */ + + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIGuid.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIGuid.h similarity index 78% rename from com/win32comext/mapi/src/mapi_headers/MAPIGuid.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIGuid.h index 212763fbd..66a77c8b0 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIGuid.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIGuid.h @@ -1,354 +1,449 @@ -/* - * M A P I G U I D . H - * - * Master definitions of all GUID's for MAPI. - * - * When included without INITGUID defined, this header file - * defines symbols that reference IIDs elsewhere. - * - * When included with INITGUID defined and a "USES_IID_I..." - * statement for each IID used by the subsystem, it generates the - * bytes for those actual IIDs into the associated object file. - * - * This range of 256 GUIDs reserved by OLE for MAPI use October 5, 1992. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -/* - * List of GUIDS allocated by MAPI - * - * 0x00020300 IID_IMAPISession - * 0x00020301 IID_IMAPITable - * 0x00020302 IID_IMAPIAdviseSink - * 0x00020303 IID_IMAPIProp - * 0x00020304 IID_IProfSect - * 0x00020305 IID_IMAPIStatus - * 0x00020306 IID_IMsgStore - * 0x00020307 IID_IMessage - * 0x00020308 IID_IAttachment - * 0x00020309 IID_IAddrBook - * 0x0002030A IID_IMailUser - * 0x0002030B IID_IMAPIContainer - * 0x0002030C IID_IMAPIFolder - * 0x0002030D IID_IABContainer - * 0x0002030E IID_IDistList - * 0x0002030F IID_IMAPISup - * 0x00020310 IID_IMSProvider - * 0x00020311 IID_IABProvider - * 0x00020312 IID_IXPProvider - * 0x00020313 IID_IMSLogon - * 0x00020314 IID_IABLogon - * 0x00020315 IID_IXPLogon - * 0x00020316 IID_IMAPITableData - * 0x00020317 IID_IMAPISpoolerInit - * 0x00020318 IID_IMAPISpoolerSession - * 0x00020319 IID_ITNEF - * 0x0002031A IID_IMAPIPropData - * 0x0002031B IID_IMAPIControl - * 0x0002031C IID_IProfAdmin - * 0x0002031D IID_IMsgServiceAdmin - * 0x0002031E IID_IMAPISpoolerService - * 0x0002031F IID_IMAPIProgress - * 0x00020320 IID_ISpoolerHook - * 0x00020321 IID_IMAPIViewContext - * 0x00020322 IID_IMAPIFormMgr - * 0x00020323 IID_IEnumMAPIFormProp - * 0x00020324 IID_IMAPIFormInfo - * 0x00020325 IID_IProviderAdmin - * 0x00020327 IID_IMAPIForm - * 0x00020328 PS_MAPI - * 0x00020329 PS_PUBLIC_STRINGS - * 0x0002032A IID_IPersistMessage - * 0x0002032B IID_IMAPIViewAdviseSink - * 0x0002032C IID_IStreamDocfile - * 0x0002032D IID_IMAPIFormProp - * 0x0002032E IID_IMAPIFormContainer - * 0x0002032F IID_IMAPIFormAdviseSink - * 0x00020330 IID_IStreamTnef - * 0x00020350 IID_IMAPIFormFactory - * 0x00020370 IID_IMAPIMessageSite - * 0x00020380 PS_ROUTING_EMAIL_ADDRESSES - * 0x00020381 PS_ROUTING_ADDRTYPE - * 0x00020382 PS_ROUTING_DISPLAY_NAME - * 0x00020383 PS_ROUTING_ENTRYID - * 0x00020384 PS_ROUTING_SEARCH_KEY - * 0x00020385 MUID_PROFILE_INSTANCE - * 0x00020397 IID_IMAPIClientShutdown - * 0x00020398 IID_IMAPIProviderShutdown - * - * The remaining GUIDs from 0x00020300 to 0x000203FF are reserved by - * MAPI for future use. The current maximum used by MAPI is 0x00020398 - * - */ - -#ifndef MAPIGUID_H -#ifdef INITGUID -#define MAPIGUID_H -#if _MSC_VER > 1000 -#pragma once -#endif -#endif - -/* Derive from IUnknown */ -#if !defined(INITGUID) || defined(USES_IID_IMAPISession) -DEFINE_OLEGUID(IID_IMAPISession, 0x00020300, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPITable) -DEFINE_OLEGUID(IID_IMAPITable, 0x00020301, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIAdviseSink) -DEFINE_OLEGUID(IID_IMAPIAdviseSink, 0x00020302, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIControl) -DEFINE_OLEGUID(IID_IMAPIControl, 0x0002031B, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IProfAdmin) -DEFINE_OLEGUID(IID_IProfAdmin, 0x0002031C, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMsgServiceAdmin) -DEFINE_OLEGUID(IID_IMsgServiceAdmin,0x0002031D, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IProviderAdmin) -DEFINE_OLEGUID(IID_IProviderAdmin, 0x00020325, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIProgress) -DEFINE_OLEGUID(IID_IMAPIProgress, 0x0002031F, 0, 0); -#endif - -/* MAPIProp or derive from MAPIProp */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIProp) -DEFINE_OLEGUID(IID_IMAPIProp, 0x00020303, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IProfSect) -DEFINE_OLEGUID(IID_IProfSect, 0x00020304, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIStatus) -DEFINE_OLEGUID(IID_IMAPIStatus, 0x00020305, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMsgStore) -DEFINE_OLEGUID(IID_IMsgStore, 0x00020306, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMessage) -DEFINE_OLEGUID(IID_IMessage, 0x00020307, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IAttachment) -DEFINE_OLEGUID(IID_IAttachment, 0x00020308, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IAddrBook) -DEFINE_OLEGUID(IID_IAddrBook, 0x00020309, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMailUser) -DEFINE_OLEGUID(IID_IMailUser, 0x0002030A, 0, 0); -#endif - -/* MAPIContainer or derive from MAPIContainer */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIContainer) -DEFINE_OLEGUID(IID_IMAPIContainer, 0x0002030B, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIFolder) -DEFINE_OLEGUID(IID_IMAPIFolder, 0x0002030C, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IABContainer) -DEFINE_OLEGUID(IID_IABContainer, 0x0002030D, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IDistList) -DEFINE_OLEGUID(IID_IDistList, 0x0002030E, 0, 0); -#endif - -/* MAPI Support Object */ -#if !defined(INITGUID) || defined(USES_IID_IMAPISup) -DEFINE_OLEGUID(IID_IMAPISup, 0x0002030F, 0, 0); -#endif - -/* Provider INIT objects */ -#if !defined(INITGUID) || defined(USES_IID_IMSProvider) -DEFINE_OLEGUID(IID_IMSProvider, 0x00020310, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IABProvider) -DEFINE_OLEGUID(IID_IABProvider, 0x00020311, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IXPProvider) -DEFINE_OLEGUID(IID_IXPProvider, 0x00020312, 0, 0); -#endif - -/* Provider LOGON Objects */ -#if !defined(INITGUID) || defined(USES_IID_IMSLogon) -DEFINE_OLEGUID(IID_IMSLogon, 0x00020313, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IABLogon) -DEFINE_OLEGUID(IID_IABLogon, 0x00020314, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IXPLogon) -DEFINE_OLEGUID(IID_IXPLogon, 0x00020315, 0, 0); -#endif - -/* IMAPITable-in-memory Table Data Object */ -#if !defined(INITGUID) || defined(USES_IID_IMAPITableData) -DEFINE_OLEGUID(IID_IMAPITableData, 0x00020316, 0, 0); -#endif - -/* MAPI Spooler Init Object (internal) */ -#if !defined(INITGUID) || defined(USES_IID_IMAPISpoolerInit) -DEFINE_OLEGUID(IID_IMAPISpoolerInit, 0x00020317, 0, 0); -#endif - -/* MAPI Spooler Session Object (internal) */ -#if !defined(INITGUID) || defined(USES_IID_IMAPISpoolerSession) -DEFINE_OLEGUID(IID_IMAPISpoolerSession, 0x00020318, 0, 0); -#endif - -/* MAPI TNEF Object Interface */ -#if !defined(INITGUID) || defined(USES_IID_ITNEF) -DEFINE_OLEGUID(IID_ITNEF, 0x00020319, 0, 0); -#endif - -/* IMAPIProp-in-memory Property Data Object */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIPropData) -DEFINE_OLEGUID(IID_IMAPIPropData, 0x0002031A, 0, 0); -#endif - -/* MAPI Spooler Hook Object */ -#if !defined(INITGUID) || defined(USES_IID_ISpoolerHook) -DEFINE_OLEGUID(IID_ISpoolerHook, 0x00020320, 0, 0); -#endif - -/* MAPI Spooler Service Object */ -#if !defined(INITGUID) || defined(USES_IID_IMAPISpoolerService) -DEFINE_OLEGUID(IID_IMAPISpoolerService, 0x0002031E, 0, 0); -#endif - -/* MAPI forms, form manager, etc. */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIViewContext) -DEFINE_OLEGUID(IID_IMAPIViewContext, 0x00020321, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIFormMgr) -DEFINE_OLEGUID(IID_IMAPIFormMgr, 0x00020322, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IEnumMAPIFormProp) -DEFINE_OLEGUID(IID_IEnumMAPIFormProp, 0x00020323, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIFormInfo) -DEFINE_OLEGUID(IID_IMAPIFormInfo, 0x00020324, 0, 0); -#endif -#if !defined(INITGUID) || defined(USES_IID_IMAPIForm) -DEFINE_OLEGUID(IID_IMAPIForm, 0x00020327, 0, 0); -#endif - - -/* Well known guids for name<->id mappings */ - -/* The name of MAPI's property set */ -#if !defined(INITGUID) || defined(USES_PS_MAPI) -DEFINE_OLEGUID(PS_MAPI, 0x00020328, 0, 0); -#endif - -/* The name of the set of public strings */ -#if !defined(INITGUID) || defined(USES_PS_PUBLIC_STRINGS) -DEFINE_OLEGUID(PS_PUBLIC_STRINGS, 0x00020329, 0, 0); -#endif - - - - -/* MAPI forms, form manager, (cont) */ -#if !defined(INITGUID) || defined(USES_IID_IPersistMessage) -DEFINE_OLEGUID(IID_IPersistMessage, 0x0002032A, 0, 0); -#endif - -/* IMAPIViewAdviseSink */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIViewAdviseSink) -DEFINE_OLEGUID(IID_IMAPIViewAdviseSink, 0x0002032B, 0, 0); -#endif - -/* Message Store OpenProperty */ -#if !defined(INITGUID) || defined(USES_IID_IStreamDocfile) -DEFINE_OLEGUID(IID_IStreamDocfile, 0x0002032C, 0, 0); -#endif - -/* IMAPIFormProp */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIFormProp) -DEFINE_OLEGUID(IID_IMAPIFormProp, 0x0002032D, 0, 0); -#endif - -/* IMAPIFormContainer */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIFormContainer) -DEFINE_OLEGUID(IID_IMAPIFormContainer, 0x0002032E, 0, 0); -#endif - -/* IMAPIFormAdviseSink */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIFormAdviseSink) -DEFINE_OLEGUID(IID_IMAPIFormAdviseSink, 0x0002032F, 0, 0); -#endif - -/* TNEF OpenProperty */ -#if !defined(INITGUID) || defined(USES_IID_IStreamTnef) -DEFINE_OLEGUID(IID_IStreamTnef, 0x00020330, 0, 0); -#endif - -/* IMAPIFormFactory */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIFormFactory) -DEFINE_OLEGUID(IID_IMAPIFormFactory, 0x00020350, 0, 0); -#endif - -/* IMAPIMessageSite */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIMessageSite) -DEFINE_OLEGUID(IID_IMAPIMessageSite, 0x00020370, 0, 0); -#endif - - - -/* Well known guids routing property sets. - Usefull when writing applications that route documents - (i.e. Workflow) across gateways. Gateways that speak MAPI - should convert the properties found in the follow property - sets appropriately. */ - -/* PS_ROUTING_EMAIL_ADDRESSES: Addresses that need converting at gateways, etc. */ -#if !defined(INITGUID) || defined(USES_PS_ROUTING_EMAIL_ADDRESSES) -DEFINE_OLEGUID(PS_ROUTING_EMAIL_ADDRESSES, 0x00020380, 0, 0); -#endif - -/* PS_ROUTING_ADDRTYPE: Address types that need converting at gateways, etc. */ -#if !defined(INITGUID) || defined(USES_PS_ROUTING_ADDRTYPE) -DEFINE_OLEGUID(PS_ROUTING_ADDRTYPE, 0x00020381, 0, 0); -#endif - -/* PS_ROUTING_DISPLAY_NAME: Display Name that corresponds to the other props */ -#if !defined(INITGUID) || defined(USES_PS_ROUTING_DISPLAY_NAME) -DEFINE_OLEGUID(PS_ROUTING_DISPLAY_NAME, 0x00020382, 0, 0); -#endif - -/* PS_ROUTING_ENTRYID: (optional) EntryIDs that need converting at gateways, etc. */ -#if !defined(INITGUID) || defined(USES_PS_ROUTING_ENTRYID) -DEFINE_OLEGUID(PS_ROUTING_ENTRYID, 0x00020383, 0, 0); -#endif - -/* PS_ROUTING_SEARCH_KEY: (optional) search keys that need converting at gateways, etc. */ -#if !defined(INITGUID) || defined(USES_PS_ROUTING_SEARCH_KEY) -DEFINE_OLEGUID(PS_ROUTING_SEARCH_KEY, 0x00020384, 0, 0); -#endif - -/* MUID_PROFILE_INSTANCE - Well known section in a profile which contains a property (PR_SEARCH_KEY) which is unique - for any given profile. Applications and providers can depend on this value as being - different for each unique profile. */ -#if !defined(INITGUID) || defined(USES_MUID_PROFILE_INSTANCE) -DEFINE_OLEGUID(MUID_PROFILE_INSTANCE, 0x00020385, 0, 0); -#endif - - -/* Interface GUIDs for Fast Shutdown support */ - -/* IMAPIClientShutdown */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIClientShutdown) -DEFINE_OLEGUID(IID_IMAPIClientShutdown, 0x00020397, 0, 0); -#endif - -/* IMAPIProviderShutdown */ -#if !defined(INITGUID) || defined(USES_IID_IMAPIProviderShutdown) -DEFINE_OLEGUID(IID_IMAPIProviderShutdown, 0x00020398, 0, 0); -#endif - -#endif /* MAPIGUID_H */ - +/* + * M A P I G U I D . H + * + * Master definitions of all GUID's for MAPI. + * + * When included without INITGUID defined, this header file + * defines symbols that reference IIDs elsewhere. + * + * When included with INITGUID defined and a "USES_IID_I..." + * statement for each IID used by the subsystem, it generates the + * bytes for those actual IIDs into the associated object file. + * + * This range of 256 GUIDs reserved by OLE for MAPI use October 5, 1992. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +/* + * List of GUIDS allocated by MAPI + * + * 0x00020300 IID_IMAPISession + * 0x00020301 IID_IMAPITable + * 0x00020302 IID_IMAPIAdviseSink + * 0x00020303 IID_IMAPIProp + * 0x00020304 IID_IProfSect + * 0x00020305 IID_IMAPIStatus + * 0x00020306 IID_IMsgStore + * 0x00020307 IID_IMessage + * 0x00020308 IID_IAttachment + * 0x00020309 IID_IAddrBook + * 0x0002030A IID_IMailUser + * 0x0002030B IID_IMAPIContainer + * 0x0002030C IID_IMAPIFolder + * 0x0002030D IID_IABContainer + * 0x0002030E IID_IDistList + * 0x0002030F IID_IMAPISup + * 0x00020310 IID_IMSProvider + * 0x00020311 IID_IABProvider + * 0x00020312 IID_IXPProvider + * 0x00020313 IID_IMSLogon + * 0x00020314 IID_IABLogon + * 0x00020315 IID_IXPLogon + * 0x00020316 IID_IMAPITableData + * 0x00020317 IID_IMAPISpoolerInit + * 0x00020318 IID_IMAPISpoolerSession + * 0x00020319 IID_ITNEF + * 0x0002031A IID_IMAPIPropData + * 0x0002031B IID_IMAPIControl + * 0x0002031C IID_IProfAdmin + * 0x0002031D IID_IMsgServiceAdmin + * 0x0002031E IID_IMAPISpoolerService + * 0x0002031F IID_IMAPIProgress + * 0x00020320 IID_ISpoolerHook + * 0x00020321 IID_IMAPIViewContext + * 0x00020322 IID_IMAPIFormMgr + * 0x00020323 IID_IEnumMAPIFormProp + * 0x00020324 IID_IMAPIFormInfo + * 0x00020325 IID_IProviderAdmin + * 0x00020327 IID_IMAPIForm + * 0x00020328 PS_MAPI + * 0x00020329 PS_PUBLIC_STRINGS + * 0x0002032A IID_IPersistMessage + * 0x0002032B IID_IMAPIViewAdviseSink + * 0x0002032C IID_IStreamDocfile + * 0x0002032D IID_IMAPIFormProp + * 0x0002032E IID_IMAPIFormContainer + * 0x0002032F IID_IMAPIFormAdviseSink + * 0x00020330 IID_IStreamTnef + * 0x00020350 IID_IMAPIFormFactory + * 0x00020370 IID_IMAPIMessageSite + * 0x00020380 PS_ROUTING_EMAIL_ADDRESSES + * 0x00020381 PS_ROUTING_ADDRTYPE + * 0x00020382 PS_ROUTING_DISPLAY_NAME + * 0x00020383 PS_ROUTING_ENTRYID + * 0x00020384 PS_ROUTING_SEARCH_KEY + * 0x00020385 MUID_PROFILE_INSTANCE + * 0x00020397 IID_IMAPIClientShutdown + * 0x00020398 IID_IMAPIProviderShutdown + * + * The remaining GUIDs from 0x00020300 to 0x000203FF are reserved by + * MAPI for future use. The current maximum used by MAPI is 0x00020398 + * + */ + +#ifndef MAPIGUID_H +#ifdef INITGUID +#define MAPIGUID_H +#if _MSC_VER > 1000 +#pragma once +#endif +#endif + +/* Derive from IUnknown */ +#if !defined(INITGUID) || defined(USES_IID_IMAPISession) +DEFINE_OLEGUID(IID_IMAPISession, 0x00020300, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPITable) +DEFINE_OLEGUID(IID_IMAPITable, 0x00020301, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIAdviseSink) +DEFINE_OLEGUID(IID_IMAPIAdviseSink, 0x00020302, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIControl) +DEFINE_OLEGUID(IID_IMAPIControl, 0x0002031B, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IProfAdmin) +DEFINE_OLEGUID(IID_IProfAdmin, 0x0002031C, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMsgServiceAdmin) +DEFINE_OLEGUID(IID_IMsgServiceAdmin,0x0002031D, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IProviderAdmin) +DEFINE_OLEGUID(IID_IProviderAdmin, 0x00020325, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIProgress) +DEFINE_OLEGUID(IID_IMAPIProgress, 0x0002031F, 0, 0); +#endif + +/* MAPIProp or derive from MAPIProp */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIProp) +DEFINE_OLEGUID(IID_IMAPIProp, 0x00020303, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IProfSect) +DEFINE_OLEGUID(IID_IProfSect, 0x00020304, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIStatus) +DEFINE_OLEGUID(IID_IMAPIStatus, 0x00020305, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMsgStore) +DEFINE_OLEGUID(IID_IMsgStore, 0x00020306, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMessage) +DEFINE_OLEGUID(IID_IMessage, 0x00020307, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IAttachment) +DEFINE_OLEGUID(IID_IAttachment, 0x00020308, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IAddrBook) +DEFINE_OLEGUID(IID_IAddrBook, 0x00020309, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMailUser) +DEFINE_OLEGUID(IID_IMailUser, 0x0002030A, 0, 0); +#endif + +/* MAPIContainer or derive from MAPIContainer */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIContainer) +DEFINE_OLEGUID(IID_IMAPIContainer, 0x0002030B, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIFolder) +DEFINE_OLEGUID(IID_IMAPIFolder, 0x0002030C, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IABContainer) +DEFINE_OLEGUID(IID_IABContainer, 0x0002030D, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IDistList) +DEFINE_OLEGUID(IID_IDistList, 0x0002030E, 0, 0); +#endif + +/* MAPI Support Object */ +#if !defined(INITGUID) || defined(USES_IID_IMAPISup) +DEFINE_OLEGUID(IID_IMAPISup, 0x0002030F, 0, 0); +#endif + +/* Provider INIT objects */ +#if !defined(INITGUID) || defined(USES_IID_IMSProvider) +DEFINE_OLEGUID(IID_IMSProvider, 0x00020310, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IABProvider) +DEFINE_OLEGUID(IID_IABProvider, 0x00020311, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IXPProvider) +DEFINE_OLEGUID(IID_IXPProvider, 0x00020312, 0, 0); +#endif + +/* Provider LOGON Objects */ +#if !defined(INITGUID) || defined(USES_IID_IMSLogon) +DEFINE_OLEGUID(IID_IMSLogon, 0x00020313, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IABLogon) +DEFINE_OLEGUID(IID_IABLogon, 0x00020314, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IXPLogon) +DEFINE_OLEGUID(IID_IXPLogon, 0x00020315, 0, 0); +#endif + +/* IMAPITable-in-memory Table Data Object */ +#if !defined(INITGUID) || defined(USES_IID_IMAPITableData) +DEFINE_OLEGUID(IID_IMAPITableData, 0x00020316, 0, 0); +#endif + +/* MAPI Spooler Init Object (internal) */ +#if !defined(INITGUID) || defined(USES_IID_IMAPISpoolerInit) +DEFINE_OLEGUID(IID_IMAPISpoolerInit, 0x00020317, 0, 0); +#endif + +/* MAPI Spooler Session Object (internal) */ +#if !defined(INITGUID) || defined(USES_IID_IMAPISpoolerSession) +DEFINE_OLEGUID(IID_IMAPISpoolerSession, 0x00020318, 0, 0); +#endif + +/* MAPI TNEF Object Interface */ +#if !defined(INITGUID) || defined(USES_IID_ITNEF) +DEFINE_OLEGUID(IID_ITNEF, 0x00020319, 0, 0); +#endif + +/* IMAPIProp-in-memory Property Data Object */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIPropData) +DEFINE_OLEGUID(IID_IMAPIPropData, 0x0002031A, 0, 0); +#endif + +/* MAPI Spooler Hook Object */ +#if !defined(INITGUID) || defined(USES_IID_ISpoolerHook) +DEFINE_OLEGUID(IID_ISpoolerHook, 0x00020320, 0, 0); +#endif + +/* MAPI Spooler Service Object */ +#if !defined(INITGUID) || defined(USES_IID_IMAPISpoolerService) +DEFINE_OLEGUID(IID_IMAPISpoolerService, 0x0002031E, 0, 0); +#endif + +/* MAPI forms, form manager, etc. */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIViewContext) +DEFINE_OLEGUID(IID_IMAPIViewContext, 0x00020321, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIFormMgr) +DEFINE_OLEGUID(IID_IMAPIFormMgr, 0x00020322, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IEnumMAPIFormProp) +DEFINE_OLEGUID(IID_IEnumMAPIFormProp, 0x00020323, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIFormInfo) +DEFINE_OLEGUID(IID_IMAPIFormInfo, 0x00020324, 0, 0); +#endif +#if !defined(INITGUID) || defined(USES_IID_IMAPIForm) +DEFINE_OLEGUID(IID_IMAPIForm, 0x00020327, 0, 0); +#endif + + +/* Well known guids for name<->id mappings */ + +/* The name of MAPI's property set */ +#if !defined(INITGUID) || defined(USES_PS_MAPI) +DEFINE_OLEGUID(PS_MAPI, 0x00020328, 0, 0); +#endif + +/* The name of the set of public strings */ +#if !defined(INITGUID) || defined(USES_PS_PUBLIC_STRINGS) +DEFINE_OLEGUID(PS_PUBLIC_STRINGS, 0x00020329, 0, 0); +#endif + + +/* + * Additional well known guids for name<->id mappings: + * https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/commonly-used-property-sets + */ + +/* Calendar related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Appointment) +DEFINE_OLEGUID(PSETID_Appointment, 0x00062002, 0, 0); +#endif + +#if !defined(INITGUID) || defined(USES_PSETID_Meeting) +DEFINE_GUID(PSETID_Meeting, 0x6ED8DA90, 0x450B, 0x101B, 0x98, 0xDA, 0, 0xAA, 0, 0x3F, 0x13, 0x05); +#endif + +/* Common properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Common) +DEFINE_OLEGUID(PSETID_Common, 0x00062008, 0, 0); +#endif + +/* Contact related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Address) +DEFINE_OLEGUID(PSETID_Address, 0x00062004, 0, 0); +#endif + +/* Email related properties */ +#if !defined(INITGUID) || defined(USES_PS_INTERNET_HEADERS) +DEFINE_OLEGUID(PS_INTERNET_HEADERS, 0x00020386, 0, 0); +#endif + +/* General messaging related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Report) +DEFINE_OLEGUID(PSETID_Report, 0x00062013, 0, 0); +#endif + +/* Journal related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Log) +DEFINE_OLEGUID(PSETID_Log, 0x0006200A, 0, 0); +#endif + +/* Messaging related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Messaging) +DEFINE_GUID(PSETID_Messaging, 0x41F28F13, 0x83F4, 0x4114, 0xA5, 0x84, 0xEE, 0xDB, 0x5A, 0x6B, 0x0B, 0xFF); +#endif + +/* Remote messaging related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Remote) +DEFINE_OLEGUID(PSETID_Remote, 0x00062014, 0, 0); +#endif + +/* RSS feed related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_PostRss) +DEFINE_OLEGUID(PSETID_PostRss, 0x00062041, 0, 0); +#endif + +/* Sharing related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Sharing) +DEFINE_OLEGUID(PSETID_Sharing, 0x00062040, 0, 0); +#endif + +/* Sticky note related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Note) +DEFINE_OLEGUID(PSETID_Note, 0x0006200E, 0, 0); +#endif + +/* Sync related properties */ +#if !defined(INITGUID) || defined(USES_SETID_AirSync) +DEFINE_GUID(SETID_AirSync, 0x71035549, 0x0739, 0x4DCB, 0x91, 0x63, 0, 0xF0, 0x58, 0x0D, 0xBB, 0xDF); +#endif + +/* Task related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Task) +DEFINE_OLEGUID(PSETID_Task, 0x00062003, 0, 0); +#endif + +/* Unified messaging related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_UnifiedMessaging) +DEFINE_GUID(PSETID_UnifiedMessaging, 0x4442858E, 0xA9E3, 0x4E80, 0xB9, 0, 0x31, 0x7A, 0x21, 0x0C, 0xC1, 0x5B); +#endif + +/* + * Additional well known guids for name<->id mappings: + * https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxprops/cc9d955b-1492-47de-9dce-5bdea80a3323 + */ + +/* Extracted entities related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_XmlExtractedEntities) +DEFINE_GUID(PSETID_XmlExtractedEntities, 0x23239608, 0x685D, 0x4732, 0x9C, 0x55, 0x4C, 0x95, 0xCB, 0x4E, 0x8E, 0x33); +#endif + +/* Attachment related properties */ +#if !defined(INITGUID) || defined(USES_PSETID_Attachment) +DEFINE_GUID(PSETID_Attachment, 0x96357F7F, 0x59E1, 0x47D0, 0x99, 0xA7, 0x46, 0x51, 0x5C, 0x18, 0x3B, 0x54); +#endif + + + + +/* MAPI forms, form manager, (cont) */ +#if !defined(INITGUID) || defined(USES_IID_IPersistMessage) +DEFINE_OLEGUID(IID_IPersistMessage, 0x0002032A, 0, 0); +#endif + +/* IMAPIViewAdviseSink */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIViewAdviseSink) +DEFINE_OLEGUID(IID_IMAPIViewAdviseSink, 0x0002032B, 0, 0); +#endif + +/* Message Store OpenProperty */ +#if !defined(INITGUID) || defined(USES_IID_IStreamDocfile) +DEFINE_OLEGUID(IID_IStreamDocfile, 0x0002032C, 0, 0); +#endif + +/* IMAPIFormProp */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIFormProp) +DEFINE_OLEGUID(IID_IMAPIFormProp, 0x0002032D, 0, 0); +#endif + +/* IMAPIFormContainer */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIFormContainer) +DEFINE_OLEGUID(IID_IMAPIFormContainer, 0x0002032E, 0, 0); +#endif + +/* IMAPIFormAdviseSink */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIFormAdviseSink) +DEFINE_OLEGUID(IID_IMAPIFormAdviseSink, 0x0002032F, 0, 0); +#endif + +/* TNEF OpenProperty */ +#if !defined(INITGUID) || defined(USES_IID_IStreamTnef) +DEFINE_OLEGUID(IID_IStreamTnef, 0x00020330, 0, 0); +#endif + +/* IMAPIFormFactory */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIFormFactory) +DEFINE_OLEGUID(IID_IMAPIFormFactory, 0x00020350, 0, 0); +#endif + +/* IMAPIMessageSite */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIMessageSite) +DEFINE_OLEGUID(IID_IMAPIMessageSite, 0x00020370, 0, 0); +#endif + + + +/* Well known guids routing property sets. + Usefull when writing applications that route documents + (i.e. Workflow) across gateways. Gateways that speak MAPI + should convert the properties found in the follow property + sets appropriately. */ + +/* PS_ROUTING_EMAIL_ADDRESSES: Addresses that need converting at gateways, etc. */ +#if !defined(INITGUID) || defined(USES_PS_ROUTING_EMAIL_ADDRESSES) +DEFINE_OLEGUID(PS_ROUTING_EMAIL_ADDRESSES, 0x00020380, 0, 0); +#endif + +/* PS_ROUTING_ADDRTYPE: Address types that need converting at gateways, etc. */ +#if !defined(INITGUID) || defined(USES_PS_ROUTING_ADDRTYPE) +DEFINE_OLEGUID(PS_ROUTING_ADDRTYPE, 0x00020381, 0, 0); +#endif + +/* PS_ROUTING_DISPLAY_NAME: Display Name that corresponds to the other props */ +#if !defined(INITGUID) || defined(USES_PS_ROUTING_DISPLAY_NAME) +DEFINE_OLEGUID(PS_ROUTING_DISPLAY_NAME, 0x00020382, 0, 0); +#endif + +/* PS_ROUTING_ENTRYID: (optional) EntryIDs that need converting at gateways, etc. */ +#if !defined(INITGUID) || defined(USES_PS_ROUTING_ENTRYID) +DEFINE_OLEGUID(PS_ROUTING_ENTRYID, 0x00020383, 0, 0); +#endif + +/* PS_ROUTING_SEARCH_KEY: (optional) search keys that need converting at gateways, etc. */ +#if !defined(INITGUID) || defined(USES_PS_ROUTING_SEARCH_KEY) +DEFINE_OLEGUID(PS_ROUTING_SEARCH_KEY, 0x00020384, 0, 0); +#endif + +/* MUID_PROFILE_INSTANCE + Well known section in a profile which contains a property (PR_SEARCH_KEY) which is unique + for any given profile. Applications and providers can depend on this value as being + different for each unique profile. */ +#if !defined(INITGUID) || defined(USES_MUID_PROFILE_INSTANCE) +DEFINE_OLEGUID(MUID_PROFILE_INSTANCE, 0x00020385, 0, 0); +#endif + + +/* Interface GUIDs for Fast Shutdown support */ + +/* IMAPIClientShutdown */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIClientShutdown) +DEFINE_OLEGUID(IID_IMAPIClientShutdown, 0x00020397, 0, 0); +#endif + +/* IMAPIProviderShutdown */ +#if !defined(INITGUID) || defined(USES_IID_IMAPIProviderShutdown) +DEFINE_OLEGUID(IID_IMAPIProviderShutdown, 0x00020398, 0, 0); +#endif + +#endif /* MAPIGUID_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIHook.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIHook.h similarity index 96% rename from com/win32comext/mapi/src/mapi_headers/MAPIHook.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIHook.h index 7055d8e97..f0c0a0357 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIHook.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIHook.h @@ -1,83 +1,83 @@ -/* - * M A P I H O O K . H - * - * Defines the SpoolerMsgHook provider interface. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef MAPIHOOK_H -#define MAPIHOOK_H - -#ifndef MAPIDEFS_H -#include -#include -#include -#include -#endif - -#ifndef BEGIN_INTERFACE -#define BEGIN_INTERFACE -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* ISpoolerHook Interface ------------------------------------------------ */ - -/* MsgHooks */ - -#define HOOK_DELETE ((ULONG) 0x00000001) -#define HOOK_CANCEL ((ULONG) 0x00000002) - -#define MAPI_ISPOOLERHOOK_METHODS(IPURE) \ - MAPIMETHOD(InboundMsgHook) \ - (THIS_ LPMESSAGE lpMessage, \ - LPMAPIFOLDER lpFolder, \ - LPMDB lpMDB, \ - ULONG FAR * lpulFlags, \ - ULONG FAR * lpcbEntryID, \ - LPBYTE FAR * lppEntryID) IPURE; \ - MAPIMETHOD(OutboundMsgHook) \ - (THIS_ LPMESSAGE lpMessage, \ - LPMAPIFOLDER lpFolder, \ - LPMDB lpMDB, \ - ULONG FAR * lpulFlags, \ - ULONG FAR * lpcbEntryID, \ - LPBYTE FAR * lppEntryID) IPURE; \ - -#undef INTERFACE -#define INTERFACE ISpoolerHook -DECLARE_MAPI_INTERFACE_(ISpoolerHook, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_ISPOOLERHOOK_METHODS(PURE) -}; - -DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook, LPSPOOLERHOOK); - -/* Hook Provider Entry Point */ - -#define HOOK_INBOUND ((ULONG) 0x00000200) -#define HOOK_OUTBOUND ((ULONG) 0x00000400) - -typedef HRESULT (STDMAPIINITCALLTYPE HPPROVIDERINIT)( - LPMAPISESSION lpSession, - HINSTANCE hInstance, - LPALLOCATEBUFFER lpAllocateBuffer, - LPALLOCATEMORE lpAllocateMore, - LPFREEBUFFER lpFreeBuffer, - LPMAPIUID lpSectionUID, - ULONG ulFlags, - LPSPOOLERHOOK FAR * lppSpoolerHook -); - -HPPROVIDERINIT HPProviderInit; - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* MAPIHOOK_H */ +/* + * M A P I H O O K . H + * + * Defines the SpoolerMsgHook provider interface. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPIHOOK_H +#define MAPIHOOK_H + +#ifndef MAPIDEFS_H +#include +#include +#include +#include +#endif + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ISpoolerHook Interface ------------------------------------------------ */ + +/* MsgHooks */ + +#define HOOK_DELETE ((ULONG) 0x00000001) +#define HOOK_CANCEL ((ULONG) 0x00000002) + +#define MAPI_ISPOOLERHOOK_METHODS(IPURE) \ + MAPIMETHOD(InboundMsgHook) \ + (THIS_ LPMESSAGE lpMessage, \ + LPMAPIFOLDER lpFolder, \ + LPMDB lpMDB, \ + ULONG FAR * lpulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPBYTE FAR * lppEntryID) IPURE; \ + MAPIMETHOD(OutboundMsgHook) \ + (THIS_ LPMESSAGE lpMessage, \ + LPMAPIFOLDER lpFolder, \ + LPMDB lpMDB, \ + ULONG FAR * lpulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPBYTE FAR * lppEntryID) IPURE; \ + +#undef INTERFACE +#define INTERFACE ISpoolerHook +DECLARE_MAPI_INTERFACE_(ISpoolerHook, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_ISPOOLERHOOK_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook, LPSPOOLERHOOK); + +/* Hook Provider Entry Point */ + +#define HOOK_INBOUND ((ULONG) 0x00000200) +#define HOOK_OUTBOUND ((ULONG) 0x00000400) + +typedef HRESULT (STDMAPIINITCALLTYPE HPPROVIDERINIT)( + LPMAPISESSION lpSession, + HINSTANCE hInstance, + LPALLOCATEBUFFER lpAllocateBuffer, + LPALLOCATEMORE lpAllocateMore, + LPFREEBUFFER lpFreeBuffer, + LPMAPIUID lpSectionUID, + ULONG ulFlags, + LPSPOOLERHOOK FAR * lppSpoolerHook +); + +HPPROVIDERINIT HPProviderInit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* MAPIHOOK_H */ diff --git a/com/win32comext/mapi/src/mapi_headers/MAPINls.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPINls.h similarity index 92% rename from com/win32comext/mapi/src/mapi_headers/MAPINls.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPINls.h index 24f7f5acb..5538c62b2 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPINls.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPINls.h @@ -1,196 +1,198 @@ -/* - * M A P I N L S . H - * - * Internationalization Support Utilities - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef _MAPINLS_H_ -#define _MAPINLS_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#if defined (WIN64) && !defined (_WIN64) -#define _WIN64 -#endif - -#if defined (WIN32) && !defined (_WIN32) -#define _WIN32 -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* We don't want to include windows.h in case that conflicts with an */ -/* earlier inclusion of compobj.h */ - -#if !defined(WINAPI) - #if defined(_WIN64) && (_MSC_VER >= 800) - #define WINAPI - #elif defined(_WIN32) && (_MSC_VER >= 800) - #define WINAPI __stdcall - #else - #error "Unknown Platform: MAPI is currently supported on Win32 and Win64" - #endif -#endif - -#if defined(DOS) || defined(_MAC) -#include -#endif - -#ifndef FAR -#define FAR -#endif - -typedef unsigned char BYTE; -typedef unsigned short WORD; -typedef unsigned long DWORD; -typedef unsigned int UINT; -typedef int BOOL; - -#ifndef __CHAR_DEFINED__ -typedef char CHAR; -#endif - -#ifdef UNICODE -typedef WCHAR TCHAR; -#else -typedef char TCHAR; -#endif - -#if !defined(_NATIVE_WCHAR_T_DEFINED) -typedef unsigned short WCHAR; -#endif - -typedef WCHAR FAR * LPWSTR; -typedef const WCHAR FAR * LPCWSTR; -typedef CHAR FAR * LPSTR; -typedef const CHAR FAR * LPCSTR; -typedef TCHAR FAR * LPTSTR; -typedef const TCHAR FAR * LPCTSTR; -typedef DWORD LCID; -typedef const void FAR * LPCVOID; - -#ifndef _MAC -#ifndef LPOLESTR -#if defined(_WIN64) || defined(_WIN32) -#define LPOLESTR LPWSTR -#define LPCOLESTR LPCWSTR -#define OLECHAR WCHAR -#define OLESTR(str) L##str -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif /* _WIN64 || _WIN32*/ -#endif /* LPOLESTR */ -#endif /* _MAC */ - -#define NORM_IGNORECASE 0x00000001 /* ignore case */ -#define NORM_IGNORENONSPACE 0x00000002 /* ignore diacritics */ -#define NORM_IGNORESYMBOLS 0x00000004 /* ignore symbols */ - -#if defined(_WIN64) || defined (_WIN32) /* from winnls.h */ -#define NORM_IGNOREKANATYPE 0x00010000 /* ignore kanatype */ -#define NORM_IGNOREWIDTH 0x00020000 /* ignore width */ -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif - -#if defined(DOS) || defined(_MAC) - -#define IsBadReadPtr(lp, cb) (FALSE) -#define IsBadWritePtr(lp, cb) (FALSE) -#define IsBadHugeReadPtr(lp, cb) (FALSE) -#define IsBadHugeWritePtr(lp, cb) (FALSE) -#define IsBadCodePtr(lpfn) (FALSE) -#ifdef _MAC -#undef IsBadStringPtr -#endif -#define IsBadStringPtr(lpsz, cchMax) (FALSE) -#define IsBadStringPtrA(lpsz, cchMax) (FALSE) - -#if defined(DOS) - -#define lstrcpyA strcpy -#define lstrlenA strlen -#define lstrcmpA strcmp -#define lstrcmp strcmp -#define lstrcmpi strcmpi -#define lstrcpy strcpy -#define lstrcat strcat -#define lstrlen strlen -#define wsprintf sprintf - -#endif -#endif - -#if defined(DOS) || defined(WIN16) -/* Simulate effect of afx header */ -#define __T(x) x -#define _T(x) __T(x) -#define TEXT _T -#endif - -#define CP_ACP 0 /* default to ANSI code page */ -#define CP_OEMCP 1 /* default to OEM code page */ - -LCID WINAPI MNLS_GetUserDefaultLCID(void); -UINT WINAPI MNLS_GetACP(void); -int WINAPI MNLS_CompareStringA(LCID Locale, DWORD dwCmpFlags, - LPCSTR lpString1, int cchCount1, LPCSTR lpString2, - int cchCount2); -int WINAPI MNLS_CompareStringW(LCID Locale, DWORD dwCmpFlags, - LPCWSTR lpString1, int cchCount1, LPCWSTR lpString2, - int cchCount2); -int WINAPI MNLS_MultiByteToWideChar(UINT uCodePage, DWORD dwFlags, - LPCSTR lpMultiByteStr, int cchMultiByte, - LPWSTR lpWideCharStr, int cchWideChar); -int WINAPI MNLS_WideCharToMultiByte(UINT uCodePage, DWORD dwFlags, - LPCWSTR lpWideCharStr, int cchWideChar, - LPSTR lpMultiByteStr, int cchMultiByte, - LPCSTR lpDefaultChar, BOOL FAR *lpfUsedDefaultChar); -int WINAPI MNLS_lstrlenW(LPCWSTR lpString); -int WINAPI MNLS_lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2); -LPWSTR WINAPI MNLS_lstrcpyW(LPWSTR lpString1, LPCWSTR lpString2); -BOOL WINAPI MNLS_IsBadStringPtrW(LPCWSTR lpsz, UINT ucchMax); - -#if (defined (_WIN64) || defined(_WIN32)) && !defined(_WINNT) && !defined(_WIN95) && !defined(_MAC) -#define _WINNT -#endif - -#if !defined(_WINNT) && !defined(_WIN95) -#define GetUserDefaultLCID MNLS_GetUserDefaultLCID -#define GetACP MNLS_GetACP -#define MultiByteToWideChar MNLS_MultiByteToWideChar -#define WideCharToMultiByte MNLS_WideCharToMultiByte -#define CompareStringA MNLS_CompareStringA -#endif - -#if !defined(MAPI_NOWIDECHAR) - -#define lstrlenW MNLS_lstrlenW -#define lstrcmpW MNLS_lstrcmpW -#define lstrcpyW MNLS_lstrcpyW -#define CompareStringW MNLS_CompareStringW - -#if defined(_WINNT) || defined(_WIN95) -#define IsBadStringPtrW MNLS_IsBadStringPtrW -#elif defined(_MAC) -#define IsBadStringPtrW(lpsz, cchMax) (FALSE) -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#define IsBadStringPtrW (FALSE) -#endif - -#endif /* ! MAPI_NOWIDECHAR */ - -#ifdef __cplusplus -} -#endif - -#endif /* _MAPINLS_H_ */ - - +/* + * M A P I N L S . H + * + * Internationalization Support Utilities + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef _MAPINLS_H_ +#define _MAPINLS_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#if defined (WIN64) && !defined (_WIN64) +#define _WIN64 +#endif + +#if defined (WIN32) && !defined (_WIN32) +#define _WIN32 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* We don't want to include windows.h in case that conflicts with an */ +/* earlier inclusion of compobj.h */ + +#if !defined(WINAPI) + #if defined(_WIN64) && (_MSC_VER >= 800) + #define WINAPI + #elif defined(_M_ARM) && (_MSC_VER >= 800) + #define WINAPI + #elif defined(_WIN32) && (_MSC_VER >= 800) + #define WINAPI __stdcall + #else + #error "Unknown Platform: MAPI is currently supported on Win32 and Win64" + #endif +#endif + +#if defined(DOS) || defined(_MAC) +#include +#endif + +#ifndef FAR +#define FAR +#endif + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; +typedef unsigned int UINT; +typedef int BOOL; + +#ifndef __CHAR_DEFINED__ +typedef char CHAR; +#endif + +#ifdef UNICODE +typedef WCHAR TCHAR; +#else +typedef char TCHAR; +#endif + +#if !defined(_NATIVE_WCHAR_T_DEFINED) +typedef unsigned short WCHAR; +#endif + +typedef WCHAR FAR * LPWSTR; +typedef const WCHAR FAR * LPCWSTR; +typedef CHAR FAR * LPSTR; +typedef const CHAR FAR * LPCSTR; +typedef TCHAR FAR * LPTSTR; +typedef const TCHAR FAR * LPCTSTR; +typedef DWORD LCID; +typedef const void FAR * LPCVOID; + +#ifndef _MAC +#ifndef LPOLESTR +#if defined(_WIN64) || defined(_WIN32) || defined(_M_ARM) +#define LPOLESTR LPWSTR +#define LPCOLESTR LPCWSTR +#define OLECHAR WCHAR +#define OLESTR(str) L##str +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif /* _WIN64 || _WIN32*/ +#endif /* LPOLESTR */ +#endif /* _MAC */ + +#define NORM_IGNORECASE 0x00000001 /* ignore case */ +#define NORM_IGNORENONSPACE 0x00000002 /* ignore diacritics */ +#define NORM_IGNORESYMBOLS 0x00000004 /* ignore symbols */ + +#if defined(_WIN64) || defined (_WIN32) || defined(_M_ARM) /* from winnls.h */ +#define NORM_IGNOREKANATYPE 0x00010000 /* ignore kanatype */ +#define NORM_IGNOREWIDTH 0x00020000 /* ignore width */ +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif + +#if defined(DOS) || defined(_MAC) + +#define IsBadReadPtr(lp, cb) (FALSE) +#define IsBadWritePtr(lp, cb) (FALSE) +#define IsBadHugeReadPtr(lp, cb) (FALSE) +#define IsBadHugeWritePtr(lp, cb) (FALSE) +#define IsBadCodePtr(lpfn) (FALSE) +#ifdef _MAC +#undef IsBadStringPtr +#endif +#define IsBadStringPtr(lpsz, cchMax) (FALSE) +#define IsBadStringPtrA(lpsz, cchMax) (FALSE) + +#if defined(DOS) + +#define lstrcpyA strcpy +#define lstrlenA strlen +#define lstrcmpA strcmp +#define lstrcmp strcmp +#define lstrcmpi strcmpi +#define lstrcpy strcpy +#define lstrcat strcat +#define lstrlen strlen +#define wsprintf sprintf + +#endif +#endif + +#if defined(DOS) || defined(WIN16) +/* Simulate effect of afx header */ +#define __T(x) x +#define _T(x) __T(x) +#define TEXT _T +#endif + +#define CP_ACP 0 /* default to ANSI code page */ +#define CP_OEMCP 1 /* default to OEM code page */ + +LCID WINAPI MNLS_GetUserDefaultLCID(void); +UINT WINAPI MNLS_GetACP(void); +int WINAPI MNLS_CompareStringA(LCID Locale, DWORD dwCmpFlags, + LPCSTR lpString1, int cchCount1, LPCSTR lpString2, + int cchCount2); +int WINAPI MNLS_CompareStringW(LCID Locale, DWORD dwCmpFlags, + LPCWSTR lpString1, int cchCount1, LPCWSTR lpString2, + int cchCount2); +int WINAPI MNLS_MultiByteToWideChar(UINT uCodePage, DWORD dwFlags, + LPCSTR lpMultiByteStr, int cchMultiByte, + LPWSTR lpWideCharStr, int cchWideChar); +int WINAPI MNLS_WideCharToMultiByte(UINT uCodePage, DWORD dwFlags, + LPCWSTR lpWideCharStr, int cchWideChar, + LPSTR lpMultiByteStr, int cchMultiByte, + LPCSTR lpDefaultChar, BOOL FAR *lpfUsedDefaultChar); +int WINAPI MNLS_lstrlenW(LPCWSTR lpString); +int WINAPI MNLS_lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2); +LPWSTR WINAPI MNLS_lstrcpyW(LPWSTR lpString1, LPCWSTR lpString2); +BOOL WINAPI MNLS_IsBadStringPtrW(LPCWSTR lpsz, UINT ucchMax); + +#if (defined (_WIN64) || defined(_WIN32) || defined(_M_ARM)) && !defined(_WINNT) && !defined(_WIN95) && !defined(_MAC) +#define _WINNT +#endif + +#if !defined(_WINNT) && !defined(_WIN95) +#define GetUserDefaultLCID MNLS_GetUserDefaultLCID +#define GetACP MNLS_GetACP +#define MultiByteToWideChar MNLS_MultiByteToWideChar +#define WideCharToMultiByte MNLS_WideCharToMultiByte +#define CompareStringA MNLS_CompareStringA +#endif + +#if !defined(MAPI_NOWIDECHAR) + +#define lstrlenW MNLS_lstrlenW +#define lstrcmpW MNLS_lstrcmpW +#define lstrcpyW MNLS_lstrcpyW +#define CompareStringW MNLS_CompareStringW + +#if defined(_WINNT) || defined(_WIN95) +#define IsBadStringPtrW MNLS_IsBadStringPtrW +#elif defined(_MAC) +#define IsBadStringPtrW(lpsz, cchMax) (FALSE) +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#define IsBadStringPtrW (FALSE) +#endif + +#endif /* ! MAPI_NOWIDECHAR */ + +#ifdef __cplusplus +} +#endif + +#endif /* _MAPINLS_H_ */ + + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIOID.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIOID.h similarity index 95% rename from com/win32comext/mapi/src/mapi_headers/MAPIOID.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIOID.h index fbfcaa1e0..8d0536aa7 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIOID.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIOID.h @@ -1,106 +1,106 @@ -/* - * M A P I O I D . H - * - * MAPI OID definition header file - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef _MAPIOID_ -#define _MAPIOID_ - -/* - * MAPI 1.0 Object Identifiers (OID's) - * - * All MAPI 1.0 OIDs are prefixed by the segment - * - * {iso(1) ansi(2) usa(840) microsoft(113556) mapi(3)} - * - * All MAPI 1.0 tags are also include the addistion segment - * - * {tags(10)} - * - * All MAPI 1.0 encodings are also include the addistion segment - * - * {encodeings(11)} - * - * The set of defined tags are as follows - * - * {{mapiprefix} {tags} {tnef(1)}} MAPI 1.0 TNEF encapsulation tag - * - * {{mapiprefix} {tags} {ole(3)}} MAPI 1.0 OLE prefix - * {{mapiprefix} {tags} {ole(3)} {v1(1)}} MAPI 1.0 OLE 1.0 prefix - * {{mapiprefix} {tags} {ole(3)} {v1(1)} {storage(1)}} MAPI 1.0 OLE 1.0 OLESTREAM - * {{mapiprefix} {tags} {ole(3)} {v2(2)}} MAPI 1.0 OLE 2.0 prefix - * {{mapiprefix} {tags} {ole(3)} {v2(2)} {storage(1)}} MAPI 1.0 OLE 2.0 IStorage - * - * The set of defined encodings are as follows - * - * {{mapiprefix} {encodings} {MacBinary(1)}} MAPI 1.0 MacBinary - */ - -#define OID_TAG 0x0A -#define OID_ENCODING 0x0B - -#define DEFINE_OID_1(name, b0, b1) \ - EXTERN_C const BYTE name[] - -#define DEFINE_OID_2(name, b0, b1, b2) \ - EXTERN_C const BYTE name[] - -#define DEFINE_OID_3(name, b0, b1, b2, b3) \ - EXTERN_C const BYTE name[] - -#define DEFINE_OID_4(name, b0, b1, b2, b3, b4) \ - EXTERN_C const BYTE name[] - -#define CB_OID_1 9 -#define CB_OID_2 10 -#define CB_OID_3 11 -#define CB_OID_4 12 - -#ifdef INITOID -#include -#endif - -#ifdef USES_OID_TNEF -DEFINE_OID_1(OID_TNEF, OID_TAG, 0x01); -#define CB_OID_TNEF CB_OID_1 -#endif - -#ifdef USES_OID_OLE -DEFINE_OID_1(OID_OLE, OID_TAG, 0x03); -#define CB_OID_OLE CB_OID_1 -#endif - -#ifdef USES_OID_OLE1 -DEFINE_OID_2(OID_OLE1, OID_TAG, 0x03, 0x01); -#define CB_OID_OLE1 CB_OID_2 -#endif - -#ifdef USES_OID_OLE1_STORAGE -DEFINE_OID_3(OID_OLE1_STORAGE, OID_TAG, 0x03, 0x01, 0x01); -#define CB_OID_OLE1_STORAGE CB_OID_3 -#endif - -#ifdef USES_OID_OLE2 -DEFINE_OID_2(OID_OLE2, OID_TAG, 0x03, 0x02); -#define CB_OID_OLE2 CB_OID_2 -#endif - -#ifdef USES_OID_OLE2_STORAGE -DEFINE_OID_3(OID_OLE2_STORAGE, OID_TAG, 0x03, 0x02, 0x01); -#define CB_OID_OLE2_STORAGE CB_OID_3 -#endif - -#ifdef USES_OID_MAC_BINARY -DEFINE_OID_1(OID_MAC_BINARY, OID_ENCODING, 0x01); -#define CB_OID_MAC_BINARY CB_OID_1 -#endif - -#ifdef USES_OID_MIMETAG -DEFINE_OID_1(OID_MIMETAG, OID_TAG, 0x04); -#define CB_OID_MIMETAG CB_OID_1 -#endif - -#endif +/* + * M A P I O I D . H + * + * MAPI OID definition header file + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef _MAPIOID_ +#define _MAPIOID_ + +/* + * MAPI 1.0 Object Identifiers (OID's) + * + * All MAPI 1.0 OIDs are prefixed by the segment + * + * {iso(1) ansi(2) usa(840) microsoft(113556) mapi(3)} + * + * All MAPI 1.0 tags are also include the addistion segment + * + * {tags(10)} + * + * All MAPI 1.0 encodings are also include the addistion segment + * + * {encodeings(11)} + * + * The set of defined tags are as follows + * + * {{mapiprefix} {tags} {tnef(1)}} MAPI 1.0 TNEF encapsulation tag + * + * {{mapiprefix} {tags} {ole(3)}} MAPI 1.0 OLE prefix + * {{mapiprefix} {tags} {ole(3)} {v1(1)}} MAPI 1.0 OLE 1.0 prefix + * {{mapiprefix} {tags} {ole(3)} {v1(1)} {storage(1)}} MAPI 1.0 OLE 1.0 OLESTREAM + * {{mapiprefix} {tags} {ole(3)} {v2(2)}} MAPI 1.0 OLE 2.0 prefix + * {{mapiprefix} {tags} {ole(3)} {v2(2)} {storage(1)}} MAPI 1.0 OLE 2.0 IStorage + * + * The set of defined encodings are as follows + * + * {{mapiprefix} {encodings} {MacBinary(1)}} MAPI 1.0 MacBinary + */ + +#define OID_TAG 0x0A +#define OID_ENCODING 0x0B + +#define DEFINE_OID_1(name, b0, b1) \ + EXTERN_C const BYTE name[] + +#define DEFINE_OID_2(name, b0, b1, b2) \ + EXTERN_C const BYTE name[] + +#define DEFINE_OID_3(name, b0, b1, b2, b3) \ + EXTERN_C const BYTE name[] + +#define DEFINE_OID_4(name, b0, b1, b2, b3, b4) \ + EXTERN_C const BYTE name[] + +#define CB_OID_1 9 +#define CB_OID_2 10 +#define CB_OID_3 11 +#define CB_OID_4 12 + +#ifdef INITOID +#include +#endif + +#ifdef USES_OID_TNEF +DEFINE_OID_1(OID_TNEF, OID_TAG, 0x01); +#define CB_OID_TNEF CB_OID_1 +#endif + +#ifdef USES_OID_OLE +DEFINE_OID_1(OID_OLE, OID_TAG, 0x03); +#define CB_OID_OLE CB_OID_1 +#endif + +#ifdef USES_OID_OLE1 +DEFINE_OID_2(OID_OLE1, OID_TAG, 0x03, 0x01); +#define CB_OID_OLE1 CB_OID_2 +#endif + +#ifdef USES_OID_OLE1_STORAGE +DEFINE_OID_3(OID_OLE1_STORAGE, OID_TAG, 0x03, 0x01, 0x01); +#define CB_OID_OLE1_STORAGE CB_OID_3 +#endif + +#ifdef USES_OID_OLE2 +DEFINE_OID_2(OID_OLE2, OID_TAG, 0x03, 0x02); +#define CB_OID_OLE2 CB_OID_2 +#endif + +#ifdef USES_OID_OLE2_STORAGE +DEFINE_OID_3(OID_OLE2_STORAGE, OID_TAG, 0x03, 0x02, 0x01); +#define CB_OID_OLE2_STORAGE CB_OID_3 +#endif + +#ifdef USES_OID_MAC_BINARY +DEFINE_OID_1(OID_MAC_BINARY, OID_ENCODING, 0x01); +#define CB_OID_MAC_BINARY CB_OID_1 +#endif + +#ifdef USES_OID_MIMETAG +DEFINE_OID_1(OID_MIMETAG, OID_TAG, 0x04); +#define CB_OID_MIMETAG CB_OID_1 +#endif + +#endif diff --git a/com/win32comext/mapi/src/mapi_headers/MAPISPI.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPISPI.h similarity index 97% rename from com/win32comext/mapi/src/mapi_headers/MAPISPI.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPISPI.h index 72fc0ab18..f167447fc 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPISPI.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPISPI.h @@ -1,929 +1,934 @@ -/* - * M A P I S P I . H - * - * Defines the calls and structures exchanged between MAPI or the spooler - * and the MAPI service providers - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef MAPISPI_H -#define MAPISPI_H -#if _MSC_VER > 1000 -#pragma once -#endif - -/* Include common MAPI header files if they haven't been already. */ -#ifndef MAPIDEFS_H -#include -#endif -#ifndef MAPICODE_H -#include -#endif -#ifndef MAPIGUID_H -#include -#endif -#ifndef MAPITAGS_H -#include -#endif - - -#ifndef BEGIN_INTERFACE -#define BEGIN_INTERFACE -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* The MAPI SPI has a version number. MAPIX.DLL knows and supports - * one or more versions of the SPI. Each provider supports one or - * more versions of the SPI. Checks are performed in both MAPIX.DLL - * and in the provider to ensure that they agree to use exactly one - * version of the MAPI SPI. - * - * The SPI version number is composed of a major (8-bit) version, - * minor (8-bit) version, and micro (16-bit) version. The first - * retail ship of MAPI 1.0 is expected to be version 1.0.0. - * The major version number changes rarely. - * The minor version number changes opon each retail ship of - * MAPI if the SPI has been modified. - * The micro version number changes internally at Microsoft - * during development of MAPI. - * - * The version of the SPI documented by this set of header files - * is ALWAYS known as "CURRENT_SPI_VERSION". If you write a - * service provider, and get a new set of header files, and update - * your code to the new interface, you'll be at the "current" version. - */ -#define CURRENT_SPI_VERSION 0x00010010L - -/* Here are some well-known SPI version numbers: - * (These will eventually be useful for provider-writers who - * might choose to make provider DLLs that support more than - * one version of the MAPI SPI. - */ -#define PDK1_SPI_VERSION 0x00010000L /* 0.1.0 MAPI PDK1 Spring 1993 */ - -#define PDK2_SPI_VERSION 0x00010008L /* 0.1.8 MAPI PDK2 Spring 1994 */ - -#define PDK3_SPI_VERSION 0x00010010L /* 0.1.16 MAPI PDK3 Fall 1994 */ - -/* - * Forward declaration of interface pointers specific to the service - * provider interface. - */ -DECLARE_MAPI_INTERFACE_PTR(IMAPISupport, LPMAPISUP); - -/* IMAPISupport Interface -------------------------------------------------- */ - -/* Notification key structure for the MAPI notification engine */ - -typedef struct -{ - ULONG cb; /* How big the key is */ - BYTE ab[MAPI_DIM]; /* Key contents */ -} NOTIFKEY, FAR * LPNOTIFKEY; - -#define CbNewNOTIFKEY(_cb) (offsetof(NOTIFKEY,ab) + (_cb)) -#define CbNOTIFKEY(_lpkey) (offsetof(NOTIFKEY,ab) + (_lpkey)->cb) -#define SizedNOTIFKEY(_cb, _name) \ - struct _NOTIFKEY_ ## _name \ -{ \ - ULONG cb; \ - BYTE ab[_cb]; \ -} _name - - -/* For Subscribe() */ - -#define NOTIFY_SYNC ((ULONG) 0x40000000) - -/* For Notify() */ - -#define NOTIFY_CANCELED ((ULONG) 0x80000000) - - -/* From the Notification Callback function (well, this is really a ulResult) */ - -#define CALLBACK_DISCONTINUE ((ULONG) 0x80000000) - -/* For Transport's SpoolerNotify() */ - -#define NOTIFY_NEWMAIL ((ULONG) 0x00000001) -#define NOTIFY_READYTOSEND ((ULONG) 0x00000002) -#define NOTIFY_SENTDEFERRED ((ULONG) 0x00000004) -#define NOTIFY_CRITSEC ((ULONG) 0x00001000) -#define NOTIFY_NONCRIT ((ULONG) 0x00002000) -#define NOTIFY_CONFIG_CHANGE ((ULONG) 0x00004000) -#define NOTIFY_CRITICAL_ERROR ((ULONG) 0x10000000) - -/* For Message Store's SpoolerNotify() */ - -#define NOTIFY_NEWMAIL_RECEIVED ((ULONG) 0x20000000) - -/* For ModifyStatusRow() */ - -#define STATUSROW_UPDATE ((ULONG) 0x10000000) - -/* For IStorageFromStream() */ - -#define STGSTRM_RESET ((ULONG) 0x00000000) -#define STGSTRM_CURRENT ((ULONG) 0x10000000) -#define STGSTRM_MODIFY ((ULONG) 0x00000002) -#define STGSTRM_CREATE ((ULONG) 0x00001000) - -/* For GetOneOffTable() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -/* For CreateOneOff() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ -/****** MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) */ - -/* For ReadReceipt() */ -#define MAPI_NON_READ ((ULONG) 0x00000001) - -/* For DoConfigPropSheet() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -/* Preprocessor calls: */ - -/* PreprocessMessage, first ordinal in RegisterPreprocessor(). */ - -typedef HRESULT (STDMETHODCALLTYPE PREPROCESSMESSAGE)( - LPVOID lpvSession, - LPMESSAGE lpMessage, - LPADRBOOK lpAdrBook, - LPMAPIFOLDER lpFolder, - LPALLOCATEBUFFER AllocateBuffer, - LPALLOCATEMORE AllocateMore, - LPFREEBUFFER FreeBuffer, - ULONG FAR *lpcOutbound, - LPMESSAGE FAR * FAR *lpppMessage, - LPADRLIST FAR *lppRecipList); - -/* RemovePreprocessInfo, second ordinal in RegisterPreprocessor(). */ - -typedef HRESULT (STDMETHODCALLTYPE REMOVEPREPROCESSINFO)(LPMESSAGE lpMessage); - -/* Function pointer for GetReleaseInfo */ - -#define MAPI_IMAPISUPPORT_METHODS1(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetMemAllocRoutines) \ - (THIS_ LPALLOCATEBUFFER FAR * lpAllocateBuffer, \ - LPALLOCATEMORE FAR * lpAllocateMore, \ - LPFREEBUFFER FAR * lpFreeBuffer) IPURE; \ - MAPIMETHOD(Subscribe) \ - (THIS_ LPNOTIFKEY lpKey, \ - ULONG ulEventMask, \ - ULONG ulFlags, \ - LPMAPIADVISESINK lpAdviseSink, \ - ULONG_PTR FAR * lpulConnection) IPURE; \ - MAPIMETHOD(Unsubscribe) \ - (THIS_ ULONG_PTR ulConnection) IPURE; \ - MAPIMETHOD(Notify) \ - (THIS_ LPNOTIFKEY lpKey, \ - ULONG cNotification, \ - LPNOTIFICATION lpNotifications, \ - ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(ModifyStatusRow) \ - (THIS_ ULONG cValues, \ - LPSPropValue lpColumnVals, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(OpenProfileSection) \ - (THIS_ LPMAPIUID lpUid, \ - ULONG ulFlags, \ - LPPROFSECT FAR * lppProfileObj) IPURE; \ - MAPIMETHOD(RegisterPreprocessor) \ - (THIS_ LPMAPIUID lpMuid, \ - LPTSTR lpszAdrType, \ - LPTSTR lpszDLLName, \ - LPSTR /* String8! */ lpszPreprocess, \ - LPSTR /* String8! */ lpszRemovePreprocessInfo, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(NewUID) \ - (THIS_ LPMAPIUID lpMuid) IPURE; \ - MAPIMETHOD(MakeInvalid) \ - (THIS_ ULONG ulFlags, \ - LPVOID lpObject, \ - ULONG ulRefCount, \ - ULONG cMethods) IPURE; \ - -#define MAPI_IMAPISUPPORT_METHODS2(IPURE) \ - MAPIMETHOD(SpoolerYield) \ - (THIS_ ULONG ulFlags) IPURE; \ - MAPIMETHOD(SpoolerNotify) \ - (THIS_ ULONG ulFlags, \ - LPVOID lpvData) IPURE; \ - MAPIMETHOD(CreateOneOff) \ - (THIS_ LPTSTR lpszName, \ - LPTSTR lpszAdrType, \ - LPTSTR lpszAddress, \ - ULONG ulFlags, \ - ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(SetProviderUID) \ - (THIS_ LPMAPIUID lpProviderID, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(CompareEntryIDs) \ - (THIS_ ULONG cbEntry1, \ - LPENTRYID lpEntry1, \ - ULONG cbEntry2, \ - LPENTRYID lpEntry2, \ - ULONG ulCompareFlags, \ - ULONG FAR * lpulResult) IPURE; \ - MAPIMETHOD(OpenTemplateID) \ - (THIS_ ULONG cbTemplateID, \ - LPENTRYID lpTemplateID, \ - ULONG ulTemplateFlags, \ - LPMAPIPROP lpMAPIPropData, \ - LPCIID lpInterface, \ - LPMAPIPROP FAR * lppMAPIPropNew, \ - LPMAPIPROP lpMAPIPropSibling) IPURE; \ - MAPIMETHOD(OpenEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulOpenFlags, \ - ULONG FAR * lpulObjType, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(GetOneOffTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(Address) \ - (THIS_ ULONG_PTR FAR * lpulUIParam, \ - LPADRPARM lpAdrParms, \ - LPADRLIST FAR * lppAdrList) IPURE; \ - MAPIMETHOD(Details) \ - (THIS_ ULONG_PTR FAR * lpulUIParam, \ - LPFNDISMISS lpfnDismiss, \ - LPVOID lpvDismissContext, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPFNBUTTON lpfButtonCallback, \ - LPVOID lpvButtonContext, \ - LPTSTR lpszButtonText, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(NewEntry) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - ULONG cbEIDContainer, \ - LPENTRYID lpEIDContainer, \ - ULONG cbEIDNewEntryTpl, \ - LPENTRYID lpEIDNewEntryTpl, \ - ULONG FAR * lpcbEIDNewEntry, \ - LPENTRYID FAR * lppEIDNewEntry) IPURE; \ - MAPIMETHOD(DoConfigPropsheet) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - LPTSTR lpszTitle, \ - LPMAPITABLE lpDisplayTable, \ - LPMAPIPROP lpCOnfigData, \ - ULONG ulTopPage) IPURE; \ - MAPIMETHOD(CopyMessages) \ - (THIS_ LPCIID lpSrcInterface, \ - LPVOID lpSrcFolder, \ - LPENTRYLIST lpMsgList, \ - LPCIID lpDestInterface, \ - LPVOID lpDestFolder, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(CopyFolder) \ - (THIS_ LPCIID lpSrcInterface, \ - LPVOID lpSrcFolder, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpDestInterface, \ - LPVOID lpDestFolder, \ - LPTSTR lszNewFolderName, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - ULONG ulFlags) IPURE; \ - -#define MAPI_IMAPISUPPORT_METHODS3(IPURE) \ - MAPIMETHOD(DoCopyTo) \ - (THIS_ LPCIID lpSrcInterface, \ - LPVOID lpSrcObj, \ - ULONG ciidExclude, \ - LPCIID rgiidExclude, \ - LPSPropTagArray lpExcludeProps, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - LPCIID lpDestInterface, \ - LPVOID lpDestObj, \ - ULONG ulFlags, \ - LPSPropProblemArray FAR * lppProblems) IPURE; \ - MAPIMETHOD(DoCopyProps) \ - (THIS_ LPCIID lpSrcInterface, \ - LPVOID lpSrcObj, \ - LPSPropTagArray lpIncludeProps, \ - ULONG_PTR ulUIParam, \ - LPMAPIPROGRESS lpProgress, \ - LPCIID lpDestInterface, \ - LPVOID lpDestObj, \ - ULONG ulFlags, \ - LPSPropProblemArray FAR * lppProblems) IPURE; \ - MAPIMETHOD(DoProgressDialog) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - LPMAPIPROGRESS FAR * lppProgress) IPURE; \ - MAPIMETHOD(ReadReceipt) \ - (THIS_ ULONG ulFlags, \ - LPMESSAGE lpReadMessage, \ - LPMESSAGE FAR * lppEmptyMessage) IPURE; \ - MAPIMETHOD(PrepareSubmit) \ - (THIS_ LPMESSAGE lpMessage, \ - ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(ExpandRecips) \ - (THIS_ LPMESSAGE lpMessage, \ - ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(UpdatePAB) \ - (THIS_ ULONG ulFlags, \ - LPMESSAGE lpMessage) IPURE; \ - MAPIMETHOD(DoSentMail) \ - (THIS_ ULONG ulFlags, \ - LPMESSAGE lpMessage) IPURE; \ - MAPIMETHOD(OpenAddressBook) \ - (THIS_ LPCIID lpInterface, \ - ULONG ulFlags, \ - LPADRBOOK FAR * lppAdrBook) IPURE; \ - MAPIMETHOD(Preprocess) \ - (THIS_ ULONG ulFlags, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID) IPURE; \ - MAPIMETHOD(CompleteMsg) \ - (THIS_ ULONG ulFlags, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID) IPURE; \ - MAPIMETHOD(StoreLogoffTransports) \ - (THIS_ ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(StatusRecips) \ - (THIS_ LPMESSAGE lpMessage, \ - LPADRLIST lpRecipList) IPURE; \ - MAPIMETHOD(WrapStoreEntryID) \ - (THIS_ ULONG cbOrigEntry, \ - LPENTRYID lpOrigEntry, \ - ULONG FAR * lpcbWrappedEntry, \ - LPENTRYID FAR * lppWrappedEntry) IPURE; \ - MAPIMETHOD(ModifyProfile) \ - (THIS_ ULONG ulFlags) IPURE; \ - MAPIMETHOD(IStorageFromStream) \ - (THIS_ LPUNKNOWN lpUnkIn, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPSTORAGE FAR * lppStorageOut) IPURE; \ - MAPIMETHOD(GetSvcConfigSupportObj) \ - (THIS_ ULONG ulFlags, \ - LPMAPISUP FAR * lppSvcSupport) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMAPISupport -DECLARE_MAPI_INTERFACE_(IMAPISupport, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPISUPPORT_METHODS1(PURE) - MAPI_IMAPISUPPORT_METHODS2(PURE) - MAPI_IMAPISUPPORT_METHODS3(PURE) -}; - - -/********************************************************************/ -/* */ -/* ADDRESS BOOK SPI */ -/* */ -/********************************************************************/ - -/* Address Book Provider ------------------------------------------------- */ - -/* OpenTemplateID() */ -#define FILL_ENTRY ((ULONG) 0x00000001) - -/* For Logon() */ - -/*#define AB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h */ -/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ - - - -DECLARE_MAPI_INTERFACE_PTR(IABProvider, LPABPROVIDER); -DECLARE_MAPI_INTERFACE_PTR(IABLogon, LPABLOGON); - -#define MAPI_IABPROVIDER_METHODS(IPURE) \ - MAPIMETHOD(Shutdown) \ - (THIS_ ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(Logon) \ - (THIS_ LPMAPISUP lpMAPISup, \ - ULONG_PTR ulUIParam, \ - LPTSTR lpszProfileName, \ - ULONG ulFlags, \ - ULONG FAR * lpulpcbSecurity, \ - LPBYTE FAR * lppbSecurity, \ - LPMAPIERROR FAR * lppMAPIError, \ - LPABLOGON FAR * lppABLogon) IPURE; \ - -#undef INTERFACE -#define INTERFACE IABProvider -DECLARE_MAPI_INTERFACE_(IABProvider, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IABPROVIDER_METHODS(PURE) -}; - -/* For GetOneOffTable() */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -#define MAPI_IABLOGON_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Logoff) \ - (THIS_ ULONG ulFlags) IPURE; \ - MAPIMETHOD(OpenEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(CompareEntryIDs) \ - (THIS_ ULONG cbEntryID1, \ - LPENTRYID lpEntryID1, \ - ULONG cbEntryID2, \ - LPENTRYID lpEntryID2, \ - ULONG ulFlags, \ - ULONG FAR * lpulResult) IPURE; \ - MAPIMETHOD(Advise) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulEventMask, \ - LPMAPIADVISESINK lpAdviseSink, \ - ULONG_PTR FAR * lpulConnection) IPURE; \ - MAPIMETHOD(Unadvise) \ - (THIS_ ULONG_PTR ulConnection) IPURE; \ - MAPIMETHOD(OpenStatusEntry) \ - (THIS_ LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPMAPISTATUS FAR * lppEntry) IPURE; \ - MAPIMETHOD(OpenTemplateID) \ - (THIS_ ULONG cbTemplateID, \ - LPENTRYID lpTemplateID, \ - ULONG ulTemplateFlags, \ - LPMAPIPROP lpMAPIPropData, \ - LPCIID lpInterface, \ - LPMAPIPROP FAR * lppMAPIPropNew, \ - LPMAPIPROP lpMAPIPropSibling) IPURE; \ - MAPIMETHOD(GetOneOffTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(PrepareRecips) \ - (THIS_ ULONG ulFlags, \ - LPSPropTagArray lpPropTagArray, \ - LPADRLIST lpRecipList) IPURE; \ - -#undef INTERFACE -#define INTERFACE IABLogon -DECLARE_MAPI_INTERFACE_(IABLogon, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IABLOGON_METHODS(PURE) -}; - -typedef HRESULT (STDMAPIINITCALLTYPE ABPROVIDERINIT)( - HINSTANCE hInstance, - LPMALLOC lpMalloc, - LPALLOCATEBUFFER lpAllocateBuffer, - LPALLOCATEMORE lpAllocateMore, - LPFREEBUFFER lpFreeBuffer, - ULONG ulFlags, - ULONG ulMAPIVer, - ULONG FAR * lpulProviderVer, - LPABPROVIDER FAR * lppABProvider -); - -ABPROVIDERINIT ABProviderInit; - - - -/********************************************************************/ -/* */ -/* TRANSPORT SPI */ -/* */ -/********************************************************************/ - -/* For DeinitTransport */ - -#define DEINIT_NORMAL ((ULONG) 0x00000001) -#define DEINIT_HURRY ((ULONG) 0x80000000) - -/* For TransportLogon */ - -/* Flags that the Spooler may pass to the transport: */ - -#define LOGON_NO_DIALOG ((ULONG) 0x00000001) -#define LOGON_NO_CONNECT ((ULONG) 0x00000004) -#define LOGON_NO_INBOUND ((ULONG) 0x00000008) -#define LOGON_NO_OUTBOUND ((ULONG) 0x00000010) -/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ - -/* Flags that the transport may pass to the Spooler: */ - -#define LOGON_SP_IDLE ((ULONG) 0x00010000) -#define LOGON_SP_POLL ((ULONG) 0x00020000) -#define LOGON_SP_RESOLVE ((ULONG) 0x00040000) - - -DECLARE_MAPI_INTERFACE_PTR(IXPProvider, LPXPPROVIDER); -DECLARE_MAPI_INTERFACE_PTR(IXPLogon, LPXPLOGON); - -#define MAPI_IXPPROVIDER_METHODS(IPURE) \ - MAPIMETHOD(Shutdown) \ - (THIS_ ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(TransportLogon) \ - (THIS_ LPMAPISUP lpMAPISup, \ - ULONG_PTR ulUIParam, \ - __in LPTSTR lpszProfileName, \ - ULONG FAR * lpulFlags, \ - LPMAPIERROR FAR * lppMAPIError, \ - LPXPLOGON FAR * lppXPLogon) IPURE; \ - -#undef INTERFACE -#define INTERFACE IXPProvider -DECLARE_MAPI_INTERFACE_(IXPProvider, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IXPPROVIDER_METHODS(PURE) -}; - -/* OptionData returned from call to RegisterOptions */ - -#define OPTION_TYPE_RECIPIENT ((ULONG) 0x00000001) -#define OPTION_TYPE_MESSAGE ((ULONG) 0x00000002) - -typedef struct _OPTIONDATA -{ - ULONG ulFlags; /* MAPI_RECIPIENT, MAPI_MESSAGE */ - LPGUID lpRecipGUID; /* Same as returned by AddressTypes() */ - LPTSTR lpszAdrType; /* Same as returned by AddressTypes() */ - LPTSTR lpszDLLName; /* Options DLL */ - ULONG ulOrdinal; /* Ordinal in that DLL */ - ULONG cbOptionsData; /* Count of bytes in lpbOptionsData */ - LPBYTE lpbOptionsData; /* Providers per [recip|message] option data */ - ULONG cOptionsProps; /* Count of Options default prop values */ - LPSPropValue lpOptionsProps; /* Default Options property values */ -} OPTIONDATA, FAR *LPOPTIONDATA; - -typedef SCODE (STDMAPIINITCALLTYPE OPTIONCALLBACK)( - HINSTANCE hInst, - LPMALLOC lpMalloc, - ULONG ulFlags, - ULONG cbOptionData, - LPBYTE lpbOptionData, - LPMAPISUP lpMAPISup, - LPMAPIPROP lpDataSource, - LPMAPIPROP FAR * lppWrappedSource, - LPMAPIERROR FAR * lppMAPIError); - -/* For XP_AddressTypes */ - -/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ - -/* For XP_RegisterRecipOptions */ - -/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ - -/* For XP_RegisterMessageOptions */ - -/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ - -/* For TransportNotify */ - -#define NOTIFY_ABORT_DEFERRED ((ULONG) 0x40000000) -#define NOTIFY_CANCEL_MESSAGE ((ULONG) 0x80000000) -#define NOTIFY_BEGIN_INBOUND ((ULONG) 0x00000001) -#define NOTIFY_END_INBOUND ((ULONG) 0x00010000) -#define NOTIFY_BEGIN_OUTBOUND ((ULONG) 0x00000002) -#define NOTIFY_END_OUTBOUND ((ULONG) 0x00020000) -#define NOTIFY_BEGIN_INBOUND_FLUSH ((ULONG) 0x00000004) -#define NOTIFY_END_INBOUND_FLUSH ((ULONG) 0x00040000) -#define NOTIFY_BEGIN_OUTBOUND_FLUSH ((ULONG) 0x00000008) -#define NOTIFY_END_OUTBOUND_FLUSH ((ULONG) 0x00080000) - -/* For TransportLogoff */ - -#define LOGOFF_NORMAL ((ULONG) 0x00000001) -#define LOGOFF_HURRY ((ULONG) 0x80000000) - -/* For SubmitMessage */ - -#define BEGIN_DEFERRED ((ULONG) 0x00000001) - -/* For EndMessage */ - -/* Flags that the Spooler may pass to the Transport: */ - -/* Flags that the transport may pass to the Spooler: */ - -#define END_RESEND_NOW ((ULONG) 0x00010000) -#define END_RESEND_LATER ((ULONG) 0x00020000) -#define END_DONT_RESEND ((ULONG) 0x00040000) - -#define MAPI_IXPLOGON_METHODS(IPURE) \ - MAPIMETHOD(AddressTypes) \ - (THIS_ ULONG FAR * lpulFlags, \ - ULONG FAR * lpcAdrType, \ - __deref_out_ecount_full(*lpcAdrType) LPTSTR FAR * FAR * lpppAdrTypeArray, \ - ULONG FAR * lpcMAPIUID, \ - LPMAPIUID FAR * FAR * lpppUIDArray) IPURE; \ - MAPIMETHOD(RegisterOptions) \ - (THIS_ ULONG FAR * lpulFlags, \ - ULONG FAR * lpcOptions, \ - LPOPTIONDATA FAR * lppOptions) IPURE; \ - MAPIMETHOD(TransportNotify) \ - (THIS_ ULONG FAR * lpulFlags, \ - LPVOID FAR * lppvData) IPURE; \ - MAPIMETHOD(Idle) \ - (THIS_ ULONG ulFlags) IPURE; \ - MAPIMETHOD(TransportLogoff) \ - (THIS_ ULONG ulFlags) IPURE; \ - MAPIMETHOD(SubmitMessage) \ - (THIS_ ULONG ulFlags, \ - LPMESSAGE lpMessage, \ - ULONG_PTR FAR * lpulMsgRef, \ - ULONG_PTR FAR * lpulReturnParm) IPURE; \ - MAPIMETHOD(EndMessage) \ - (THIS_ ULONG_PTR ulMsgRef, \ - ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(Poll) \ - (THIS_ ULONG FAR * lpulIncoming) IPURE; \ - MAPIMETHOD(StartMessage) \ - (THIS_ ULONG ulFlags, \ - LPMESSAGE lpMessage, \ - ULONG_PTR FAR * lpulMsgRef) IPURE; \ - MAPIMETHOD(OpenStatusEntry) \ - (THIS_ LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPMAPISTATUS FAR * lppEntry) IPURE; \ - MAPIMETHOD(ValidateState) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(FlushQueues) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG cbTargetTransport, \ - LPENTRYID lpTargetTransport, \ - ULONG ulFlags) IPURE; \ - -#undef INTERFACE -#define INTERFACE IXPLogon -DECLARE_MAPI_INTERFACE_(IXPLogon, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IXPLOGON_METHODS(PURE) -}; - - -/* Transport Provider Entry Point */ - -typedef HRESULT (STDMAPIINITCALLTYPE XPPROVIDERINIT)( - HINSTANCE hInstance, - LPMALLOC lpMalloc, - LPALLOCATEBUFFER lpAllocateBuffer, - LPALLOCATEMORE lpAllocateMore, - LPFREEBUFFER lpFreeBuffer, - ULONG ulFlags, - ULONG ulMAPIVer, - ULONG FAR * lpulProviderVer, - LPXPPROVIDER FAR * lppXPProvider); - -XPPROVIDERINIT XPProviderInit; - -/********************************************************************/ -/* */ -/* MESSAGE STORE SPI */ -/* */ -/********************************************************************/ - -/* Flags and enums */ - -/* For Logon() */ - -/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ -/*#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h */ -/*#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h */ -/*#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h */ -/*#define MDB_TEMPORARY ((ULONG) 0x00000020) in mapidefs.h */ -/*#define MDB_NO_MAIL ((ULONG) 0x00000080) in mapidefs.h */ - -/* For SpoolerLogon() */ - -/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ -/*#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h */ -/*#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h */ -/*#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h */ - -/* GetCredentials, SetCredentials */ - -#define LOGON_SP_TRANSPORT ((ULONG) 0x00000001) -#define LOGON_SP_PROMPT ((ULONG) 0x00000002) -#define LOGON_SP_NEWPW ((ULONG) 0x00000004) -#define LOGON_CHANGED ((ULONG) 0x00000008) - -/* DoMCDialog */ - -#define DIALOG_FOLDER ((ULONG) 0x00000001) -#define DIALOG_MESSAGE ((ULONG) 0x00000002) -#define DIALOG_PROP ((ULONG) 0x00000004) -#define DIALOG_ATTACH ((ULONG) 0x00000008) - -#define DIALOG_MOVE ((ULONG) 0x00000010) -#define DIALOG_COPY ((ULONG) 0x00000020) -#define DIALOG_DELETE ((ULONG) 0x00000040) - -#define DIALOG_ALLOW_CANCEL ((ULONG) 0x00000080) -#define DIALOG_CONFIRM_CANCEL ((ULONG) 0x00000100) - -/* ExpandRecips */ - -#define NEEDS_PREPROCESSING ((ULONG) 0x00000001) -#define NEEDS_SPOOLER ((ULONG) 0x00000002) - -/* PrepareSubmit */ - -#define CHECK_SENDER ((ULONG) 0x00000001) -#define NON_STANDARD ((ULONG) 0x00010000) - - -DECLARE_MAPI_INTERFACE_PTR(IMSLogon, LPMSLOGON); -DECLARE_MAPI_INTERFACE_PTR(IMSProvider, LPMSPROVIDER); - -/* Message Store Provider Interface (IMSPROVIDER) */ - -#define MAPI_IMSPROVIDER_METHODS(IPURE) \ - MAPIMETHOD(Shutdown) \ - (THIS_ ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(Logon) \ - (THIS_ LPMAPISUP lpMAPISup, \ - ULONG_PTR ulUIParam, \ - LPTSTR lpszProfileName, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulFlags, \ - LPCIID lpInterface, \ - ULONG FAR * lpcbSpoolSecurity, \ - LPBYTE FAR * lppbSpoolSecurity, \ - LPMAPIERROR FAR * lppMAPIError, \ - LPMSLOGON FAR * lppMSLogon, \ - LPMDB FAR * lppMDB) IPURE; \ - MAPIMETHOD(SpoolerLogon) \ - (THIS_ LPMAPISUP lpMAPISup, \ - ULONG_PTR ulUIParam, \ - LPTSTR lpszProfileName, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulFlags, \ - LPCIID lpInterface, \ - ULONG cbSpoolSecurity, \ - LPBYTE lpbSpoolSecurity, \ - LPMAPIERROR FAR * lppMAPIError, \ - LPMSLOGON FAR * lppMSLogon, \ - LPMDB FAR * lppMDB) IPURE; \ - MAPIMETHOD(CompareStoreIDs) \ - (THIS_ ULONG cbEntryID1, \ - LPENTRYID lpEntryID1, \ - ULONG cbEntryID2, \ - LPENTRYID lpEntryID2, \ - ULONG ulFlags, \ - ULONG FAR * lpulResult) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMSProvider -DECLARE_MAPI_INTERFACE_(IMSProvider, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMSPROVIDER_METHODS(PURE) -}; - -/* The MSLOGON object is returned by the Logon() method of the - * MSPROVIDER interface. This object is for use by MAPIX.DLL. - */ -#define MAPI_IMSLOGON_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Logoff) \ - (THIS_ ULONG FAR * lpulFlags) IPURE; \ - MAPIMETHOD(OpenEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(CompareEntryIDs) \ - (THIS_ ULONG cbEntryID1, \ - LPENTRYID lpEntryID1, \ - ULONG cbEntryID2, \ - LPENTRYID lpEntryID2, \ - ULONG ulFlags, \ - ULONG FAR * lpulResult) IPURE; \ - MAPIMETHOD(Advise) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulEventMask, \ - LPMAPIADVISESINK lpAdviseSink, \ - ULONG_PTR FAR * lpulConnection) IPURE; \ - MAPIMETHOD(Unadvise) \ - (THIS_ ULONG_PTR ulConnection) IPURE; \ - MAPIMETHOD(OpenStatusEntry) \ - (THIS_ LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPVOID FAR * lppEntry) IPURE; \ - -#undef INTERFACE -#define INTERFACE IMSLogon -DECLARE_MAPI_INTERFACE_(IMSLogon, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMSLOGON_METHODS(PURE) -}; - -/* Message Store Provider Entry Point */ - -typedef HRESULT (STDMAPIINITCALLTYPE MSPROVIDERINIT)( - HINSTANCE hInstance, - LPMALLOC lpMalloc, /* AddRef() if you keep it */ - LPALLOCATEBUFFER lpAllocateBuffer, /* -> AllocateBuffer */ - LPALLOCATEMORE lpAllocateMore, /* -> AllocateMore */ - LPFREEBUFFER lpFreeBuffer, /* -> FreeBuffer */ - ULONG ulFlags, - ULONG ulMAPIVer, - ULONG FAR * lpulProviderVer, - LPMSPROVIDER FAR * lppMSProvider -); - -MSPROVIDERINIT MSProviderInit; - - -/********************************************************************/ -/* */ -/* MESSAGE SERVICE CONFIGURATION */ -/* */ -/********************************************************************/ - -/* Flags for service configuration entry point */ - -/* #define MAPI_UNICODE 0x80000000 */ -/* #define SERVICE_UI_ALWAYS 0x00000002 */ -/* #define SERVICE_UI_ALLOWED 0x00000010 */ -#define MSG_SERVICE_UI_READ_ONLY 0x00000008 /* display parameters only */ -#define SERVICE_LOGON_FAILED 0x00000020 /* reconfigure provider */ - -/* Contexts for service configuration entry point */ - -#define MSG_SERVICE_INSTALL 0x00000001 -#define MSG_SERVICE_CREATE 0x00000002 -#define MSG_SERVICE_CONFIGURE 0x00000003 -#define MSG_SERVICE_DELETE 0x00000004 -#define MSG_SERVICE_UNINSTALL 0x00000005 -#define MSG_SERVICE_PROVIDER_CREATE 0x00000006 -#define MSG_SERVICE_PROVIDER_DELETE 0x00000007 - -/* Prototype for service configuration entry point */ - -typedef HRESULT (STDAPICALLTYPE MSGSERVICEENTRY)( - HINSTANCE hInstance, - LPMALLOC lpMalloc, - LPMAPISUP lpMAPISup, - ULONG_PTR ulUIParam, - ULONG ulFlags, - ULONG ulContext, - ULONG cValues, - LPSPropValue lpProps, - LPPROVIDERADMIN lpProviderAdmin, - LPMAPIERROR FAR *lppMapiError -); -typedef MSGSERVICEENTRY FAR *LPMSGSERVICEENTRY; - - -#ifdef __cplusplus -} -#endif - -#endif /* MAPISPI_H */ - +/* + * M A P I S P I . H + * + * Defines the calls and structures exchanged between MAPI or the spooler + * and the MAPI service providers + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPISPI_H +#define MAPISPI_H +#if _MSC_VER > 1000 +#pragma once +#endif + +/* Include common MAPI header files if they haven't been already. */ +#ifndef MAPIDEFS_H +#include +#endif +#ifndef MAPICODE_H +#include +#endif +#ifndef MAPIGUID_H +#include +#endif +#ifndef MAPITAGS_H +#include +#endif + + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +#pragma warning(push) +#pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union + +#ifdef __cplusplus +extern "C" { +#endif + +/* The MAPI SPI has a version number. MAPIX.DLL knows and supports + * one or more versions of the SPI. Each provider supports one or + * more versions of the SPI. Checks are performed in both MAPIX.DLL + * and in the provider to ensure that they agree to use exactly one + * version of the MAPI SPI. + * + * The SPI version number is composed of a major (8-bit) version, + * minor (8-bit) version, and micro (16-bit) version. The first + * retail ship of MAPI 1.0 is expected to be version 1.0.0. + * The major version number changes rarely. + * The minor version number changes opon each retail ship of + * MAPI if the SPI has been modified. + * The micro version number changes internally at Microsoft + * during development of MAPI. + * + * The version of the SPI documented by this set of header files + * is ALWAYS known as "CURRENT_SPI_VERSION". If you write a + * service provider, and get a new set of header files, and update + * your code to the new interface, you'll be at the "current" version. + */ +#define CURRENT_SPI_VERSION 0x00010010L + +/* Here are some well-known SPI version numbers: + * (These will eventually be useful for provider-writers who + * might choose to make provider DLLs that support more than + * one version of the MAPI SPI. + */ +#define PDK1_SPI_VERSION 0x00010000L /* 0.1.0 MAPI PDK1 Spring 1993 */ + +#define PDK2_SPI_VERSION 0x00010008L /* 0.1.8 MAPI PDK2 Spring 1994 */ + +#define PDK3_SPI_VERSION 0x00010010L /* 0.1.16 MAPI PDK3 Fall 1994 */ + +/* + * Forward declaration of interface pointers specific to the service + * provider interface. + */ +DECLARE_MAPI_INTERFACE_PTR(IMAPISupport, LPMAPISUP); + +/* IMAPISupport Interface -------------------------------------------------- */ + +/* Notification key structure for the MAPI notification engine */ + +typedef struct +{ + ULONG cb; /* How big the key is */ + BYTE ab[MAPI_DIM]; /* Key contents */ +} NOTIFKEY, FAR * LPNOTIFKEY; + +#define CbNewNOTIFKEY(_cb) (offsetof(NOTIFKEY,ab) + (_cb)) +#define CbNOTIFKEY(_lpkey) (offsetof(NOTIFKEY,ab) + (_lpkey)->cb) +#define SizedNOTIFKEY(_cb, _name) \ + struct _NOTIFKEY_ ## _name \ +{ \ + ULONG cb; \ + BYTE ab[_cb]; \ +} _name + + +/* For Subscribe() */ + +#define NOTIFY_SYNC ((ULONG) 0x40000000) + +/* For Notify() */ + +#define NOTIFY_CANCELED ((ULONG) 0x80000000) + + +/* From the Notification Callback function (well, this is really a ulResult) */ + +#define CALLBACK_DISCONTINUE ((ULONG) 0x80000000) + +/* For Transport's SpoolerNotify() */ + +#define NOTIFY_NEWMAIL ((ULONG) 0x00000001) +#define NOTIFY_READYTOSEND ((ULONG) 0x00000002) +#define NOTIFY_SENTDEFERRED ((ULONG) 0x00000004) +#define NOTIFY_CRITSEC ((ULONG) 0x00001000) +#define NOTIFY_NONCRIT ((ULONG) 0x00002000) +#define NOTIFY_CONFIG_CHANGE ((ULONG) 0x00004000) +#define NOTIFY_CRITICAL_ERROR ((ULONG) 0x10000000) + +/* For Message Store's SpoolerNotify() */ + +#define NOTIFY_NEWMAIL_RECEIVED ((ULONG) 0x20000000) + +/* For ModifyStatusRow() */ + +#define STATUSROW_UPDATE ((ULONG) 0x10000000) + +/* For IStorageFromStream() */ + +#define STGSTRM_RESET ((ULONG) 0x00000000) +#define STGSTRM_CURRENT ((ULONG) 0x10000000) +#define STGSTRM_MODIFY ((ULONG) 0x00000002) +#define STGSTRM_CREATE ((ULONG) 0x00001000) + +/* For GetOneOffTable() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +/* For CreateOneOff() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ +/****** MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) */ + +/* For ReadReceipt() */ +#define MAPI_NON_READ ((ULONG) 0x00000001) + +/* For DoConfigPropSheet() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +/* Preprocessor calls: */ + +/* PreprocessMessage, first ordinal in RegisterPreprocessor(). */ + +typedef HRESULT (STDMETHODCALLTYPE PREPROCESSMESSAGE)( + LPVOID lpvSession, + LPMESSAGE lpMessage, + LPADRBOOK lpAdrBook, + LPMAPIFOLDER lpFolder, + LPALLOCATEBUFFER AllocateBuffer, + LPALLOCATEMORE AllocateMore, + LPFREEBUFFER FreeBuffer, + ULONG FAR *lpcOutbound, + LPMESSAGE FAR * FAR *lpppMessage, + LPADRLIST FAR *lppRecipList); + +/* RemovePreprocessInfo, second ordinal in RegisterPreprocessor(). */ + +typedef HRESULT (STDMETHODCALLTYPE REMOVEPREPROCESSINFO)(LPMESSAGE lpMessage); + +/* Function pointer for GetReleaseInfo */ + +#define MAPI_IMAPISUPPORT_METHODS1(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetMemAllocRoutines) \ + (THIS_ LPALLOCATEBUFFER FAR * lpAllocateBuffer, \ + LPALLOCATEMORE FAR * lpAllocateMore, \ + LPFREEBUFFER FAR * lpFreeBuffer) IPURE; \ + MAPIMETHOD(Subscribe) \ + (THIS_ LPNOTIFKEY lpKey, \ + ULONG ulEventMask, \ + ULONG ulFlags, \ + LPMAPIADVISESINK lpAdviseSink, \ + ULONG_PTR FAR * lpulConnection) IPURE; \ + MAPIMETHOD(Unsubscribe) \ + (THIS_ ULONG_PTR ulConnection) IPURE; \ + MAPIMETHOD(Notify) \ + (THIS_ LPNOTIFKEY lpKey, \ + ULONG cNotification, \ + LPNOTIFICATION lpNotifications, \ + ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(ModifyStatusRow) \ + (THIS_ ULONG cValues, \ + LPSPropValue lpColumnVals, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(OpenProfileSection) \ + (THIS_ LPMAPIUID lpUid, \ + ULONG ulFlags, \ + LPPROFSECT FAR * lppProfileObj) IPURE; \ + MAPIMETHOD(RegisterPreprocessor) \ + (THIS_ LPMAPIUID lpMuid, \ + LPTSTR lpszAdrType, \ + LPTSTR lpszDLLName, \ + LPSTR /* String8! */ lpszPreprocess, \ + LPSTR /* String8! */ lpszRemovePreprocessInfo, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(NewUID) \ + (THIS_ LPMAPIUID lpMuid) IPURE; \ + MAPIMETHOD(MakeInvalid) \ + (THIS_ ULONG ulFlags, \ + LPVOID lpObject, \ + ULONG ulRefCount, \ + ULONG cMethods) IPURE; \ + +#define MAPI_IMAPISUPPORT_METHODS2(IPURE) \ + MAPIMETHOD(SpoolerYield) \ + (THIS_ ULONG ulFlags) IPURE; \ + MAPIMETHOD(SpoolerNotify) \ + (THIS_ ULONG ulFlags, \ + LPVOID lpvData) IPURE; \ + MAPIMETHOD(CreateOneOff) \ + (THIS_ LPTSTR lpszName, \ + LPTSTR lpszAdrType, \ + LPTSTR lpszAddress, \ + ULONG ulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(SetProviderUID) \ + (THIS_ LPMAPIUID lpProviderID, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(CompareEntryIDs) \ + (THIS_ ULONG cbEntry1, \ + LPENTRYID lpEntry1, \ + ULONG cbEntry2, \ + LPENTRYID lpEntry2, \ + ULONG ulCompareFlags, \ + ULONG FAR * lpulResult) IPURE; \ + MAPIMETHOD(OpenTemplateID) \ + (THIS_ ULONG cbTemplateID, \ + LPENTRYID lpTemplateID, \ + ULONG ulTemplateFlags, \ + LPMAPIPROP lpMAPIPropData, \ + LPCIID lpInterface, \ + LPMAPIPROP FAR * lppMAPIPropNew, \ + LPMAPIPROP lpMAPIPropSibling) IPURE; \ + MAPIMETHOD(OpenEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulOpenFlags, \ + ULONG FAR * lpulObjType, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(GetOneOffTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(Address) \ + (THIS_ ULONG_PTR FAR * lpulUIParam, \ + LPADRPARM lpAdrParms, \ + LPADRLIST FAR * lppAdrList) IPURE; \ + MAPIMETHOD(Details) \ + (THIS_ ULONG_PTR FAR * lpulUIParam, \ + LPFNDISMISS lpfnDismiss, \ + LPVOID lpvDismissContext, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPFNBUTTON lpfButtonCallback, \ + LPVOID lpvButtonContext, \ + LPTSTR lpszButtonText, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(NewEntry) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + ULONG cbEIDContainer, \ + LPENTRYID lpEIDContainer, \ + ULONG cbEIDNewEntryTpl, \ + LPENTRYID lpEIDNewEntryTpl, \ + ULONG FAR * lpcbEIDNewEntry, \ + LPENTRYID FAR * lppEIDNewEntry) IPURE; \ + MAPIMETHOD(DoConfigPropsheet) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + LPTSTR lpszTitle, \ + LPMAPITABLE lpDisplayTable, \ + LPMAPIPROP lpCOnfigData, \ + ULONG ulTopPage) IPURE; \ + MAPIMETHOD(CopyMessages) \ + (THIS_ LPCIID lpSrcInterface, \ + LPVOID lpSrcFolder, \ + LPENTRYLIST lpMsgList, \ + LPCIID lpDestInterface, \ + LPVOID lpDestFolder, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(CopyFolder) \ + (THIS_ LPCIID lpSrcInterface, \ + LPVOID lpSrcFolder, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpDestInterface, \ + LPVOID lpDestFolder, \ + LPTSTR lszNewFolderName, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + ULONG ulFlags) IPURE; \ + +#define MAPI_IMAPISUPPORT_METHODS3(IPURE) \ + MAPIMETHOD(DoCopyTo) \ + (THIS_ LPCIID lpSrcInterface, \ + LPVOID lpSrcObj, \ + ULONG ciidExclude, \ + LPCIID rgiidExclude, \ + LPSPropTagArray lpExcludeProps, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + LPCIID lpDestInterface, \ + LPVOID lpDestObj, \ + ULONG ulFlags, \ + LPSPropProblemArray FAR * lppProblems) IPURE; \ + MAPIMETHOD(DoCopyProps) \ + (THIS_ LPCIID lpSrcInterface, \ + LPVOID lpSrcObj, \ + LPSPropTagArray lpIncludeProps, \ + ULONG_PTR ulUIParam, \ + LPMAPIPROGRESS lpProgress, \ + LPCIID lpDestInterface, \ + LPVOID lpDestObj, \ + ULONG ulFlags, \ + LPSPropProblemArray FAR * lppProblems) IPURE; \ + MAPIMETHOD(DoProgressDialog) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + LPMAPIPROGRESS FAR * lppProgress) IPURE; \ + MAPIMETHOD(ReadReceipt) \ + (THIS_ ULONG ulFlags, \ + LPMESSAGE lpReadMessage, \ + LPMESSAGE FAR * lppEmptyMessage) IPURE; \ + MAPIMETHOD(PrepareSubmit) \ + (THIS_ LPMESSAGE lpMessage, \ + ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(ExpandRecips) \ + (THIS_ LPMESSAGE lpMessage, \ + ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(UpdatePAB) \ + (THIS_ ULONG ulFlags, \ + LPMESSAGE lpMessage) IPURE; \ + MAPIMETHOD(DoSentMail) \ + (THIS_ ULONG ulFlags, \ + LPMESSAGE lpMessage) IPURE; \ + MAPIMETHOD(OpenAddressBook) \ + (THIS_ LPCIID lpInterface, \ + ULONG ulFlags, \ + LPADRBOOK FAR * lppAdrBook) IPURE; \ + MAPIMETHOD(Preprocess) \ + (THIS_ ULONG ulFlags, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID) IPURE; \ + MAPIMETHOD(CompleteMsg) \ + (THIS_ ULONG ulFlags, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID) IPURE; \ + MAPIMETHOD(StoreLogoffTransports) \ + (THIS_ ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(StatusRecips) \ + (THIS_ LPMESSAGE lpMessage, \ + LPADRLIST lpRecipList) IPURE; \ + MAPIMETHOD(WrapStoreEntryID) \ + (THIS_ ULONG cbOrigEntry, \ + LPENTRYID lpOrigEntry, \ + ULONG FAR * lpcbWrappedEntry, \ + LPENTRYID FAR * lppWrappedEntry) IPURE; \ + MAPIMETHOD(ModifyProfile) \ + (THIS_ ULONG ulFlags) IPURE; \ + MAPIMETHOD(IStorageFromStream) \ + (THIS_ LPUNKNOWN lpUnkIn, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPSTORAGE FAR * lppStorageOut) IPURE; \ + MAPIMETHOD(GetSvcConfigSupportObj) \ + (THIS_ ULONG ulFlags, \ + LPMAPISUP FAR * lppSvcSupport) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMAPISupport +DECLARE_MAPI_INTERFACE_(IMAPISupport, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPISUPPORT_METHODS1(PURE) + MAPI_IMAPISUPPORT_METHODS2(PURE) + MAPI_IMAPISUPPORT_METHODS3(PURE) +}; + + +/********************************************************************/ +/* */ +/* ADDRESS BOOK SPI */ +/* */ +/********************************************************************/ + +/* Address Book Provider ------------------------------------------------- */ + +/* OpenTemplateID() */ +#define FILL_ENTRY ((ULONG) 0x00000001) + +/* For Logon() */ + +/*#define AB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h */ +/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ + + + +DECLARE_MAPI_INTERFACE_PTR(IABProvider, LPABPROVIDER); +DECLARE_MAPI_INTERFACE_PTR(IABLogon, LPABLOGON); + +#define MAPI_IABPROVIDER_METHODS(IPURE) \ + MAPIMETHOD(Shutdown) \ + (THIS_ ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(Logon) \ + (THIS_ LPMAPISUP lpMAPISup, \ + ULONG_PTR ulUIParam, \ + LPTSTR lpszProfileName, \ + ULONG ulFlags, \ + ULONG FAR * lpulpcbSecurity, \ + LPBYTE FAR * lppbSecurity, \ + LPMAPIERROR FAR * lppMAPIError, \ + LPABLOGON FAR * lppABLogon) IPURE; \ + +#undef INTERFACE +#define INTERFACE IABProvider +DECLARE_MAPI_INTERFACE_(IABProvider, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IABPROVIDER_METHODS(PURE) +}; + +/* For GetOneOffTable() */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +#define MAPI_IABLOGON_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Logoff) \ + (THIS_ ULONG ulFlags) IPURE; \ + MAPIMETHOD(OpenEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(CompareEntryIDs) \ + (THIS_ ULONG cbEntryID1, \ + LPENTRYID lpEntryID1, \ + ULONG cbEntryID2, \ + LPENTRYID lpEntryID2, \ + ULONG ulFlags, \ + ULONG FAR * lpulResult) IPURE; \ + MAPIMETHOD(Advise) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulEventMask, \ + LPMAPIADVISESINK lpAdviseSink, \ + ULONG_PTR FAR * lpulConnection) IPURE; \ + MAPIMETHOD(Unadvise) \ + (THIS_ ULONG_PTR ulConnection) IPURE; \ + MAPIMETHOD(OpenStatusEntry) \ + (THIS_ LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPMAPISTATUS FAR * lppEntry) IPURE; \ + MAPIMETHOD(OpenTemplateID) \ + (THIS_ ULONG cbTemplateID, \ + LPENTRYID lpTemplateID, \ + ULONG ulTemplateFlags, \ + LPMAPIPROP lpMAPIPropData, \ + LPCIID lpInterface, \ + LPMAPIPROP FAR * lppMAPIPropNew, \ + LPMAPIPROP lpMAPIPropSibling) IPURE; \ + MAPIMETHOD(GetOneOffTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(PrepareRecips) \ + (THIS_ ULONG ulFlags, \ + LPSPropTagArray lpPropTagArray, \ + LPADRLIST lpRecipList) IPURE; \ + +#undef INTERFACE +#define INTERFACE IABLogon +DECLARE_MAPI_INTERFACE_(IABLogon, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IABLOGON_METHODS(PURE) +}; + +typedef HRESULT (STDMAPIINITCALLTYPE ABPROVIDERINIT)( + HINSTANCE hInstance, + LPMALLOC lpMalloc, + LPALLOCATEBUFFER lpAllocateBuffer, + LPALLOCATEMORE lpAllocateMore, + LPFREEBUFFER lpFreeBuffer, + ULONG ulFlags, + ULONG ulMAPIVer, + ULONG FAR * lpulProviderVer, + LPABPROVIDER FAR * lppABProvider +); + +ABPROVIDERINIT ABProviderInit; + + + +/********************************************************************/ +/* */ +/* TRANSPORT SPI */ +/* */ +/********************************************************************/ + +/* For DeinitTransport */ + +#define DEINIT_NORMAL ((ULONG) 0x00000001) +#define DEINIT_HURRY ((ULONG) 0x80000000) + +/* For TransportLogon */ + +/* Flags that the Spooler may pass to the transport: */ + +#define LOGON_NO_DIALOG ((ULONG) 0x00000001) +#define LOGON_NO_CONNECT ((ULONG) 0x00000004) +#define LOGON_NO_INBOUND ((ULONG) 0x00000008) +#define LOGON_NO_OUTBOUND ((ULONG) 0x00000010) +/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ + +/* Flags that the transport may pass to the Spooler: */ + +#define LOGON_SP_IDLE ((ULONG) 0x00010000) +#define LOGON_SP_POLL ((ULONG) 0x00020000) +#define LOGON_SP_RESOLVE ((ULONG) 0x00040000) + + +DECLARE_MAPI_INTERFACE_PTR(IXPProvider, LPXPPROVIDER); +DECLARE_MAPI_INTERFACE_PTR(IXPLogon, LPXPLOGON); + +#define MAPI_IXPPROVIDER_METHODS(IPURE) \ + MAPIMETHOD(Shutdown) \ + (THIS_ ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(TransportLogon) \ + (THIS_ LPMAPISUP lpMAPISup, \ + ULONG_PTR ulUIParam, \ + __in LPTSTR lpszProfileName, \ + ULONG FAR * lpulFlags, \ + LPMAPIERROR FAR * lppMAPIError, \ + LPXPLOGON FAR * lppXPLogon) IPURE; \ + +#undef INTERFACE +#define INTERFACE IXPProvider +DECLARE_MAPI_INTERFACE_(IXPProvider, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IXPPROVIDER_METHODS(PURE) +}; + +/* OptionData returned from call to RegisterOptions */ + +#define OPTION_TYPE_RECIPIENT ((ULONG) 0x00000001) +#define OPTION_TYPE_MESSAGE ((ULONG) 0x00000002) + +typedef struct _OPTIONDATA +{ + ULONG ulFlags; /* MAPI_RECIPIENT, MAPI_MESSAGE */ + LPGUID lpRecipGUID; /* Same as returned by AddressTypes() */ + LPTSTR lpszAdrType; /* Same as returned by AddressTypes() */ + LPTSTR lpszDLLName; /* Options DLL */ + ULONG ulOrdinal; /* Ordinal in that DLL */ + ULONG cbOptionsData; /* Count of bytes in lpbOptionsData */ + LPBYTE lpbOptionsData; /* Providers per [recip|message] option data */ + ULONG cOptionsProps; /* Count of Options default prop values */ + LPSPropValue lpOptionsProps; /* Default Options property values */ +} OPTIONDATA, FAR *LPOPTIONDATA; + +typedef SCODE (STDMAPIINITCALLTYPE OPTIONCALLBACK)( + HINSTANCE hInst, + LPMALLOC lpMalloc, + ULONG ulFlags, + ULONG cbOptionData, + LPBYTE lpbOptionData, + LPMAPISUP lpMAPISup, + LPMAPIPROP lpDataSource, + LPMAPIPROP FAR * lppWrappedSource, + LPMAPIERROR FAR * lppMAPIError); + +/* For XP_AddressTypes */ + +/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ + +/* For XP_RegisterRecipOptions */ + +/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ + +/* For XP_RegisterMessageOptions */ + +/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ + +/* For TransportNotify */ + +#define NOTIFY_ABORT_DEFERRED ((ULONG) 0x40000000) +#define NOTIFY_CANCEL_MESSAGE ((ULONG) 0x80000000) +#define NOTIFY_BEGIN_INBOUND ((ULONG) 0x00000001) +#define NOTIFY_END_INBOUND ((ULONG) 0x00010000) +#define NOTIFY_BEGIN_OUTBOUND ((ULONG) 0x00000002) +#define NOTIFY_END_OUTBOUND ((ULONG) 0x00020000) +#define NOTIFY_BEGIN_INBOUND_FLUSH ((ULONG) 0x00000004) +#define NOTIFY_END_INBOUND_FLUSH ((ULONG) 0x00040000) +#define NOTIFY_BEGIN_OUTBOUND_FLUSH ((ULONG) 0x00000008) +#define NOTIFY_END_OUTBOUND_FLUSH ((ULONG) 0x00080000) + +/* For TransportLogoff */ + +#define LOGOFF_NORMAL ((ULONG) 0x00000001) +#define LOGOFF_HURRY ((ULONG) 0x80000000) + +/* For SubmitMessage */ + +#define BEGIN_DEFERRED ((ULONG) 0x00000001) + +/* For EndMessage */ + +/* Flags that the Spooler may pass to the Transport: */ + +/* Flags that the transport may pass to the Spooler: */ + +#define END_RESEND_NOW ((ULONG) 0x00010000) +#define END_RESEND_LATER ((ULONG) 0x00020000) +#define END_DONT_RESEND ((ULONG) 0x00040000) + +#define MAPI_IXPLOGON_METHODS(IPURE) \ + MAPIMETHOD(AddressTypes) \ + (THIS_ ULONG FAR * lpulFlags, \ + ULONG FAR * lpcAdrType, \ + __deref_out_ecount_full(*lpcAdrType) LPTSTR FAR * FAR * lpppAdrTypeArray, \ + ULONG FAR * lpcMAPIUID, \ + LPMAPIUID FAR * FAR * lpppUIDArray) IPURE; \ + MAPIMETHOD(RegisterOptions) \ + (THIS_ ULONG FAR * lpulFlags, \ + ULONG FAR * lpcOptions, \ + LPOPTIONDATA FAR * lppOptions) IPURE; \ + MAPIMETHOD(TransportNotify) \ + (THIS_ ULONG FAR * lpulFlags, \ + LPVOID FAR * lppvData) IPURE; \ + MAPIMETHOD(Idle) \ + (THIS_ ULONG ulFlags) IPURE; \ + MAPIMETHOD(TransportLogoff) \ + (THIS_ ULONG ulFlags) IPURE; \ + MAPIMETHOD(SubmitMessage) \ + (THIS_ ULONG ulFlags, \ + LPMESSAGE lpMessage, \ + ULONG_PTR FAR * lpulMsgRef, \ + ULONG_PTR FAR * lpulReturnParm) IPURE; \ + MAPIMETHOD(EndMessage) \ + (THIS_ ULONG_PTR ulMsgRef, \ + ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(Poll) \ + (THIS_ ULONG FAR * lpulIncoming) IPURE; \ + MAPIMETHOD(StartMessage) \ + (THIS_ ULONG ulFlags, \ + LPMESSAGE lpMessage, \ + ULONG_PTR FAR * lpulMsgRef) IPURE; \ + MAPIMETHOD(OpenStatusEntry) \ + (THIS_ LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPMAPISTATUS FAR * lppEntry) IPURE; \ + MAPIMETHOD(ValidateState) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(FlushQueues) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG cbTargetTransport, \ + LPENTRYID lpTargetTransport, \ + ULONG ulFlags) IPURE; \ + +#undef INTERFACE +#define INTERFACE IXPLogon +DECLARE_MAPI_INTERFACE_(IXPLogon, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IXPLOGON_METHODS(PURE) +}; + + +/* Transport Provider Entry Point */ + +typedef HRESULT (STDMAPIINITCALLTYPE XPPROVIDERINIT)( + HINSTANCE hInstance, + LPMALLOC lpMalloc, + LPALLOCATEBUFFER lpAllocateBuffer, + LPALLOCATEMORE lpAllocateMore, + LPFREEBUFFER lpFreeBuffer, + ULONG ulFlags, + ULONG ulMAPIVer, + ULONG FAR * lpulProviderVer, + LPXPPROVIDER FAR * lppXPProvider); + +XPPROVIDERINIT XPProviderInit; + +/********************************************************************/ +/* */ +/* MESSAGE STORE SPI */ +/* */ +/********************************************************************/ + +/* Flags and enums */ + +/* For Logon() */ + +/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ +/*#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h */ +/*#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h */ +/*#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h */ +/*#define MDB_TEMPORARY ((ULONG) 0x00000020) in mapidefs.h */ +/*#define MDB_NO_MAIL ((ULONG) 0x00000080) in mapidefs.h */ + +/* For SpoolerLogon() */ + +/*#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h */ +/*#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h */ +/*#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h */ +/*#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h */ + +/* GetCredentials, SetCredentials */ + +#define LOGON_SP_TRANSPORT ((ULONG) 0x00000001) +#define LOGON_SP_PROMPT ((ULONG) 0x00000002) +#define LOGON_SP_NEWPW ((ULONG) 0x00000004) +#define LOGON_CHANGED ((ULONG) 0x00000008) + +/* DoMCDialog */ + +#define DIALOG_FOLDER ((ULONG) 0x00000001) +#define DIALOG_MESSAGE ((ULONG) 0x00000002) +#define DIALOG_PROP ((ULONG) 0x00000004) +#define DIALOG_ATTACH ((ULONG) 0x00000008) + +#define DIALOG_MOVE ((ULONG) 0x00000010) +#define DIALOG_COPY ((ULONG) 0x00000020) +#define DIALOG_DELETE ((ULONG) 0x00000040) + +#define DIALOG_ALLOW_CANCEL ((ULONG) 0x00000080) +#define DIALOG_CONFIRM_CANCEL ((ULONG) 0x00000100) + +/* ExpandRecips */ + +#define NEEDS_PREPROCESSING ((ULONG) 0x00000001) +#define NEEDS_SPOOLER ((ULONG) 0x00000002) + +/* PrepareSubmit */ + +#define CHECK_SENDER ((ULONG) 0x00000001) +#define NON_STANDARD ((ULONG) 0x00010000) + + +DECLARE_MAPI_INTERFACE_PTR(IMSLogon, LPMSLOGON); +DECLARE_MAPI_INTERFACE_PTR(IMSProvider, LPMSPROVIDER); + +/* Message Store Provider Interface (IMSPROVIDER) */ + +#define MAPI_IMSPROVIDER_METHODS(IPURE) \ + MAPIMETHOD(Shutdown) \ + (THIS_ ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(Logon) \ + (THIS_ LPMAPISUP lpMAPISup, \ + ULONG_PTR ulUIParam, \ + LPTSTR lpszProfileName, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulFlags, \ + LPCIID lpInterface, \ + ULONG FAR * lpcbSpoolSecurity, \ + LPBYTE FAR * lppbSpoolSecurity, \ + LPMAPIERROR FAR * lppMAPIError, \ + LPMSLOGON FAR * lppMSLogon, \ + LPMDB FAR * lppMDB) IPURE; \ + MAPIMETHOD(SpoolerLogon) \ + (THIS_ LPMAPISUP lpMAPISup, \ + ULONG_PTR ulUIParam, \ + LPTSTR lpszProfileName, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulFlags, \ + LPCIID lpInterface, \ + ULONG cbSpoolSecurity, \ + LPBYTE lpbSpoolSecurity, \ + LPMAPIERROR FAR * lppMAPIError, \ + LPMSLOGON FAR * lppMSLogon, \ + LPMDB FAR * lppMDB) IPURE; \ + MAPIMETHOD(CompareStoreIDs) \ + (THIS_ ULONG cbEntryID1, \ + LPENTRYID lpEntryID1, \ + ULONG cbEntryID2, \ + LPENTRYID lpEntryID2, \ + ULONG ulFlags, \ + ULONG FAR * lpulResult) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMSProvider +DECLARE_MAPI_INTERFACE_(IMSProvider, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMSPROVIDER_METHODS(PURE) +}; + +/* The MSLOGON object is returned by the Logon() method of the + * MSPROVIDER interface. This object is for use by MAPIX.DLL. + */ +#define MAPI_IMSLOGON_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Logoff) \ + (THIS_ ULONG FAR * lpulFlags) IPURE; \ + MAPIMETHOD(OpenEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(CompareEntryIDs) \ + (THIS_ ULONG cbEntryID1, \ + LPENTRYID lpEntryID1, \ + ULONG cbEntryID2, \ + LPENTRYID lpEntryID2, \ + ULONG ulFlags, \ + ULONG FAR * lpulResult) IPURE; \ + MAPIMETHOD(Advise) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulEventMask, \ + LPMAPIADVISESINK lpAdviseSink, \ + ULONG_PTR FAR * lpulConnection) IPURE; \ + MAPIMETHOD(Unadvise) \ + (THIS_ ULONG_PTR ulConnection) IPURE; \ + MAPIMETHOD(OpenStatusEntry) \ + (THIS_ LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPVOID FAR * lppEntry) IPURE; \ + +#undef INTERFACE +#define INTERFACE IMSLogon +DECLARE_MAPI_INTERFACE_(IMSLogon, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMSLOGON_METHODS(PURE) +}; + +/* Message Store Provider Entry Point */ + +typedef HRESULT (STDMAPIINITCALLTYPE MSPROVIDERINIT)( + HINSTANCE hInstance, + LPMALLOC lpMalloc, /* AddRef() if you keep it */ + LPALLOCATEBUFFER lpAllocateBuffer, /* -> AllocateBuffer */ + LPALLOCATEMORE lpAllocateMore, /* -> AllocateMore */ + LPFREEBUFFER lpFreeBuffer, /* -> FreeBuffer */ + ULONG ulFlags, + ULONG ulMAPIVer, + ULONG FAR * lpulProviderVer, + LPMSPROVIDER FAR * lppMSProvider +); + +MSPROVIDERINIT MSProviderInit; + + +/********************************************************************/ +/* */ +/* MESSAGE SERVICE CONFIGURATION */ +/* */ +/********************************************************************/ + +/* Flags for service configuration entry point */ + +/* #define MAPI_UNICODE 0x80000000 */ +/* #define SERVICE_UI_ALWAYS 0x00000002 */ +/* #define SERVICE_UI_ALLOWED 0x00000010 */ +#define MSG_SERVICE_UI_READ_ONLY 0x00000008 /* display parameters only */ +#define SERVICE_LOGON_FAILED 0x00000020 /* reconfigure provider */ + +/* Contexts for service configuration entry point */ + +#define MSG_SERVICE_INSTALL 0x00000001 +#define MSG_SERVICE_CREATE 0x00000002 +#define MSG_SERVICE_CONFIGURE 0x00000003 +#define MSG_SERVICE_DELETE 0x00000004 +#define MSG_SERVICE_UNINSTALL 0x00000005 +#define MSG_SERVICE_PROVIDER_CREATE 0x00000006 +#define MSG_SERVICE_PROVIDER_DELETE 0x00000007 + +/* Prototype for service configuration entry point */ + +typedef HRESULT (STDAPICALLTYPE MSGSERVICEENTRY)( + HINSTANCE hInstance, + LPMALLOC lpMalloc, + LPMAPISUP lpMAPISup, + ULONG_PTR ulUIParam, + ULONG ulFlags, + ULONG ulContext, + ULONG cValues, + LPSPropValue lpProps, + LPPROVIDERADMIN lpProviderAdmin, + LPMAPIERROR FAR *lppMapiError +); +typedef MSGSERVICEENTRY FAR *LPMSGSERVICEENTRY; + + +#ifdef __cplusplus +} +#endif + +#pragma warning(pop) + +#endif /* MAPISPI_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPITags.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPITags.h similarity index 96% rename from com/win32comext/mapi/src/mapi_headers/MAPITags.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPITags.h index 2ab0829b2..594b55728 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPITags.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPITags.h @@ -1,1037 +1,1072 @@ -/* - * M A P I T A G S . H - * - * Property tag definitions for standard properties of MAPI - * objects. - * - * The following ranges should be used for all property IDs. Note that - * property IDs for objects other than messages and recipients should - * all fall in the range 0x3000 to 0x3FFF: - * - * From To Kind of property - * -------------------------------- - * 0001 0BFF MAPI_defined envelope property - * 0C00 0DFF MAPI_defined per-recipient property - * 0E00 0FFF MAPI_defined non-transmittable property - * 1000 2FFF MAPI_defined message content property - * - * 3000 3FFF MAPI_defined property (usually not message or recipient) - * - * 4000 57FF Transport-defined envelope property - * 5800 5FFF Transport-defined per-recipient property - * 6000 65FF User-defined non-transmittable property - * 6600 67FF Provider-defined internal non-transmittable property - * 6800 7BFF Message class-defined content property - * 7C00 7FFF Message class-defined non-transmittable - * property - * - * 8000 FFFE User-defined Name-to-id mapped property - * - * The 3000-3FFF range is further subdivided as follows: - * - * From To Kind of property - * -------------------------------- - * 3000 33FF Common property such as display name, entry ID - * 3400 35FF Message store object - * 3600 36FF Folder or AB container - * 3700 38FF Attachment - * 3900 39FF Address book object - * 3A00 3BFF Mail user - * 3C00 3CFF Distribution list - * 3D00 3DFF Profile section - * 3E00 3FFF Status object - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef MAPITAGS_H -#define MAPITAGS_H - -#if _MSC_VER > 1000 -#pragma once -#endif - -/* Determine if a property is transmittable. */ - -#define FIsTransmittable(ulPropTag) \ - ((PROP_ID (ulPropTag) < (ULONG)0x0E00) || \ - (PROP_ID (ulPropTag) >= (ULONG)0x8000) || \ - ((PROP_ID (ulPropTag) >= (ULONG)0x1000) && (PROP_ID (ulPropTag) < (ULONG)0x6000)) || \ - ((PROP_ID (ulPropTag) >= (ULONG)0x6800) && (PROP_ID (ulPropTag) < (ULONG)0x7C00))) - -/* - * Message envelope properties - */ - -#define PR_ACKNOWLEDGEMENT_MODE PROP_TAG( PT_LONG, 0x0001) -#define PR_ALTERNATE_RECIPIENT_ALLOWED PROP_TAG( PT_BOOLEAN, 0x0002) -#define PR_AUTHORIZING_USERS PROP_TAG( PT_BINARY, 0x0003) -#define PR_AUTO_FORWARD_COMMENT PROP_TAG( PT_TSTRING, 0x0004) -#define PR_AUTO_FORWARD_COMMENT_W PROP_TAG( PT_UNICODE, 0x0004) -#define PR_AUTO_FORWARD_COMMENT_A PROP_TAG( PT_STRING8, 0x0004) -#define PR_AUTO_FORWARDED PROP_TAG( PT_BOOLEAN, 0x0005) -#define PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID PROP_TAG( PT_BINARY, 0x0006) -#define PR_CONTENT_CORRELATOR PROP_TAG( PT_BINARY, 0x0007) -#define PR_CONTENT_IDENTIFIER PROP_TAG( PT_TSTRING, 0x0008) -#define PR_CONTENT_IDENTIFIER_W PROP_TAG( PT_UNICODE, 0x0008) -#define PR_CONTENT_IDENTIFIER_A PROP_TAG( PT_STRING8, 0x0008) -#define PR_CONTENT_LENGTH PROP_TAG( PT_LONG, 0x0009) -#define PR_CONTENT_RETURN_REQUESTED PROP_TAG( PT_BOOLEAN, 0x000A) - - - -#define PR_CONVERSATION_KEY PROP_TAG( PT_BINARY, 0x000B) - -#define PR_CONVERSION_EITS PROP_TAG( PT_BINARY, 0x000C) -#define PR_CONVERSION_WITH_LOSS_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x000D) -#define PR_CONVERTED_EITS PROP_TAG( PT_BINARY, 0x000E) -#define PR_DEFERRED_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x000F) -#define PR_DELIVER_TIME PROP_TAG( PT_SYSTIME, 0x0010) -#define PR_DISCARD_REASON PROP_TAG( PT_LONG, 0x0011) -#define PR_DISCLOSURE_OF_RECIPIENTS PROP_TAG( PT_BOOLEAN, 0x0012) -#define PR_DL_EXPANSION_HISTORY PROP_TAG( PT_BINARY, 0x0013) -#define PR_DL_EXPANSION_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x0014) -#define PR_EXPIRY_TIME PROP_TAG( PT_SYSTIME, 0x0015) -#define PR_IMPLICIT_CONVERSION_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x0016) -#define PR_IMPORTANCE PROP_TAG( PT_LONG, 0x0017) -#define PR_IPM_ID PROP_TAG( PT_BINARY, 0x0018) -#define PR_LATEST_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x0019) -#define PR_MESSAGE_CLASS PROP_TAG( PT_TSTRING, 0x001A) -#define PR_MESSAGE_CLASS_W PROP_TAG( PT_UNICODE, 0x001A) -#define PR_MESSAGE_CLASS_A PROP_TAG( PT_STRING8, 0x001A) -#define PR_MESSAGE_DELIVERY_ID PROP_TAG( PT_BINARY, 0x001B) - - - - - -#define PR_MESSAGE_SECURITY_LABEL PROP_TAG( PT_BINARY, 0x001E) -#define PR_OBSOLETED_IPMS PROP_TAG( PT_BINARY, 0x001F) -#define PR_ORIGINALLY_INTENDED_RECIPIENT_NAME PROP_TAG( PT_BINARY, 0x0020) -#define PR_ORIGINAL_EITS PROP_TAG( PT_BINARY, 0x0021) -#define PR_ORIGINATOR_CERTIFICATE PROP_TAG( PT_BINARY, 0x0022) -#define PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0023) -#define PR_ORIGINATOR_RETURN_ADDRESS PROP_TAG( PT_BINARY, 0x0024) - - - -#define PR_PARENT_KEY PROP_TAG( PT_BINARY, 0x0025) -#define PR_PRIORITY PROP_TAG( PT_LONG, 0x0026) - - - -#define PR_ORIGIN_CHECK PROP_TAG( PT_BINARY, 0x0027) -#define PR_PROOF_OF_SUBMISSION_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0028) -#define PR_READ_RECEIPT_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0029) -#define PR_RECEIPT_TIME PROP_TAG( PT_SYSTIME, 0x002A) -#define PR_RECIPIENT_REASSIGNMENT_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x002B) -#define PR_REDIRECTION_HISTORY PROP_TAG( PT_BINARY, 0x002C) -#define PR_RELATED_IPMS PROP_TAG( PT_BINARY, 0x002D) -#define PR_ORIGINAL_SENSITIVITY PROP_TAG( PT_LONG, 0x002E) -#define PR_LANGUAGES PROP_TAG( PT_TSTRING, 0x002F) -#define PR_LANGUAGES_W PROP_TAG( PT_UNICODE, 0x002F) -#define PR_LANGUAGES_A PROP_TAG( PT_STRING8, 0x002F) -#define PR_REPLY_TIME PROP_TAG( PT_SYSTIME, 0x0030) -#define PR_REPORT_TAG PROP_TAG( PT_BINARY, 0x0031) -#define PR_REPORT_TIME PROP_TAG( PT_SYSTIME, 0x0032) -#define PR_RETURNED_IPM PROP_TAG( PT_BOOLEAN, 0x0033) -#define PR_SECURITY PROP_TAG( PT_LONG, 0x0034) -#define PR_INCOMPLETE_COPY PROP_TAG( PT_BOOLEAN, 0x0035) -#define PR_SENSITIVITY PROP_TAG( PT_LONG, 0x0036) -#define PR_SUBJECT PROP_TAG( PT_TSTRING, 0x0037) -#define PR_SUBJECT_W PROP_TAG( PT_UNICODE, 0x0037) -#define PR_SUBJECT_A PROP_TAG( PT_STRING8, 0x0037) -#define PR_SUBJECT_IPM PROP_TAG( PT_BINARY, 0x0038) -#define PR_CLIENT_SUBMIT_TIME PROP_TAG( PT_SYSTIME, 0x0039) -#define PR_REPORT_NAME PROP_TAG( PT_TSTRING, 0x003A) -#define PR_REPORT_NAME_W PROP_TAG( PT_UNICODE, 0x003A) -#define PR_REPORT_NAME_A PROP_TAG( PT_STRING8, 0x003A) -#define PR_SENT_REPRESENTING_SEARCH_KEY PROP_TAG( PT_BINARY, 0x003B) -#define PR_X400_CONTENT_TYPE PROP_TAG( PT_BINARY, 0x003C) -#define PR_SUBJECT_PREFIX PROP_TAG( PT_TSTRING, 0x003D) -#define PR_SUBJECT_PREFIX_W PROP_TAG( PT_UNICODE, 0x003D) -#define PR_SUBJECT_PREFIX_A PROP_TAG( PT_STRING8, 0x003D) -#define PR_NON_RECEIPT_REASON PROP_TAG( PT_LONG, 0x003E) -#define PR_RECEIVED_BY_ENTRYID PROP_TAG( PT_BINARY, 0x003F) -#define PR_RECEIVED_BY_NAME PROP_TAG( PT_TSTRING, 0x0040) -#define PR_RECEIVED_BY_NAME_W PROP_TAG( PT_UNICODE, 0x0040) -#define PR_RECEIVED_BY_NAME_A PROP_TAG( PT_STRING8, 0x0040) -#define PR_SENT_REPRESENTING_ENTRYID PROP_TAG( PT_BINARY, 0x0041) -#define PR_SENT_REPRESENTING_NAME PROP_TAG( PT_TSTRING, 0x0042) -#define PR_SENT_REPRESENTING_NAME_W PROP_TAG( PT_UNICODE, 0x0042) -#define PR_SENT_REPRESENTING_NAME_A PROP_TAG( PT_STRING8, 0x0042) -#define PR_RCVD_REPRESENTING_ENTRYID PROP_TAG( PT_BINARY, 0x0043) -#define PR_RCVD_REPRESENTING_NAME PROP_TAG( PT_TSTRING, 0x0044) -#define PR_RCVD_REPRESENTING_NAME_W PROP_TAG( PT_UNICODE, 0x0044) -#define PR_RCVD_REPRESENTING_NAME_A PROP_TAG( PT_STRING8, 0x0044) -#define PR_REPORT_ENTRYID PROP_TAG( PT_BINARY, 0x0045) -#define PR_READ_RECEIPT_ENTRYID PROP_TAG( PT_BINARY, 0x0046) -#define PR_MESSAGE_SUBMISSION_ID PROP_TAG( PT_BINARY, 0x0047) -#define PR_PROVIDER_SUBMIT_TIME PROP_TAG( PT_SYSTIME, 0x0048) -#define PR_ORIGINAL_SUBJECT PROP_TAG( PT_TSTRING, 0x0049) -#define PR_ORIGINAL_SUBJECT_W PROP_TAG( PT_UNICODE, 0x0049) -#define PR_ORIGINAL_SUBJECT_A PROP_TAG( PT_STRING8, 0x0049) -#define PR_DISC_VAL PROP_TAG( PT_BOOLEAN, 0x004A) -#define PR_ORIG_MESSAGE_CLASS PROP_TAG( PT_TSTRING, 0x004B) -#define PR_ORIG_MESSAGE_CLASS_W PROP_TAG( PT_UNICODE, 0x004B) -#define PR_ORIG_MESSAGE_CLASS_A PROP_TAG( PT_STRING8, 0x004B) -#define PR_ORIGINAL_AUTHOR_ENTRYID PROP_TAG( PT_BINARY, 0x004C) -#define PR_ORIGINAL_AUTHOR_NAME PROP_TAG( PT_TSTRING, 0x004D) -#define PR_ORIGINAL_AUTHOR_NAME_W PROP_TAG( PT_UNICODE, 0x004D) -#define PR_ORIGINAL_AUTHOR_NAME_A PROP_TAG( PT_STRING8, 0x004D) -#define PR_ORIGINAL_SUBMIT_TIME PROP_TAG( PT_SYSTIME, 0x004E) -#define PR_REPLY_RECIPIENT_ENTRIES PROP_TAG( PT_BINARY, 0x004F) -#define PR_REPLY_RECIPIENT_NAMES PROP_TAG( PT_TSTRING, 0x0050) -#define PR_REPLY_RECIPIENT_NAMES_W PROP_TAG( PT_UNICODE, 0x0050) -#define PR_REPLY_RECIPIENT_NAMES_A PROP_TAG( PT_STRING8, 0x0050) - -#define PR_RECEIVED_BY_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0051) -#define PR_RCVD_REPRESENTING_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0052) -#define PR_READ_RECEIPT_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0053) -#define PR_REPORT_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0054) -#define PR_ORIGINAL_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x0055) -#define PR_ORIGINAL_AUTHOR_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0056) - -#define PR_MESSAGE_TO_ME PROP_TAG( PT_BOOLEAN, 0x0057) -#define PR_MESSAGE_CC_ME PROP_TAG( PT_BOOLEAN, 0x0058) -#define PR_MESSAGE_RECIP_ME PROP_TAG( PT_BOOLEAN, 0x0059) - -#define PR_ORIGINAL_SENDER_NAME PROP_TAG( PT_TSTRING, 0x005A) -#define PR_ORIGINAL_SENDER_NAME_W PROP_TAG( PT_UNICODE, 0x005A) -#define PR_ORIGINAL_SENDER_NAME_A PROP_TAG( PT_STRING8, 0x005A) -#define PR_ORIGINAL_SENDER_ENTRYID PROP_TAG( PT_BINARY, 0x005B) -#define PR_ORIGINAL_SENDER_SEARCH_KEY PROP_TAG( PT_BINARY, 0x005C) -#define PR_ORIGINAL_SENT_REPRESENTING_NAME PROP_TAG( PT_TSTRING, 0x005D) -#define PR_ORIGINAL_SENT_REPRESENTING_NAME_W PROP_TAG( PT_UNICODE, 0x005D) -#define PR_ORIGINAL_SENT_REPRESENTING_NAME_A PROP_TAG( PT_STRING8, 0x005D) -#define PR_ORIGINAL_SENT_REPRESENTING_ENTRYID PROP_TAG( PT_BINARY, 0x005E) -#define PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY PROP_TAG( PT_BINARY, 0x005F) - -#define PR_START_DATE PROP_TAG( PT_SYSTIME, 0x0060) -#define PR_END_DATE PROP_TAG( PT_SYSTIME, 0x0061) -#define PR_OWNER_APPT_ID PROP_TAG( PT_LONG, 0x0062) -#define PR_RESPONSE_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0063) - -#define PR_SENT_REPRESENTING_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0064) -#define PR_SENT_REPRESENTING_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0064) -#define PR_SENT_REPRESENTING_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0064) -#define PR_SENT_REPRESENTING_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0065) -#define PR_SENT_REPRESENTING_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0065) -#define PR_SENT_REPRESENTING_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0065) - -#define PR_ORIGINAL_SENDER_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0066) -#define PR_ORIGINAL_SENDER_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0066) -#define PR_ORIGINAL_SENDER_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0066) -#define PR_ORIGINAL_SENDER_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0067) -#define PR_ORIGINAL_SENDER_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0067) -#define PR_ORIGINAL_SENDER_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0067) - -#define PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0068) -#define PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0068) -#define PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0068) -#define PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0069) -#define PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0069) -#define PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0069) - -#define PR_CONVERSATION_TOPIC PROP_TAG( PT_TSTRING, 0x0070) -#define PR_CONVERSATION_TOPIC_W PROP_TAG( PT_UNICODE, 0x0070) -#define PR_CONVERSATION_TOPIC_A PROP_TAG( PT_STRING8, 0x0070) -#define PR_CONVERSATION_INDEX PROP_TAG( PT_BINARY, 0x0071) - -#define PR_ORIGINAL_DISPLAY_BCC PROP_TAG( PT_TSTRING, 0x0072) -#define PR_ORIGINAL_DISPLAY_BCC_W PROP_TAG( PT_UNICODE, 0x0072) -#define PR_ORIGINAL_DISPLAY_BCC_A PROP_TAG( PT_STRING8, 0x0072) -#define PR_ORIGINAL_DISPLAY_CC PROP_TAG( PT_TSTRING, 0x0073) -#define PR_ORIGINAL_DISPLAY_CC_W PROP_TAG( PT_UNICODE, 0x0073) -#define PR_ORIGINAL_DISPLAY_CC_A PROP_TAG( PT_STRING8, 0x0073) -#define PR_ORIGINAL_DISPLAY_TO PROP_TAG( PT_TSTRING, 0x0074) -#define PR_ORIGINAL_DISPLAY_TO_W PROP_TAG( PT_UNICODE, 0x0074) -#define PR_ORIGINAL_DISPLAY_TO_A PROP_TAG( PT_STRING8, 0x0074) - -#define PR_RECEIVED_BY_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0075) -#define PR_RECEIVED_BY_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0075) -#define PR_RECEIVED_BY_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0075) -#define PR_RECEIVED_BY_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0076) -#define PR_RECEIVED_BY_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0076) -#define PR_RECEIVED_BY_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0076) - -#define PR_RCVD_REPRESENTING_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0077) -#define PR_RCVD_REPRESENTING_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0077) -#define PR_RCVD_REPRESENTING_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0077) -#define PR_RCVD_REPRESENTING_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0078) -#define PR_RCVD_REPRESENTING_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0078) -#define PR_RCVD_REPRESENTING_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0078) - -#define PR_ORIGINAL_AUTHOR_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0079) -#define PR_ORIGINAL_AUTHOR_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0079) -#define PR_ORIGINAL_AUTHOR_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0079) -#define PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x007A) -#define PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x007A) -#define PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x007A) - -#define PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE PROP_TAG( PT_TSTRING, 0x007B) -#define PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x007B) -#define PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x007B) -#define PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x007C) -#define PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x007C) -#define PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x007C) - -#define PR_TRANSPORT_MESSAGE_HEADERS PROP_TAG(PT_TSTRING, 0x007D) -#define PR_TRANSPORT_MESSAGE_HEADERS_W PROP_TAG(PT_UNICODE, 0x007D) -#define PR_TRANSPORT_MESSAGE_HEADERS_A PROP_TAG(PT_STRING8, 0x007D) - -#define PR_DELEGATION PROP_TAG(PT_BINARY, 0x007E) - -#define PR_TNEF_CORRELATION_KEY PROP_TAG(PT_BINARY, 0x007F) - - - -/* - * Message content properties - */ - -#define PR_BODY PROP_TAG( PT_TSTRING, 0x1000) -#define PR_BODY_W PROP_TAG( PT_UNICODE, 0x1000) -#define PR_BODY_A PROP_TAG( PT_STRING8, 0x1000) -#define PR_REPORT_TEXT PROP_TAG( PT_TSTRING, 0x1001) -#define PR_REPORT_TEXT_W PROP_TAG( PT_UNICODE, 0x1001) -#define PR_REPORT_TEXT_A PROP_TAG( PT_STRING8, 0x1001) -#define PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY PROP_TAG( PT_BINARY, 0x1002) -#define PR_REPORTING_DL_NAME PROP_TAG( PT_BINARY, 0x1003) -#define PR_REPORTING_MTA_CERTIFICATE PROP_TAG( PT_BINARY, 0x1004) - -/* Removed PR_REPORT_ORIGIN_AUTHENTICATION_CHECK with DCR 3865, use PR_ORIGIN_CHECK */ - -#define PR_RTF_SYNC_BODY_CRC PROP_TAG( PT_LONG, 0x1006) -#define PR_RTF_SYNC_BODY_COUNT PROP_TAG( PT_LONG, 0x1007) -#define PR_RTF_SYNC_BODY_TAG PROP_TAG( PT_TSTRING, 0x1008) -#define PR_RTF_SYNC_BODY_TAG_W PROP_TAG( PT_UNICODE, 0x1008) -#define PR_RTF_SYNC_BODY_TAG_A PROP_TAG( PT_STRING8, 0x1008) -#define PR_RTF_COMPRESSED PROP_TAG( PT_BINARY, 0x1009) -#define PR_RTF_SYNC_PREFIX_COUNT PROP_TAG( PT_LONG, 0x1010) -#define PR_RTF_SYNC_TRAILING_COUNT PROP_TAG( PT_LONG, 0x1011) -#define PR_ORIGINALLY_INTENDED_RECIP_ENTRYID PROP_TAG( PT_BINARY, 0x1012) - -/* - * Reserved 0x1100-0x1200 - */ - - -/* - * Message recipient properties - */ - -#define PR_CONTENT_INTEGRITY_CHECK PROP_TAG( PT_BINARY, 0x0C00) -#define PR_EXPLICIT_CONVERSION PROP_TAG( PT_LONG, 0x0C01) -#define PR_IPM_RETURN_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C02) -#define PR_MESSAGE_TOKEN PROP_TAG( PT_BINARY, 0x0C03) -#define PR_NDR_REASON_CODE PROP_TAG( PT_LONG, 0x0C04) -#define PR_NDR_DIAG_CODE PROP_TAG( PT_LONG, 0x0C05) -#define PR_NON_RECEIPT_NOTIFICATION_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C06) -#define PR_DELIVERY_POINT PROP_TAG( PT_LONG, 0x0C07) - -#define PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C08) -#define PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT PROP_TAG( PT_BINARY, 0x0C09) -#define PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY PROP_TAG( PT_BOOLEAN, 0x0C0A) -#define PR_PHYSICAL_DELIVERY_MODE PROP_TAG( PT_LONG, 0x0C0B) -#define PR_PHYSICAL_DELIVERY_REPORT_REQUEST PROP_TAG( PT_LONG, 0x0C0C) -#define PR_PHYSICAL_FORWARDING_ADDRESS PROP_TAG( PT_BINARY, 0x0C0D) -#define PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C0E) -#define PR_PHYSICAL_FORWARDING_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x0C0F) -#define PR_PHYSICAL_RENDITION_ATTRIBUTES PROP_TAG( PT_BINARY, 0x0C10) -#define PR_PROOF_OF_DELIVERY PROP_TAG( PT_BINARY, 0x0C11) -#define PR_PROOF_OF_DELIVERY_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C12) -#define PR_RECIPIENT_CERTIFICATE PROP_TAG( PT_BINARY, 0x0C13) -#define PR_RECIPIENT_NUMBER_FOR_ADVICE PROP_TAG( PT_TSTRING, 0x0C14) -#define PR_RECIPIENT_NUMBER_FOR_ADVICE_W PROP_TAG( PT_UNICODE, 0x0C14) -#define PR_RECIPIENT_NUMBER_FOR_ADVICE_A PROP_TAG( PT_STRING8, 0x0C14) -#define PR_RECIPIENT_TYPE PROP_TAG( PT_LONG, 0x0C15) -#define PR_REGISTERED_MAIL_TYPE PROP_TAG( PT_LONG, 0x0C16) -#define PR_REPLY_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C17) -#define PR_REQUESTED_DELIVERY_METHOD PROP_TAG( PT_LONG, 0x0C18) -#define PR_SENDER_ENTRYID PROP_TAG( PT_BINARY, 0x0C19) -#define PR_SENDER_NAME PROP_TAG( PT_TSTRING, 0x0C1A) -#define PR_SENDER_NAME_W PROP_TAG( PT_UNICODE, 0x0C1A) -#define PR_SENDER_NAME_A PROP_TAG( PT_STRING8, 0x0C1A) -#define PR_SUPPLEMENTARY_INFO PROP_TAG( PT_TSTRING, 0x0C1B) -#define PR_SUPPLEMENTARY_INFO_W PROP_TAG( PT_UNICODE, 0x0C1B) -#define PR_SUPPLEMENTARY_INFO_A PROP_TAG( PT_STRING8, 0x0C1B) -#define PR_TYPE_OF_MTS_USER PROP_TAG( PT_LONG, 0x0C1C) -#define PR_SENDER_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0C1D) -#define PR_SENDER_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0C1E) -#define PR_SENDER_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0C1E) -#define PR_SENDER_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0C1E) -#define PR_SENDER_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0C1F) -#define PR_SENDER_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0C1F) -#define PR_SENDER_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0C1F) - -/* - * Message non-transmittable properties - */ - -/* - * The two tags, PR_MESSAGE_RECIPIENTS and PR_MESSAGE_ATTACHMENTS, - * are to be used in the exclude list passed to - * IMessage::CopyTo when the caller wants either the recipients or attachments - * of the message to not get copied. It is also used in the ProblemArray - * return from IMessage::CopyTo when an error is encountered copying them - */ - -#define PR_CURRENT_VERSION PROP_TAG( PT_I8, 0x0E00) -#define PR_DELETE_AFTER_SUBMIT PROP_TAG( PT_BOOLEAN, 0x0E01) -#define PR_DISPLAY_BCC PROP_TAG( PT_TSTRING, 0x0E02) -#define PR_DISPLAY_BCC_W PROP_TAG( PT_UNICODE, 0x0E02) -#define PR_DISPLAY_BCC_A PROP_TAG( PT_STRING8, 0x0E02) -#define PR_DISPLAY_CC PROP_TAG( PT_TSTRING, 0x0E03) -#define PR_DISPLAY_CC_W PROP_TAG( PT_UNICODE, 0x0E03) -#define PR_DISPLAY_CC_A PROP_TAG( PT_STRING8, 0x0E03) -#define PR_DISPLAY_TO PROP_TAG( PT_TSTRING, 0x0E04) -#define PR_DISPLAY_TO_W PROP_TAG( PT_UNICODE, 0x0E04) -#define PR_DISPLAY_TO_A PROP_TAG( PT_STRING8, 0x0E04) -#define PR_PARENT_DISPLAY PROP_TAG( PT_TSTRING, 0x0E05) -#define PR_PARENT_DISPLAY_W PROP_TAG( PT_UNICODE, 0x0E05) -#define PR_PARENT_DISPLAY_A PROP_TAG( PT_STRING8, 0x0E05) -#define PR_MESSAGE_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x0E06) -#define PR_MESSAGE_FLAGS PROP_TAG( PT_LONG, 0x0E07) -#define PR_MESSAGE_SIZE PROP_TAG( PT_LONG, 0x0E08) -#define PR_PARENT_ENTRYID PROP_TAG( PT_BINARY, 0x0E09) -#define PR_SENTMAIL_ENTRYID PROP_TAG( PT_BINARY, 0x0E0A) -#define PR_CORRELATE PROP_TAG( PT_BOOLEAN, 0x0E0C) -#define PR_CORRELATE_MTSID PROP_TAG( PT_BINARY, 0x0E0D) -#define PR_DISCRETE_VALUES PROP_TAG( PT_BOOLEAN, 0x0E0E) -#define PR_RESPONSIBILITY PROP_TAG( PT_BOOLEAN, 0x0E0F) -#define PR_SPOOLER_STATUS PROP_TAG( PT_LONG, 0x0E10) -#define PR_TRANSPORT_STATUS PROP_TAG( PT_LONG, 0x0E11) -#define PR_MESSAGE_RECIPIENTS PROP_TAG( PT_OBJECT, 0x0E12) -#define PR_MESSAGE_ATTACHMENTS PROP_TAG( PT_OBJECT, 0x0E13) -#define PR_SUBMIT_FLAGS PROP_TAG( PT_LONG, 0x0E14) -#define PR_RECIPIENT_STATUS PROP_TAG( PT_LONG, 0x0E15) -#define PR_TRANSPORT_KEY PROP_TAG( PT_LONG, 0x0E16) -#define PR_MSG_STATUS PROP_TAG( PT_LONG, 0x0E17) -#define PR_MESSAGE_DOWNLOAD_TIME PROP_TAG( PT_LONG, 0x0E18) -#define PR_CREATION_VERSION PROP_TAG( PT_I8, 0x0E19) -#define PR_MODIFY_VERSION PROP_TAG( PT_I8, 0x0E1A) -#define PR_HASATTACH PROP_TAG( PT_BOOLEAN, 0x0E1B) -#define PR_BODY_CRC PROP_TAG( PT_LONG, 0x0E1C) -#define PR_NORMALIZED_SUBJECT PROP_TAG( PT_TSTRING, 0x0E1D) -#define PR_NORMALIZED_SUBJECT_W PROP_TAG( PT_UNICODE, 0x0E1D) -#define PR_NORMALIZED_SUBJECT_A PROP_TAG( PT_STRING8, 0x0E1D) -#define PR_RTF_IN_SYNC PROP_TAG( PT_BOOLEAN, 0x0E1F) -#define PR_ATTACH_SIZE PROP_TAG( PT_LONG, 0x0E20) -#define PR_ATTACH_NUM PROP_TAG( PT_LONG, 0x0E21) -#define PR_PREPROCESS PROP_TAG( PT_BOOLEAN, 0x0E22) - -/* PR_ORIGINAL_DISPLAY_TO, _CC, and _BCC moved to transmittible range 03/09/95 */ - -#define PR_ORIGINATING_MTA_CERTIFICATE PROP_TAG( PT_BINARY, 0x0E25) -#define PR_PROOF_OF_SUBMISSION PROP_TAG( PT_BINARY, 0x0E26) - - -/* - * The range of non-message and non-recipient property IDs (0x3000 - 0x3FFF) is - * further broken down into ranges to make assigning new property IDs easier. - * - * From To Kind of property - * -------------------------------- - * 3000 32FF MAPI_defined common property - * 3200 33FF MAPI_defined form property - * 3400 35FF MAPI_defined message store property - * 3600 36FF MAPI_defined Folder or AB Container property - * 3700 38FF MAPI_defined attachment property - * 3900 39FF MAPI_defined address book property - * 3A00 3BFF MAPI_defined mailuser property - * 3C00 3CFF MAPI_defined DistList property - * 3D00 3DFF MAPI_defined Profile Section property - * 3E00 3EFF MAPI_defined Status property - * 3F00 3FFF MAPI_defined display table property - */ - -/* - * Properties common to numerous MAPI objects. - * - * Those properties that can appear on messages are in the - * non-transmittable range for messages. They start at the high - * end of that range and work down. - * - * Properties that never appear on messages are defined in the common - * property range (see above). - */ - -/* - * properties that are common to multiple objects (including message objects) - * -- these ids are in the non-transmittable range - */ - -#define PR_ENTRYID PROP_TAG( PT_BINARY, 0x0FFF) -#define PR_OBJECT_TYPE PROP_TAG( PT_LONG, 0x0FFE) -#define PR_ICON PROP_TAG( PT_BINARY, 0x0FFD) -#define PR_MINI_ICON PROP_TAG( PT_BINARY, 0x0FFC) -#define PR_STORE_ENTRYID PROP_TAG( PT_BINARY, 0x0FFB) -#define PR_STORE_RECORD_KEY PROP_TAG( PT_BINARY, 0x0FFA) -#define PR_RECORD_KEY PROP_TAG( PT_BINARY, 0x0FF9) -#define PR_MAPPING_SIGNATURE PROP_TAG( PT_BINARY, 0x0FF8) -#define PR_ACCESS_LEVEL PROP_TAG( PT_LONG, 0x0FF7) -#define PR_INSTANCE_KEY PROP_TAG( PT_BINARY, 0x0FF6) -#define PR_ROW_TYPE PROP_TAG( PT_LONG, 0x0FF5) -#define PR_ACCESS PROP_TAG( PT_LONG, 0x0FF4) - -/* - * properties that are common to multiple objects (usually not including message objects) - * -- these ids are in the transmittable range - */ - -#define PR_ROWID PROP_TAG( PT_LONG, 0x3000) -#define PR_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x3001) -#define PR_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x3001) -#define PR_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x3001) -#define PR_ADDRTYPE PROP_TAG( PT_TSTRING, 0x3002) -#define PR_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x3002) -#define PR_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x3002) -#define PR_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x3003) -#define PR_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x3003) -#define PR_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x3003) -#define PR_COMMENT PROP_TAG( PT_TSTRING, 0x3004) -#define PR_COMMENT_W PROP_TAG( PT_UNICODE, 0x3004) -#define PR_COMMENT_A PROP_TAG( PT_STRING8, 0x3004) -#define PR_DEPTH PROP_TAG( PT_LONG, 0x3005) -#define PR_PROVIDER_DISPLAY PROP_TAG( PT_TSTRING, 0x3006) -#define PR_PROVIDER_DISPLAY_W PROP_TAG( PT_UNICODE, 0x3006) -#define PR_PROVIDER_DISPLAY_A PROP_TAG( PT_STRING8, 0x3006) -#define PR_CREATION_TIME PROP_TAG( PT_SYSTIME, 0x3007) -#define PR_LAST_MODIFICATION_TIME PROP_TAG( PT_SYSTIME, 0x3008) -#define PR_RESOURCE_FLAGS PROP_TAG( PT_LONG, 0x3009) -#define PR_PROVIDER_DLL_NAME PROP_TAG( PT_TSTRING, 0x300A) -#define PR_PROVIDER_DLL_NAME_W PROP_TAG( PT_UNICODE, 0x300A) -#define PR_PROVIDER_DLL_NAME_A PROP_TAG( PT_STRING8, 0x300A) -#define PR_SEARCH_KEY PROP_TAG( PT_BINARY, 0x300B) -#define PR_PROVIDER_UID PROP_TAG( PT_BINARY, 0x300C) -#define PR_PROVIDER_ORDINAL PROP_TAG( PT_LONG, 0x300D) - -/* - * MAPI Form properties - */ -#define PR_FORM_VERSION PROP_TAG(PT_TSTRING, 0x3301) -#define PR_FORM_VERSION_W PROP_TAG(PT_UNICODE, 0x3301) -#define PR_FORM_VERSION_A PROP_TAG(PT_STRING8, 0x3301) -#define PR_FORM_CLSID PROP_TAG(PT_CLSID, 0x3302) -#define PR_FORM_CONTACT_NAME PROP_TAG(PT_TSTRING, 0x3303) -#define PR_FORM_CONTACT_NAME_W PROP_TAG(PT_UNICODE, 0x3303) -#define PR_FORM_CONTACT_NAME_A PROP_TAG(PT_STRING8, 0x3303) -#define PR_FORM_CATEGORY PROP_TAG(PT_TSTRING, 0x3304) -#define PR_FORM_CATEGORY_W PROP_TAG(PT_UNICODE, 0x3304) -#define PR_FORM_CATEGORY_A PROP_TAG(PT_STRING8, 0x3304) -#define PR_FORM_CATEGORY_SUB PROP_TAG(PT_TSTRING, 0x3305) -#define PR_FORM_CATEGORY_SUB_W PROP_TAG(PT_UNICODE, 0x3305) -#define PR_FORM_CATEGORY_SUB_A PROP_TAG(PT_STRING8, 0x3305) -#define PR_FORM_HOST_MAP PROP_TAG(PT_MV_LONG, 0x3306) -#define PR_FORM_HIDDEN PROP_TAG(PT_BOOLEAN, 0x3307) -#define PR_FORM_DESIGNER_NAME PROP_TAG(PT_TSTRING, 0x3308) -#define PR_FORM_DESIGNER_NAME_W PROP_TAG(PT_UNICODE, 0x3308) -#define PR_FORM_DESIGNER_NAME_A PROP_TAG(PT_STRING8, 0x3308) -#define PR_FORM_DESIGNER_GUID PROP_TAG(PT_CLSID, 0x3309) -#define PR_FORM_MESSAGE_BEHAVIOR PROP_TAG(PT_LONG, 0x330A) - -/* - * Message store properties - */ - -#define PR_DEFAULT_STORE PROP_TAG( PT_BOOLEAN, 0x3400) -#define PR_STORE_SUPPORT_MASK PROP_TAG( PT_LONG, 0x340D) -#define PR_STORE_STATE PROP_TAG( PT_LONG, 0x340E) - -#define PR_IPM_SUBTREE_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3410) -#define PR_IPM_OUTBOX_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3411) -#define PR_IPM_WASTEBASKET_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3412) -#define PR_IPM_SENTMAIL_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3413) -#define PR_MDB_PROVIDER PROP_TAG( PT_BINARY, 0x3414) -#define PR_RECEIVE_FOLDER_SETTINGS PROP_TAG( PT_OBJECT, 0x3415) - -#define PR_VALID_FOLDER_MASK PROP_TAG( PT_LONG, 0x35DF) -#define PR_IPM_SUBTREE_ENTRYID PROP_TAG( PT_BINARY, 0x35E0) - -#define PR_IPM_OUTBOX_ENTRYID PROP_TAG( PT_BINARY, 0x35E2) -#define PR_IPM_WASTEBASKET_ENTRYID PROP_TAG( PT_BINARY, 0x35E3) -#define PR_IPM_SENTMAIL_ENTRYID PROP_TAG( PT_BINARY, 0x35E4) -#define PR_VIEWS_ENTRYID PROP_TAG( PT_BINARY, 0x35E5) -#define PR_COMMON_VIEWS_ENTRYID PROP_TAG( PT_BINARY, 0x35E6) -#define PR_FINDER_ENTRYID PROP_TAG( PT_BINARY, 0x35E7) - -/* Proptags 0x35E8-0x35FF reserved for folders "guaranteed" by PR_VALID_FOLDER_MASK */ - - -/* - * Folder and AB Container properties - */ - -#define PR_CONTAINER_FLAGS PROP_TAG( PT_LONG, 0x3600) -#define PR_FOLDER_TYPE PROP_TAG( PT_LONG, 0x3601) -#define PR_CONTENT_COUNT PROP_TAG( PT_LONG, 0x3602) -#define PR_CONTENT_UNREAD PROP_TAG( PT_LONG, 0x3603) -#define PR_CREATE_TEMPLATES PROP_TAG( PT_OBJECT, 0x3604) -#define PR_DETAILS_TABLE PROP_TAG( PT_OBJECT, 0x3605) -#define PR_SEARCH PROP_TAG( PT_OBJECT, 0x3607) -#define PR_SELECTABLE PROP_TAG( PT_BOOLEAN, 0x3609) -#define PR_SUBFOLDERS PROP_TAG( PT_BOOLEAN, 0x360A) -#define PR_STATUS PROP_TAG( PT_LONG, 0x360B) -#define PR_ANR PROP_TAG( PT_TSTRING, 0x360C) -#define PR_ANR_W PROP_TAG( PT_UNICODE, 0x360C) -#define PR_ANR_A PROP_TAG( PT_STRING8, 0x360C) -#define PR_CONTENTS_SORT_ORDER PROP_TAG( PT_MV_LONG, 0x360D) -#define PR_CONTAINER_HIERARCHY PROP_TAG( PT_OBJECT, 0x360E) -#define PR_CONTAINER_CONTENTS PROP_TAG( PT_OBJECT, 0x360F) -#define PR_FOLDER_ASSOCIATED_CONTENTS PROP_TAG( PT_OBJECT, 0x3610) -#define PR_DEF_CREATE_DL PROP_TAG( PT_BINARY, 0x3611) -#define PR_DEF_CREATE_MAILUSER PROP_TAG( PT_BINARY, 0x3612) -#define PR_CONTAINER_CLASS PROP_TAG( PT_TSTRING, 0x3613) -#define PR_CONTAINER_CLASS_W PROP_TAG( PT_UNICODE, 0x3613) -#define PR_CONTAINER_CLASS_A PROP_TAG( PT_STRING8, 0x3613) -#define PR_CONTAINER_MODIFY_VERSION PROP_TAG( PT_I8, 0x3614) -#define PR_AB_PROVIDER_ID PROP_TAG( PT_BINARY, 0x3615) -#define PR_DEFAULT_VIEW_ENTRYID PROP_TAG( PT_BINARY, 0x3616) -#define PR_ASSOC_CONTENT_COUNT PROP_TAG( PT_LONG, 0x3617) - -/* Reserved 0x36C0-0x36FF */ - -/* - * Attachment properties - */ - -#define PR_ATTACHMENT_X400_PARAMETERS PROP_TAG( PT_BINARY, 0x3700) -#define PR_ATTACH_DATA_OBJ PROP_TAG( PT_OBJECT, 0x3701) -#define PR_ATTACH_DATA_BIN PROP_TAG( PT_BINARY, 0x3701) -#define PR_ATTACH_ENCODING PROP_TAG( PT_BINARY, 0x3702) -#define PR_ATTACH_EXTENSION PROP_TAG( PT_TSTRING, 0x3703) -#define PR_ATTACH_EXTENSION_W PROP_TAG( PT_UNICODE, 0x3703) -#define PR_ATTACH_EXTENSION_A PROP_TAG( PT_STRING8, 0x3703) -#define PR_ATTACH_FILENAME PROP_TAG( PT_TSTRING, 0x3704) -#define PR_ATTACH_FILENAME_W PROP_TAG( PT_UNICODE, 0x3704) -#define PR_ATTACH_FILENAME_A PROP_TAG( PT_STRING8, 0x3704) -#define PR_ATTACH_METHOD PROP_TAG( PT_LONG, 0x3705) -#define PR_ATTACH_LONG_FILENAME PROP_TAG( PT_TSTRING, 0x3707) -#define PR_ATTACH_LONG_FILENAME_W PROP_TAG( PT_UNICODE, 0x3707) -#define PR_ATTACH_LONG_FILENAME_A PROP_TAG( PT_STRING8, 0x3707) -#define PR_ATTACH_PATHNAME PROP_TAG( PT_TSTRING, 0x3708) -#define PR_ATTACH_PATHNAME_W PROP_TAG( PT_UNICODE, 0x3708) -#define PR_ATTACH_PATHNAME_A PROP_TAG( PT_STRING8, 0x3708) -#define PR_ATTACH_RENDERING PROP_TAG( PT_BINARY, 0x3709) -#define PR_ATTACH_TAG PROP_TAG( PT_BINARY, 0x370A) -#define PR_RENDERING_POSITION PROP_TAG( PT_LONG, 0x370B) -#define PR_ATTACH_TRANSPORT_NAME PROP_TAG( PT_TSTRING, 0x370C) -#define PR_ATTACH_TRANSPORT_NAME_W PROP_TAG( PT_UNICODE, 0x370C) -#define PR_ATTACH_TRANSPORT_NAME_A PROP_TAG( PT_STRING8, 0x370C) -#define PR_ATTACH_LONG_PATHNAME PROP_TAG( PT_TSTRING, 0x370D) -#define PR_ATTACH_LONG_PATHNAME_W PROP_TAG( PT_UNICODE, 0x370D) -#define PR_ATTACH_LONG_PATHNAME_A PROP_TAG( PT_STRING8, 0x370D) -#define PR_ATTACH_MIME_TAG PROP_TAG( PT_TSTRING, 0x370E) -#define PR_ATTACH_MIME_TAG_W PROP_TAG( PT_UNICODE, 0x370E) -#define PR_ATTACH_MIME_TAG_A PROP_TAG( PT_STRING8, 0x370E) -#define PR_ATTACH_ADDITIONAL_INFO PROP_TAG( PT_BINARY, 0x370F) - -/* - * AB Object properties - */ - -#define PR_DISPLAY_TYPE PROP_TAG( PT_LONG, 0x3900) -#define PR_TEMPLATEID PROP_TAG( PT_BINARY, 0x3902) -#define PR_PRIMARY_CAPABILITY PROP_TAG( PT_BINARY, 0x3904) - - -/* - * Mail user properties - */ -#define PR_7BIT_DISPLAY_NAME PROP_TAG( PT_STRING8, 0x39FF) -#define PR_ACCOUNT PROP_TAG( PT_TSTRING, 0x3A00) -#define PR_ACCOUNT_W PROP_TAG( PT_UNICODE, 0x3A00) -#define PR_ACCOUNT_A PROP_TAG( PT_STRING8, 0x3A00) -#define PR_ALTERNATE_RECIPIENT PROP_TAG( PT_BINARY, 0x3A01) -#define PR_CALLBACK_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A02) -#define PR_CALLBACK_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A02) -#define PR_CALLBACK_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A02) -#define PR_CONVERSION_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x3A03) -#define PR_DISCLOSE_RECIPIENTS PROP_TAG( PT_BOOLEAN, 0x3A04) -#define PR_GENERATION PROP_TAG( PT_TSTRING, 0x3A05) -#define PR_GENERATION_W PROP_TAG( PT_UNICODE, 0x3A05) -#define PR_GENERATION_A PROP_TAG( PT_STRING8, 0x3A05) -#define PR_GIVEN_NAME PROP_TAG( PT_TSTRING, 0x3A06) -#define PR_GIVEN_NAME_W PROP_TAG( PT_UNICODE, 0x3A06) -#define PR_GIVEN_NAME_A PROP_TAG( PT_STRING8, 0x3A06) -#define PR_GOVERNMENT_ID_NUMBER PROP_TAG( PT_TSTRING, 0x3A07) -#define PR_GOVERNMENT_ID_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A07) -#define PR_GOVERNMENT_ID_NUMBER_A PROP_TAG( PT_STRING8, 0x3A07) -#define PR_BUSINESS_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A08) -#define PR_BUSINESS_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A08) -#define PR_BUSINESS_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A08) -#define PR_OFFICE_TELEPHONE_NUMBER PR_BUSINESS_TELEPHONE_NUMBER -#define PR_OFFICE_TELEPHONE_NUMBER_W PR_BUSINESS_TELEPHONE_NUMBER_W -#define PR_OFFICE_TELEPHONE_NUMBER_A PR_BUSINESS_TELEPHONE_NUMBER_A -#define PR_HOME_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A09) -#define PR_HOME_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A09) -#define PR_HOME_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A09) -#define PR_INITIALS PROP_TAG( PT_TSTRING, 0x3A0A) -#define PR_INITIALS_W PROP_TAG( PT_UNICODE, 0x3A0A) -#define PR_INITIALS_A PROP_TAG( PT_STRING8, 0x3A0A) -#define PR_KEYWORD PROP_TAG( PT_TSTRING, 0x3A0B) -#define PR_KEYWORD_W PROP_TAG( PT_UNICODE, 0x3A0B) -#define PR_KEYWORD_A PROP_TAG( PT_STRING8, 0x3A0B) -#define PR_LANGUAGE PROP_TAG( PT_TSTRING, 0x3A0C) -#define PR_LANGUAGE_W PROP_TAG( PT_UNICODE, 0x3A0C) -#define PR_LANGUAGE_A PROP_TAG( PT_STRING8, 0x3A0C) -#define PR_LOCATION PROP_TAG( PT_TSTRING, 0x3A0D) -#define PR_LOCATION_W PROP_TAG( PT_UNICODE, 0x3A0D) -#define PR_LOCATION_A PROP_TAG( PT_STRING8, 0x3A0D) -#define PR_MAIL_PERMISSION PROP_TAG( PT_BOOLEAN, 0x3A0E) -#define PR_MHS_COMMON_NAME PROP_TAG( PT_TSTRING, 0x3A0F) -#define PR_MHS_COMMON_NAME_W PROP_TAG( PT_UNICODE, 0x3A0F) -#define PR_MHS_COMMON_NAME_A PROP_TAG( PT_STRING8, 0x3A0F) -#define PR_ORGANIZATIONAL_ID_NUMBER PROP_TAG( PT_TSTRING, 0x3A10) -#define PR_ORGANIZATIONAL_ID_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A10) -#define PR_ORGANIZATIONAL_ID_NUMBER_A PROP_TAG( PT_STRING8, 0x3A10) -#define PR_SURNAME PROP_TAG( PT_TSTRING, 0x3A11) -#define PR_SURNAME_W PROP_TAG( PT_UNICODE, 0x3A11) -#define PR_SURNAME_A PROP_TAG( PT_STRING8, 0x3A11) -#define PR_ORIGINAL_ENTRYID PROP_TAG( PT_BINARY, 0x3A12) -#define PR_ORIGINAL_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x3A13) -#define PR_ORIGINAL_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x3A13) -#define PR_ORIGINAL_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x3A13) -#define PR_ORIGINAL_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3A14) -#define PR_POSTAL_ADDRESS PROP_TAG( PT_TSTRING, 0x3A15) -#define PR_POSTAL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x3A15) -#define PR_POSTAL_ADDRESS_A PROP_TAG( PT_STRING8, 0x3A15) -#define PR_COMPANY_NAME PROP_TAG( PT_TSTRING, 0x3A16) -#define PR_COMPANY_NAME_W PROP_TAG( PT_UNICODE, 0x3A16) -#define PR_COMPANY_NAME_A PROP_TAG( PT_STRING8, 0x3A16) -#define PR_TITLE PROP_TAG( PT_TSTRING, 0x3A17) -#define PR_TITLE_W PROP_TAG( PT_UNICODE, 0x3A17) -#define PR_TITLE_A PROP_TAG( PT_STRING8, 0x3A17) -#define PR_DEPARTMENT_NAME PROP_TAG( PT_TSTRING, 0x3A18) -#define PR_DEPARTMENT_NAME_W PROP_TAG( PT_UNICODE, 0x3A18) -#define PR_DEPARTMENT_NAME_A PROP_TAG( PT_STRING8, 0x3A18) -#define PR_OFFICE_LOCATION PROP_TAG( PT_TSTRING, 0x3A19) -#define PR_OFFICE_LOCATION_W PROP_TAG( PT_UNICODE, 0x3A19) -#define PR_OFFICE_LOCATION_A PROP_TAG( PT_STRING8, 0x3A19) -#define PR_PRIMARY_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1A) -#define PR_PRIMARY_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1A) -#define PR_PRIMARY_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1A) -#define PR_BUSINESS2_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1B) -#define PR_BUSINESS2_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1B) -#define PR_BUSINESS2_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1B) -#define PR_OFFICE2_TELEPHONE_NUMBER PR_BUSINESS2_TELEPHONE_NUMBER -#define PR_OFFICE2_TELEPHONE_NUMBER_W PR_BUSINESS2_TELEPHONE_NUMBER_W -#define PR_OFFICE2_TELEPHONE_NUMBER_A PR_BUSINESS2_TELEPHONE_NUMBER_A -#define PR_MOBILE_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1C) -#define PR_MOBILE_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1C) -#define PR_MOBILE_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1C) -#define PR_CELLULAR_TELEPHONE_NUMBER PR_MOBILE_TELEPHONE_NUMBER -#define PR_CELLULAR_TELEPHONE_NUMBER_W PR_MOBILE_TELEPHONE_NUMBER_W -#define PR_CELLULAR_TELEPHONE_NUMBER_A PR_MOBILE_TELEPHONE_NUMBER_A -#define PR_RADIO_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1D) -#define PR_RADIO_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1D) -#define PR_RADIO_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1D) -#define PR_CAR_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1E) -#define PR_CAR_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1E) -#define PR_CAR_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1E) -#define PR_OTHER_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1F) -#define PR_OTHER_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1F) -#define PR_OTHER_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1F) -#define PR_TRANSMITABLE_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x3A20) -#define PR_TRANSMITABLE_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x3A20) -#define PR_TRANSMITABLE_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x3A20) -#define PR_PAGER_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A21) -#define PR_PAGER_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A21) -#define PR_PAGER_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A21) -#define PR_BEEPER_TELEPHONE_NUMBER PR_PAGER_TELEPHONE_NUMBER -#define PR_BEEPER_TELEPHONE_NUMBER_W PR_PAGER_TELEPHONE_NUMBER_W -#define PR_BEEPER_TELEPHONE_NUMBER_A PR_PAGER_TELEPHONE_NUMBER_A -#define PR_USER_CERTIFICATE PROP_TAG( PT_BINARY, 0x3A22) -#define PR_PRIMARY_FAX_NUMBER PROP_TAG( PT_TSTRING, 0x3A23) -#define PR_PRIMARY_FAX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A23) -#define PR_PRIMARY_FAX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A23) -#define PR_BUSINESS_FAX_NUMBER PROP_TAG( PT_TSTRING, 0x3A24) -#define PR_BUSINESS_FAX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A24) -#define PR_BUSINESS_FAX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A24) -#define PR_HOME_FAX_NUMBER PROP_TAG( PT_TSTRING, 0x3A25) -#define PR_HOME_FAX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A25) -#define PR_HOME_FAX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A25) -#define PR_COUNTRY PROP_TAG( PT_TSTRING, 0x3A26) -#define PR_COUNTRY_W PROP_TAG( PT_UNICODE, 0x3A26) -#define PR_COUNTRY_A PROP_TAG( PT_STRING8, 0x3A26) -#define PR_BUSINESS_ADDRESS_COUNTRY PR_COUNTRY -#define PR_BUSINESS_ADDRESS_COUNTRY_W PR_COUNTRY_W -#define PR_BUSINESS_ADDRESS_COUNTRY_A PR_COUNTRY_A - -#define PR_LOCALITY PROP_TAG( PT_TSTRING, 0x3A27) -#define PR_LOCALITY_W PROP_TAG( PT_UNICODE, 0x3A27) -#define PR_LOCALITY_A PROP_TAG( PT_STRING8, 0x3A27) -#define PR_BUSINESS_ADDRESS_CITY PR_LOCALITY -#define PR_BUSINESS_ADDRESS_CITY_W PR_LOCALITY_W -#define PR_BUSINESS_ADDRESS_CITY_A PR_LOCALITY_A - -#define PR_STATE_OR_PROVINCE PROP_TAG( PT_TSTRING, 0x3A28) -#define PR_STATE_OR_PROVINCE_W PROP_TAG( PT_UNICODE, 0x3A28) -#define PR_STATE_OR_PROVINCE_A PROP_TAG( PT_STRING8, 0x3A28) -#define PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE PR_STATE_OR_PROVINCE -#define PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE_W PR_STATE_OR_PROVINCE_W -#define PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE_A PR_STATE_OR_PROVINCE_A - -#define PR_STREET_ADDRESS PROP_TAG( PT_TSTRING, 0x3A29) -#define PR_STREET_ADDRESS_W PROP_TAG( PT_UNICODE, 0x3A29) -#define PR_STREET_ADDRESS_A PROP_TAG( PT_STRING8, 0x3A29) -#define PR_BUSINESS_ADDRESS_STREET PR_STREET_ADDRESS -#define PR_BUSINESS_ADDRESS_STREET_W PR_STREET_ADDRESS_W -#define PR_BUSINESS_ADDRESS_STREET_A PR_STREET_ADDRESS_A - -#define PR_POSTAL_CODE PROP_TAG( PT_TSTRING, 0x3A2A) -#define PR_POSTAL_CODE_W PROP_TAG( PT_UNICODE, 0x3A2A) -#define PR_POSTAL_CODE_A PROP_TAG( PT_STRING8, 0x3A2A) -#define PR_BUSINESS_ADDRESS_POSTAL_CODE PR_POSTAL_CODE -#define PR_BUSINESS_ADDRESS_POSTAL_CODE_W PR_POSTAL_CODE_W -#define PR_BUSINESS_ADDRESS_POSTAL_CODE_A PR_POSTAL_CODE_A - - -#define PR_POST_OFFICE_BOX PROP_TAG( PT_TSTRING, 0x3A2B) -#define PR_POST_OFFICE_BOX_W PROP_TAG( PT_UNICODE, 0x3A2B) -#define PR_POST_OFFICE_BOX_A PROP_TAG( PT_STRING8, 0x3A2B) -#define PR_BUSINESS_ADDRESS_POST_OFFICE_BOX PR_POST_OFFICE_BOX -#define PR_BUSINESS_ADDRESS_POST_OFFICE_BOX_W PR_POST_OFFICE_BOX_W -#define PR_BUSINESS_ADDRESS_POST_OFFICE_BOX_A PR_POST_OFFICE_BOX_A - - -#define PR_TELEX_NUMBER PROP_TAG( PT_TSTRING, 0x3A2C) -#define PR_TELEX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2C) -#define PR_TELEX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2C) -#define PR_ISDN_NUMBER PROP_TAG( PT_TSTRING, 0x3A2D) -#define PR_ISDN_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2D) -#define PR_ISDN_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2D) -#define PR_ASSISTANT_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A2E) -#define PR_ASSISTANT_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2E) -#define PR_ASSISTANT_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2E) -#define PR_HOME2_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A2F) -#define PR_HOME2_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2F) -#define PR_HOME2_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2F) -#define PR_ASSISTANT PROP_TAG( PT_TSTRING, 0x3A30) -#define PR_ASSISTANT_W PROP_TAG( PT_UNICODE, 0x3A30) -#define PR_ASSISTANT_A PROP_TAG( PT_STRING8, 0x3A30) -#define PR_SEND_RICH_INFO PROP_TAG( PT_BOOLEAN, 0x3A40) - -#define PR_WEDDING_ANNIVERSARY PROP_TAG( PT_SYSTIME, 0x3A41) -#define PR_BIRTHDAY PROP_TAG( PT_SYSTIME, 0x3A42) - - -#define PR_HOBBIES PROP_TAG( PT_TSTRING, 0x3A43) -#define PR_HOBBIES_W PROP_TAG( PT_UNICODE, 0x3A43) -#define PR_HOBBIES_A PROP_TAG( PT_STRING8, 0x3A43) - -#define PR_MIDDLE_NAME PROP_TAG( PT_TSTRING, 0x3A44) -#define PR_MIDDLE_NAME_W PROP_TAG( PT_UNICODE, 0x3A44) -#define PR_MIDDLE_NAME_A PROP_TAG( PT_STRING8, 0x3A44) - -#define PR_DISPLAY_NAME_PREFIX PROP_TAG( PT_TSTRING, 0x3A45) -#define PR_DISPLAY_NAME_PREFIX_W PROP_TAG( PT_UNICODE, 0x3A45) -#define PR_DISPLAY_NAME_PREFIX_A PROP_TAG( PT_STRING8, 0x3A45) - -#define PR_PROFESSION PROP_TAG( PT_TSTRING, 0x3A46) -#define PR_PROFESSION_W PROP_TAG( PT_UNICODE, 0x3A46) -#define PR_PROFESSION_A PROP_TAG( PT_STRING8, 0x3A46) - -#define PR_PREFERRED_BY_NAME PROP_TAG( PT_TSTRING, 0x3A47) -#define PR_PREFERRED_BY_NAME_W PROP_TAG( PT_UNICODE, 0x3A47) -#define PR_PREFERRED_BY_NAME_A PROP_TAG( PT_STRING8, 0x3A47) - -#define PR_SPOUSE_NAME PROP_TAG( PT_TSTRING, 0x3A48) -#define PR_SPOUSE_NAME_W PROP_TAG( PT_UNICODE, 0x3A48) -#define PR_SPOUSE_NAME_A PROP_TAG( PT_STRING8, 0x3A48) - -#define PR_COMPUTER_NETWORK_NAME PROP_TAG( PT_TSTRING, 0x3A49) -#define PR_COMPUTER_NETWORK_NAME_W PROP_TAG( PT_UNICODE, 0x3A49) -#define PR_COMPUTER_NETWORK_NAME_A PROP_TAG( PT_STRING8, 0x3A49) - -#define PR_CUSTOMER_ID PROP_TAG( PT_TSTRING, 0x3A4A) -#define PR_CUSTOMER_ID_W PROP_TAG( PT_UNICODE, 0x3A4A) -#define PR_CUSTOMER_ID_A PROP_TAG( PT_STRING8, 0x3A4A) - -#define PR_TTYTDD_PHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A4B) -#define PR_TTYTDD_PHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A4B) -#define PR_TTYTDD_PHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A4B) - -#define PR_FTP_SITE PROP_TAG( PT_TSTRING, 0x3A4C) -#define PR_FTP_SITE_W PROP_TAG( PT_UNICODE, 0x3A4C) -#define PR_FTP_SITE_A PROP_TAG( PT_STRING8, 0x3A4C) - -#define PR_GENDER PROP_TAG( PT_SHORT, 0x3A4D) - -#define PR_MANAGER_NAME PROP_TAG( PT_TSTRING, 0x3A4E) -#define PR_MANAGER_NAME_W PROP_TAG( PT_UNICODE, 0x3A4E) -#define PR_MANAGER_NAME_A PROP_TAG( PT_STRING8, 0x3A4E) - -#define PR_NICKNAME PROP_TAG( PT_TSTRING, 0x3A4F) -#define PR_NICKNAME_W PROP_TAG( PT_UNICODE, 0x3A4F) -#define PR_NICKNAME_A PROP_TAG( PT_STRING8, 0x3A4F) - -#define PR_PERSONAL_HOME_PAGE PROP_TAG( PT_TSTRING, 0x3A50) -#define PR_PERSONAL_HOME_PAGE_W PROP_TAG( PT_UNICODE, 0x3A50) -#define PR_PERSONAL_HOME_PAGE_A PROP_TAG( PT_STRING8, 0x3A50) - - -#define PR_BUSINESS_HOME_PAGE PROP_TAG( PT_TSTRING, 0x3A51) -#define PR_BUSINESS_HOME_PAGE_W PROP_TAG( PT_UNICODE, 0x3A51) -#define PR_BUSINESS_HOME_PAGE_A PROP_TAG( PT_STRING8, 0x3A51) - -#define PR_CONTACT_VERSION PROP_TAG( PT_CLSID, 0x3A52) -#define PR_CONTACT_ENTRYIDS PROP_TAG( PT_MV_BINARY, 0x3A53) - -#define PR_CONTACT_ADDRTYPES PROP_TAG( PT_MV_TSTRING, 0x3A54) -#define PR_CONTACT_ADDRTYPES_W PROP_TAG( PT_MV_UNICODE, 0x3A54) -#define PR_CONTACT_ADDRTYPES_A PROP_TAG( PT_MV_STRING8, 0x3A54) - -#define PR_CONTACT_DEFAULT_ADDRESS_INDEX PROP_TAG( PT_LONG, 0x3A55) - -#define PR_CONTACT_EMAIL_ADDRESSES PROP_TAG( PT_MV_TSTRING, 0x3A56) -#define PR_CONTACT_EMAIL_ADDRESSES_W PROP_TAG( PT_MV_UNICODE, 0x3A56) -#define PR_CONTACT_EMAIL_ADDRESSES_A PROP_TAG( PT_MV_STRING8, 0x3A56) - - -#define PR_COMPANY_MAIN_PHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A57) -#define PR_COMPANY_MAIN_PHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A57) -#define PR_COMPANY_MAIN_PHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A57) - -#define PR_CHILDRENS_NAMES PROP_TAG( PT_MV_TSTRING, 0x3A58) -#define PR_CHILDRENS_NAMES_W PROP_TAG( PT_MV_UNICODE, 0x3A58) -#define PR_CHILDRENS_NAMES_A PROP_TAG( PT_MV_STRING8, 0x3A58) - - - -#define PR_HOME_ADDRESS_CITY PROP_TAG( PT_TSTRING, 0x3A59) -#define PR_HOME_ADDRESS_CITY_W PROP_TAG( PT_UNICODE, 0x3A59) -#define PR_HOME_ADDRESS_CITY_A PROP_TAG( PT_STRING8, 0x3A59) - -#define PR_HOME_ADDRESS_COUNTRY PROP_TAG( PT_TSTRING, 0x3A5A) -#define PR_HOME_ADDRESS_COUNTRY_W PROP_TAG( PT_UNICODE, 0x3A5A) -#define PR_HOME_ADDRESS_COUNTRY_A PROP_TAG( PT_STRING8, 0x3A5A) - -#define PR_HOME_ADDRESS_POSTAL_CODE PROP_TAG( PT_TSTRING, 0x3A5B) -#define PR_HOME_ADDRESS_POSTAL_CODE_W PROP_TAG( PT_UNICODE, 0x3A5B) -#define PR_HOME_ADDRESS_POSTAL_CODE_A PROP_TAG( PT_STRING8, 0x3A5B) - -#define PR_HOME_ADDRESS_STATE_OR_PROVINCE PROP_TAG( PT_TSTRING, 0x3A5C) -#define PR_HOME_ADDRESS_STATE_OR_PROVINCE_W PROP_TAG( PT_UNICODE, 0x3A5C) -#define PR_HOME_ADDRESS_STATE_OR_PROVINCE_A PROP_TAG( PT_STRING8, 0x3A5C) - -#define PR_HOME_ADDRESS_STREET PROP_TAG( PT_TSTRING, 0x3A5D) -#define PR_HOME_ADDRESS_STREET_W PROP_TAG( PT_UNICODE, 0x3A5D) -#define PR_HOME_ADDRESS_STREET_A PROP_TAG( PT_STRING8, 0x3A5D) - -#define PR_HOME_ADDRESS_POST_OFFICE_BOX PROP_TAG( PT_TSTRING, 0x3A5E) -#define PR_HOME_ADDRESS_POST_OFFICE_BOX_W PROP_TAG( PT_UNICODE, 0x3A5E) -#define PR_HOME_ADDRESS_POST_OFFICE_BOX_A PROP_TAG( PT_STRING8, 0x3A5E) - -#define PR_OTHER_ADDRESS_CITY PROP_TAG( PT_TSTRING, 0x3A5F) -#define PR_OTHER_ADDRESS_CITY_W PROP_TAG( PT_UNICODE, 0x3A5F) -#define PR_OTHER_ADDRESS_CITY_A PROP_TAG( PT_STRING8, 0x3A5F) - -#define PR_OTHER_ADDRESS_COUNTRY PROP_TAG( PT_TSTRING, 0x3A60) -#define PR_OTHER_ADDRESS_COUNTRY_W PROP_TAG( PT_UNICODE, 0x3A60) -#define PR_OTHER_ADDRESS_COUNTRY_A PROP_TAG( PT_STRING8, 0x3A60) - -#define PR_OTHER_ADDRESS_POSTAL_CODE PROP_TAG( PT_TSTRING, 0x3A61) -#define PR_OTHER_ADDRESS_POSTAL_CODE_W PROP_TAG( PT_UNICODE, 0x3A61) -#define PR_OTHER_ADDRESS_POSTAL_CODE_A PROP_TAG( PT_STRING8, 0x3A61) - -#define PR_OTHER_ADDRESS_STATE_OR_PROVINCE PROP_TAG( PT_TSTRING, 0x3A62) -#define PR_OTHER_ADDRESS_STATE_OR_PROVINCE_W PROP_TAG( PT_UNICODE, 0x3A62) -#define PR_OTHER_ADDRESS_STATE_OR_PROVINCE_A PROP_TAG( PT_STRING8, 0x3A62) - -#define PR_OTHER_ADDRESS_STREET PROP_TAG( PT_TSTRING, 0x3A63) -#define PR_OTHER_ADDRESS_STREET_W PROP_TAG( PT_UNICODE, 0x3A63) -#define PR_OTHER_ADDRESS_STREET_A PROP_TAG( PT_STRING8, 0x3A63) - -#define PR_OTHER_ADDRESS_POST_OFFICE_BOX PROP_TAG( PT_TSTRING, 0x3A64) -#define PR_OTHER_ADDRESS_POST_OFFICE_BOX_W PROP_TAG( PT_UNICODE, 0x3A64) -#define PR_OTHER_ADDRESS_POST_OFFICE_BOX_A PROP_TAG( PT_STRING8, 0x3A64) - - -/* - * Profile section properties - */ - -#define PR_STORE_PROVIDERS PROP_TAG( PT_BINARY, 0x3D00) -#define PR_AB_PROVIDERS PROP_TAG( PT_BINARY, 0x3D01) -#define PR_TRANSPORT_PROVIDERS PROP_TAG( PT_BINARY, 0x3D02) - -#define PR_DEFAULT_PROFILE PROP_TAG( PT_BOOLEAN, 0x3D04) -#define PR_AB_SEARCH_PATH PROP_TAG( PT_MV_BINARY, 0x3D05) -#define PR_AB_DEFAULT_DIR PROP_TAG( PT_BINARY, 0x3D06) -#define PR_AB_DEFAULT_PAB PROP_TAG( PT_BINARY, 0x3D07) - -#define PR_FILTERING_HOOKS PROP_TAG( PT_BINARY, 0x3D08) -#define PR_SERVICE_NAME PROP_TAG( PT_TSTRING, 0x3D09) -#define PR_SERVICE_NAME_W PROP_TAG( PT_UNICODE, 0x3D09) -#define PR_SERVICE_NAME_A PROP_TAG( PT_STRING8, 0x3D09) -#define PR_SERVICE_DLL_NAME PROP_TAG( PT_TSTRING, 0x3D0A) -#define PR_SERVICE_DLL_NAME_W PROP_TAG( PT_UNICODE, 0x3D0A) -#define PR_SERVICE_DLL_NAME_A PROP_TAG( PT_STRING8, 0x3D0A) -#define PR_SERVICE_ENTRY_NAME PROP_TAG( PT_STRING8, 0x3D0B) -#define PR_SERVICE_UID PROP_TAG( PT_BINARY, 0x3D0C) -#define PR_SERVICE_EXTRA_UIDS PROP_TAG( PT_BINARY, 0x3D0D) -#define PR_SERVICES PROP_TAG( PT_BINARY, 0x3D0E) -#define PR_SERVICE_SUPPORT_FILES PROP_TAG( PT_MV_TSTRING, 0x3D0F) -#define PR_SERVICE_SUPPORT_FILES_W PROP_TAG( PT_MV_UNICODE, 0x3D0F) -#define PR_SERVICE_SUPPORT_FILES_A PROP_TAG( PT_MV_STRING8, 0x3D0F) -#define PR_SERVICE_DELETE_FILES PROP_TAG( PT_MV_TSTRING, 0x3D10) -#define PR_SERVICE_DELETE_FILES_W PROP_TAG( PT_MV_UNICODE, 0x3D10) -#define PR_SERVICE_DELETE_FILES_A PROP_TAG( PT_MV_STRING8, 0x3D10) -#define PR_AB_SEARCH_PATH_UPDATE PROP_TAG( PT_BINARY, 0x3D11) -#define PR_PROFILE_NAME PROP_TAG( PT_TSTRING, 0x3D12) -#define PR_PROFILE_NAME_A PROP_TAG( PT_STRING8, 0x3D12) -#define PR_PROFILE_NAME_W PROP_TAG( PT_UNICODE, 0x3D12) - -/* - * Status object properties - */ - -#define PR_IDENTITY_DISPLAY PROP_TAG( PT_TSTRING, 0x3E00) -#define PR_IDENTITY_DISPLAY_W PROP_TAG( PT_UNICODE, 0x3E00) -#define PR_IDENTITY_DISPLAY_A PROP_TAG( PT_STRING8, 0x3E00) -#define PR_IDENTITY_ENTRYID PROP_TAG( PT_BINARY, 0x3E01) -#define PR_RESOURCE_METHODS PROP_TAG( PT_LONG, 0x3E02) -#define PR_RESOURCE_TYPE PROP_TAG( PT_LONG, 0x3E03) -#define PR_STATUS_CODE PROP_TAG( PT_LONG, 0x3E04) -#define PR_IDENTITY_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3E05) -#define PR_OWN_STORE_ENTRYID PROP_TAG( PT_BINARY, 0x3E06) -#define PR_RESOURCE_PATH PROP_TAG( PT_TSTRING, 0x3E07) -#define PR_RESOURCE_PATH_W PROP_TAG( PT_UNICODE, 0x3E07) -#define PR_RESOURCE_PATH_A PROP_TAG( PT_STRING8, 0x3E07) -#define PR_STATUS_STRING PROP_TAG( PT_TSTRING, 0x3E08) -#define PR_STATUS_STRING_W PROP_TAG( PT_UNICODE, 0x3E08) -#define PR_STATUS_STRING_A PROP_TAG( PT_STRING8, 0x3E08) -#define PR_X400_DEFERRED_DELIVERY_CANCEL PROP_TAG( PT_BOOLEAN, 0x3E09) -#define PR_HEADER_FOLDER_ENTRYID PROP_TAG( PT_BINARY, 0x3E0A) -#define PR_REMOTE_PROGRESS PROP_TAG( PT_LONG, 0x3E0B) -#define PR_REMOTE_PROGRESS_TEXT PROP_TAG( PT_TSTRING, 0x3E0C) -#define PR_REMOTE_PROGRESS_TEXT_W PROP_TAG( PT_UNICODE, 0x3E0C) -#define PR_REMOTE_PROGRESS_TEXT_A PROP_TAG( PT_STRING8, 0x3E0C) -#define PR_REMOTE_VALIDATE_OK PROP_TAG( PT_BOOLEAN, 0x3E0D) - -/* - * Display table properties - */ - -#define PR_CONTROL_FLAGS PROP_TAG( PT_LONG, 0x3F00) -#define PR_CONTROL_STRUCTURE PROP_TAG( PT_BINARY, 0x3F01) -#define PR_CONTROL_TYPE PROP_TAG( PT_LONG, 0x3F02) -#define PR_DELTAX PROP_TAG( PT_LONG, 0x3F03) -#define PR_DELTAY PROP_TAG( PT_LONG, 0x3F04) -#define PR_XPOS PROP_TAG( PT_LONG, 0x3F05) -#define PR_YPOS PROP_TAG( PT_LONG, 0x3F06) -#define PR_CONTROL_ID PROP_TAG( PT_BINARY, 0x3F07) -#define PR_INITIAL_DETAILS_PANE PROP_TAG( PT_LONG, 0x3F08) - -/* - * Secure property id range - */ - -#define PROP_ID_SECURE_MIN 0x67F0 -#define PROP_ID_SECURE_MAX 0x67FF - - -#endif /* MAPITAGS_H */ - +/* + * M A P I T A G S . H + * + * Property tag definitions for standard properties of MAPI + * objects. + * + * The following ranges should be used for all property IDs. Note that + * property IDs for objects other than messages and recipients should + * all fall in the range 0x3000 to 0x3FFF: + * + * From To Kind of property + * -------------------------------- + * 0001 0BFF MAPI_defined envelope property + * 0C00 0DFF MAPI_defined per-recipient property + * 0E00 0FFF MAPI_defined non-transmittable property + * 1000 2FFF MAPI_defined message content property + * + * 3000 3FFF MAPI_defined property (usually not message or recipient) + * + * 4000 57FF Transport-defined envelope property + * 5800 5FFF Transport-defined per-recipient property + * 6000 65FF User-defined non-transmittable property + * 6600 67FF Provider-defined internal non-transmittable property + * 6800 7BFF Message class-defined content property + * 7C00 7FFF Message class-defined non-transmittable + * property + * + * 8000 FFFE User-defined Name-to-id mapped property + * + * The 3000-3FFF range is further subdivided as follows: + * + * From To Kind of property + * -------------------------------- + * 3000 33FF Common property such as display name, entry ID + * 3400 35FF Message store object + * 3600 36FF Folder or AB container + * 3700 38FF Attachment + * 3900 39FF Address book object + * 3A00 3BFF Mail user + * 3C00 3CFF Distribution list + * 3D00 3DFF Profile section + * 3E00 3FFF Status object + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPITAGS_H +#define MAPITAGS_H + +#if _MSC_VER > 1000 +#pragma once +#endif + +/* Determine if a property is transmittable. */ + +#define FIsTransmittable(ulPropTag) \ + ((PROP_ID (ulPropTag) < (ULONG)0x0E00) || \ + (PROP_ID (ulPropTag) >= (ULONG)0x8000) || \ + ((PROP_ID (ulPropTag) >= (ULONG)0x1000) && (PROP_ID (ulPropTag) < (ULONG)0x6000)) || \ + ((PROP_ID (ulPropTag) >= (ULONG)0x6800) && (PROP_ID (ulPropTag) < (ULONG)0x7C00))) + +/* + * Message envelope properties + */ + +#define PR_ACKNOWLEDGEMENT_MODE PROP_TAG( PT_LONG, 0x0001) +#define PR_ALTERNATE_RECIPIENT_ALLOWED PROP_TAG( PT_BOOLEAN, 0x0002) +#define PR_AUTHORIZING_USERS PROP_TAG( PT_BINARY, 0x0003) +#define PR_AUTO_FORWARD_COMMENT PROP_TAG( PT_TSTRING, 0x0004) +#define PR_AUTO_FORWARD_COMMENT_W PROP_TAG( PT_UNICODE, 0x0004) +#define PR_AUTO_FORWARD_COMMENT_A PROP_TAG( PT_STRING8, 0x0004) +#define PR_AUTO_FORWARDED PROP_TAG( PT_BOOLEAN, 0x0005) +#define PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID PROP_TAG( PT_BINARY, 0x0006) +#define PR_CONTENT_CORRELATOR PROP_TAG( PT_BINARY, 0x0007) +#define PR_CONTENT_IDENTIFIER PROP_TAG( PT_TSTRING, 0x0008) +#define PR_CONTENT_IDENTIFIER_W PROP_TAG( PT_UNICODE, 0x0008) +#define PR_CONTENT_IDENTIFIER_A PROP_TAG( PT_STRING8, 0x0008) +#define PR_CONTENT_LENGTH PROP_TAG( PT_LONG, 0x0009) +#define PR_CONTENT_RETURN_REQUESTED PROP_TAG( PT_BOOLEAN, 0x000A) + + + +#define PR_CONVERSATION_KEY PROP_TAG( PT_BINARY, 0x000B) + +#define PR_CONVERSION_EITS PROP_TAG( PT_BINARY, 0x000C) +#define PR_CONVERSION_WITH_LOSS_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x000D) +#define PR_CONVERTED_EITS PROP_TAG( PT_BINARY, 0x000E) +#define PR_DEFERRED_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x000F) +#define PR_DELIVER_TIME PROP_TAG( PT_SYSTIME, 0x0010) +#define PR_DISCARD_REASON PROP_TAG( PT_LONG, 0x0011) +#define PR_DISCLOSURE_OF_RECIPIENTS PROP_TAG( PT_BOOLEAN, 0x0012) +#define PR_DL_EXPANSION_HISTORY PROP_TAG( PT_BINARY, 0x0013) +#define PR_DL_EXPANSION_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x0014) +#define PR_EXPIRY_TIME PROP_TAG( PT_SYSTIME, 0x0015) +#define PR_IMPLICIT_CONVERSION_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x0016) +#define PR_IMPORTANCE PROP_TAG( PT_LONG, 0x0017) +#define PR_IPM_ID PROP_TAG( PT_BINARY, 0x0018) +#define PR_LATEST_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x0019) +#define PR_MESSAGE_CLASS PROP_TAG( PT_TSTRING, 0x001A) +#define PR_MESSAGE_CLASS_W PROP_TAG( PT_UNICODE, 0x001A) +#define PR_MESSAGE_CLASS_A PROP_TAG( PT_STRING8, 0x001A) +#define PR_MESSAGE_DELIVERY_ID PROP_TAG( PT_BINARY, 0x001B) + + + + + +#define PR_MESSAGE_SECURITY_LABEL PROP_TAG( PT_BINARY, 0x001E) +#define PR_OBSOLETED_IPMS PROP_TAG( PT_BINARY, 0x001F) +#define PR_ORIGINALLY_INTENDED_RECIPIENT_NAME PROP_TAG( PT_BINARY, 0x0020) +#define PR_ORIGINAL_EITS PROP_TAG( PT_BINARY, 0x0021) +#define PR_ORIGINATOR_CERTIFICATE PROP_TAG( PT_BINARY, 0x0022) +#define PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0023) +#define PR_ORIGINATOR_RETURN_ADDRESS PROP_TAG( PT_BINARY, 0x0024) + + + +#define PR_PARENT_KEY PROP_TAG( PT_BINARY, 0x0025) +#define PR_PRIORITY PROP_TAG( PT_LONG, 0x0026) + + + +#define PR_ORIGIN_CHECK PROP_TAG( PT_BINARY, 0x0027) +#define PR_PROOF_OF_SUBMISSION_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0028) +#define PR_READ_RECEIPT_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0029) +#define PR_RECEIPT_TIME PROP_TAG( PT_SYSTIME, 0x002A) +#define PR_RECIPIENT_REASSIGNMENT_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x002B) +#define PR_REDIRECTION_HISTORY PROP_TAG( PT_BINARY, 0x002C) +#define PR_RELATED_IPMS PROP_TAG( PT_BINARY, 0x002D) +#define PR_ORIGINAL_SENSITIVITY PROP_TAG( PT_LONG, 0x002E) +#define PR_LANGUAGES PROP_TAG( PT_TSTRING, 0x002F) +#define PR_LANGUAGES_W PROP_TAG( PT_UNICODE, 0x002F) +#define PR_LANGUAGES_A PROP_TAG( PT_STRING8, 0x002F) +#define PR_REPLY_TIME PROP_TAG( PT_SYSTIME, 0x0030) +#define PR_REPORT_TAG PROP_TAG( PT_BINARY, 0x0031) +#define PR_REPORT_TIME PROP_TAG( PT_SYSTIME, 0x0032) +#define PR_RETURNED_IPM PROP_TAG( PT_BOOLEAN, 0x0033) +#define PR_SECURITY PROP_TAG( PT_LONG, 0x0034) +#define PR_INCOMPLETE_COPY PROP_TAG( PT_BOOLEAN, 0x0035) +#define PR_SENSITIVITY PROP_TAG( PT_LONG, 0x0036) +#define PR_SUBJECT PROP_TAG( PT_TSTRING, 0x0037) +#define PR_SUBJECT_W PROP_TAG( PT_UNICODE, 0x0037) +#define PR_SUBJECT_A PROP_TAG( PT_STRING8, 0x0037) +#define PR_SUBJECT_IPM PROP_TAG( PT_BINARY, 0x0038) +#define PR_CLIENT_SUBMIT_TIME PROP_TAG( PT_SYSTIME, 0x0039) +#define PR_REPORT_NAME PROP_TAG( PT_TSTRING, 0x003A) +#define PR_REPORT_NAME_W PROP_TAG( PT_UNICODE, 0x003A) +#define PR_REPORT_NAME_A PROP_TAG( PT_STRING8, 0x003A) +#define PR_SENT_REPRESENTING_SEARCH_KEY PROP_TAG( PT_BINARY, 0x003B) +#define PR_X400_CONTENT_TYPE PROP_TAG( PT_BINARY, 0x003C) +#define PR_SUBJECT_PREFIX PROP_TAG( PT_TSTRING, 0x003D) +#define PR_SUBJECT_PREFIX_W PROP_TAG( PT_UNICODE, 0x003D) +#define PR_SUBJECT_PREFIX_A PROP_TAG( PT_STRING8, 0x003D) +#define PR_NON_RECEIPT_REASON PROP_TAG( PT_LONG, 0x003E) +#define PR_RECEIVED_BY_ENTRYID PROP_TAG( PT_BINARY, 0x003F) +#define PR_RECEIVED_BY_NAME PROP_TAG( PT_TSTRING, 0x0040) +#define PR_RECEIVED_BY_NAME_W PROP_TAG( PT_UNICODE, 0x0040) +#define PR_RECEIVED_BY_NAME_A PROP_TAG( PT_STRING8, 0x0040) +#define PR_SENT_REPRESENTING_ENTRYID PROP_TAG( PT_BINARY, 0x0041) +#define PR_SENT_REPRESENTING_NAME PROP_TAG( PT_TSTRING, 0x0042) +#define PR_SENT_REPRESENTING_NAME_W PROP_TAG( PT_UNICODE, 0x0042) +#define PR_SENT_REPRESENTING_NAME_A PROP_TAG( PT_STRING8, 0x0042) +#define PR_RCVD_REPRESENTING_ENTRYID PROP_TAG( PT_BINARY, 0x0043) +#define PR_RCVD_REPRESENTING_NAME PROP_TAG( PT_TSTRING, 0x0044) +#define PR_RCVD_REPRESENTING_NAME_W PROP_TAG( PT_UNICODE, 0x0044) +#define PR_RCVD_REPRESENTING_NAME_A PROP_TAG( PT_STRING8, 0x0044) +#define PR_REPORT_ENTRYID PROP_TAG( PT_BINARY, 0x0045) +#define PR_READ_RECEIPT_ENTRYID PROP_TAG( PT_BINARY, 0x0046) +#define PR_MESSAGE_SUBMISSION_ID PROP_TAG( PT_BINARY, 0x0047) +#define PR_PROVIDER_SUBMIT_TIME PROP_TAG( PT_SYSTIME, 0x0048) +#define PR_ORIGINAL_SUBJECT PROP_TAG( PT_TSTRING, 0x0049) +#define PR_ORIGINAL_SUBJECT_W PROP_TAG( PT_UNICODE, 0x0049) +#define PR_ORIGINAL_SUBJECT_A PROP_TAG( PT_STRING8, 0x0049) +#define PR_DISC_VAL PROP_TAG( PT_BOOLEAN, 0x004A) +#define PR_ORIG_MESSAGE_CLASS PROP_TAG( PT_TSTRING, 0x004B) +#define PR_ORIG_MESSAGE_CLASS_W PROP_TAG( PT_UNICODE, 0x004B) +#define PR_ORIG_MESSAGE_CLASS_A PROP_TAG( PT_STRING8, 0x004B) +#define PR_ORIGINAL_AUTHOR_ENTRYID PROP_TAG( PT_BINARY, 0x004C) +#define PR_ORIGINAL_AUTHOR_NAME PROP_TAG( PT_TSTRING, 0x004D) +#define PR_ORIGINAL_AUTHOR_NAME_W PROP_TAG( PT_UNICODE, 0x004D) +#define PR_ORIGINAL_AUTHOR_NAME_A PROP_TAG( PT_STRING8, 0x004D) +#define PR_ORIGINAL_SUBMIT_TIME PROP_TAG( PT_SYSTIME, 0x004E) +#define PR_REPLY_RECIPIENT_ENTRIES PROP_TAG( PT_BINARY, 0x004F) +#define PR_REPLY_RECIPIENT_NAMES PROP_TAG( PT_TSTRING, 0x0050) +#define PR_REPLY_RECIPIENT_NAMES_W PROP_TAG( PT_UNICODE, 0x0050) +#define PR_REPLY_RECIPIENT_NAMES_A PROP_TAG( PT_STRING8, 0x0050) + +#define PR_RECEIVED_BY_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0051) +#define PR_RCVD_REPRESENTING_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0052) +#define PR_READ_RECEIPT_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0053) +#define PR_REPORT_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0054) +#define PR_ORIGINAL_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x0055) +#define PR_ORIGINAL_AUTHOR_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0056) + +#define PR_MESSAGE_TO_ME PROP_TAG( PT_BOOLEAN, 0x0057) +#define PR_MESSAGE_CC_ME PROP_TAG( PT_BOOLEAN, 0x0058) +#define PR_MESSAGE_RECIP_ME PROP_TAG( PT_BOOLEAN, 0x0059) + +#define PR_ORIGINAL_SENDER_NAME PROP_TAG( PT_TSTRING, 0x005A) +#define PR_ORIGINAL_SENDER_NAME_W PROP_TAG( PT_UNICODE, 0x005A) +#define PR_ORIGINAL_SENDER_NAME_A PROP_TAG( PT_STRING8, 0x005A) +#define PR_ORIGINAL_SENDER_ENTRYID PROP_TAG( PT_BINARY, 0x005B) +#define PR_ORIGINAL_SENDER_SEARCH_KEY PROP_TAG( PT_BINARY, 0x005C) +#define PR_ORIGINAL_SENT_REPRESENTING_NAME PROP_TAG( PT_TSTRING, 0x005D) +#define PR_ORIGINAL_SENT_REPRESENTING_NAME_W PROP_TAG( PT_UNICODE, 0x005D) +#define PR_ORIGINAL_SENT_REPRESENTING_NAME_A PROP_TAG( PT_STRING8, 0x005D) +#define PR_ORIGINAL_SENT_REPRESENTING_ENTRYID PROP_TAG( PT_BINARY, 0x005E) +#define PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY PROP_TAG( PT_BINARY, 0x005F) + +#define PR_START_DATE PROP_TAG( PT_SYSTIME, 0x0060) +#define PR_END_DATE PROP_TAG( PT_SYSTIME, 0x0061) +#define PR_OWNER_APPT_ID PROP_TAG( PT_LONG, 0x0062) +#define PR_RESPONSE_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0063) + +#define PR_SENT_REPRESENTING_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0064) +#define PR_SENT_REPRESENTING_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0064) +#define PR_SENT_REPRESENTING_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0064) +#define PR_SENT_REPRESENTING_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0065) +#define PR_SENT_REPRESENTING_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0065) +#define PR_SENT_REPRESENTING_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0065) + +#define PR_ORIGINAL_SENDER_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0066) +#define PR_ORIGINAL_SENDER_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0066) +#define PR_ORIGINAL_SENDER_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0066) +#define PR_ORIGINAL_SENDER_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0067) +#define PR_ORIGINAL_SENDER_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0067) +#define PR_ORIGINAL_SENDER_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0067) + +#define PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0068) +#define PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0068) +#define PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0068) +#define PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0069) +#define PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0069) +#define PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0069) + +#define PR_CONVERSATION_TOPIC PROP_TAG( PT_TSTRING, 0x0070) +#define PR_CONVERSATION_TOPIC_W PROP_TAG( PT_UNICODE, 0x0070) +#define PR_CONVERSATION_TOPIC_A PROP_TAG( PT_STRING8, 0x0070) +#define PR_CONVERSATION_ID PROP_TAG( PT_BINARY, 0x3013) +#define PR_CONVERSATION_INDEX PROP_TAG( PT_BINARY, 0x0071) + +#define PR_ORIGINAL_DISPLAY_BCC PROP_TAG( PT_TSTRING, 0x0072) +#define PR_ORIGINAL_DISPLAY_BCC_W PROP_TAG( PT_UNICODE, 0x0072) +#define PR_ORIGINAL_DISPLAY_BCC_A PROP_TAG( PT_STRING8, 0x0072) +#define PR_ORIGINAL_DISPLAY_CC PROP_TAG( PT_TSTRING, 0x0073) +#define PR_ORIGINAL_DISPLAY_CC_W PROP_TAG( PT_UNICODE, 0x0073) +#define PR_ORIGINAL_DISPLAY_CC_A PROP_TAG( PT_STRING8, 0x0073) +#define PR_ORIGINAL_DISPLAY_TO PROP_TAG( PT_TSTRING, 0x0074) +#define PR_ORIGINAL_DISPLAY_TO_W PROP_TAG( PT_UNICODE, 0x0074) +#define PR_ORIGINAL_DISPLAY_TO_A PROP_TAG( PT_STRING8, 0x0074) + +#define PR_RECEIVED_BY_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0075) +#define PR_RECEIVED_BY_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0075) +#define PR_RECEIVED_BY_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0075) +#define PR_RECEIVED_BY_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0076) +#define PR_RECEIVED_BY_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0076) +#define PR_RECEIVED_BY_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0076) + +#define PR_RCVD_REPRESENTING_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0077) +#define PR_RCVD_REPRESENTING_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0077) +#define PR_RCVD_REPRESENTING_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0077) +#define PR_RCVD_REPRESENTING_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0078) +#define PR_RCVD_REPRESENTING_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0078) +#define PR_RCVD_REPRESENTING_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0078) + +#define PR_ORIGINAL_AUTHOR_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0079) +#define PR_ORIGINAL_AUTHOR_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0079) +#define PR_ORIGINAL_AUTHOR_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0079) +#define PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x007A) +#define PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x007A) +#define PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x007A) + +#define PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE PROP_TAG( PT_TSTRING, 0x007B) +#define PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x007B) +#define PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x007B) +#define PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x007C) +#define PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x007C) +#define PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x007C) + +#define PR_TRANSPORT_MESSAGE_HEADERS PROP_TAG(PT_TSTRING, 0x007D) +#define PR_TRANSPORT_MESSAGE_HEADERS_W PROP_TAG(PT_UNICODE, 0x007D) +#define PR_TRANSPORT_MESSAGE_HEADERS_A PROP_TAG(PT_STRING8, 0x007D) + +#define PR_DELEGATION PROP_TAG(PT_BINARY, 0x007E) + +#define PR_TNEF_CORRELATION_KEY PROP_TAG(PT_BINARY, 0x007F) + + + +/* + * Message content properties + */ + +#define PR_BODY PROP_TAG( PT_TSTRING, 0x1000) +#define PR_BODY_W PROP_TAG( PT_UNICODE, 0x1000) +#define PR_BODY_A PROP_TAG( PT_STRING8, 0x1000) +#define PR_REPORT_TEXT PROP_TAG( PT_TSTRING, 0x1001) +#define PR_REPORT_TEXT_W PROP_TAG( PT_UNICODE, 0x1001) +#define PR_REPORT_TEXT_A PROP_TAG( PT_STRING8, 0x1001) +#define PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY PROP_TAG( PT_BINARY, 0x1002) +#define PR_REPORTING_DL_NAME PROP_TAG( PT_BINARY, 0x1003) +#define PR_REPORTING_MTA_CERTIFICATE PROP_TAG( PT_BINARY, 0x1004) + +/* Removed PR_REPORT_ORIGIN_AUTHENTICATION_CHECK with DCR 3865, use PR_ORIGIN_CHECK */ + +#define PR_RTF_SYNC_BODY_CRC PROP_TAG( PT_LONG, 0x1006) +#define PR_RTF_SYNC_BODY_COUNT PROP_TAG( PT_LONG, 0x1007) +#define PR_RTF_SYNC_BODY_TAG PROP_TAG( PT_TSTRING, 0x1008) +#define PR_RTF_SYNC_BODY_TAG_W PROP_TAG( PT_UNICODE, 0x1008) +#define PR_RTF_SYNC_BODY_TAG_A PROP_TAG( PT_STRING8, 0x1008) +#define PR_RTF_COMPRESSED PROP_TAG( PT_BINARY, 0x1009) +#define PR_RTF_SYNC_PREFIX_COUNT PROP_TAG( PT_LONG, 0x1010) +#define PR_RTF_SYNC_TRAILING_COUNT PROP_TAG( PT_LONG, 0x1011) +#define PR_ORIGINALLY_INTENDED_RECIP_ENTRYID PROP_TAG( PT_BINARY, 0x1012) + +#define PR_HTML PROP_TAG( PT_BINARY, 0x1013) +#define PR_NATIVE_BODY_INFO PROP_TAG( PT_LONG, 0x1016) +#define PR_INTERNET_MESSAGE_ID PROP_TAG( PT_TSTRING, 0x1035) +#define PR_INTERNET_MESSAGE_ID_W PROP_TAG( PT_UNICODE, 0x1035) +#define PR_INTERNET_MESSAGE_ID_A PROP_TAG( PT_STRING8, 0x1035) +#define PR_INTERNET_REFERENCES PROP_TAG( PT_TSTRING, 0x1039) +#define PR_INTERNET_REFERENCES_W PROP_TAG( PT_UNICODE, 0x1039) +#define PR_INTERNET_REFERENCES_A PROP_TAG( PT_STRING8, 0x1039) +#define PR_IN_REPLY_TO PROP_TAG( PT_TSTRING, 0x1042) +#define PR_IN_REPLY_TO_W PROP_TAG( PT_UNICODE, 0x1042) +#define PR_IN_REPLY_TO_A PROP_TAG( PT_STRING8, 0x1042) +#define PR_ICON_INDEX PROP_TAG( PT_LONG, 0x1080) +#define PR_FLAG_STATUS PROP_TAG( PT_LONG, 0x1090) +#define PR_BLOCK_STATUS PROP_TAG( PT_LONG, 0x1096) + +/* + * Reserved 0x1100-0x1200 + */ + + +/* + * Message recipient properties + */ + +#define PR_CONTENT_INTEGRITY_CHECK PROP_TAG( PT_BINARY, 0x0C00) +#define PR_EXPLICIT_CONVERSION PROP_TAG( PT_LONG, 0x0C01) +#define PR_IPM_RETURN_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C02) +#define PR_MESSAGE_TOKEN PROP_TAG( PT_BINARY, 0x0C03) +#define PR_NDR_REASON_CODE PROP_TAG( PT_LONG, 0x0C04) +#define PR_NDR_DIAG_CODE PROP_TAG( PT_LONG, 0x0C05) +#define PR_NON_RECEIPT_NOTIFICATION_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C06) +#define PR_DELIVERY_POINT PROP_TAG( PT_LONG, 0x0C07) + +#define PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C08) +#define PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT PROP_TAG( PT_BINARY, 0x0C09) +#define PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY PROP_TAG( PT_BOOLEAN, 0x0C0A) +#define PR_PHYSICAL_DELIVERY_MODE PROP_TAG( PT_LONG, 0x0C0B) +#define PR_PHYSICAL_DELIVERY_REPORT_REQUEST PROP_TAG( PT_LONG, 0x0C0C) +#define PR_PHYSICAL_FORWARDING_ADDRESS PROP_TAG( PT_BINARY, 0x0C0D) +#define PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C0E) +#define PR_PHYSICAL_FORWARDING_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x0C0F) +#define PR_PHYSICAL_RENDITION_ATTRIBUTES PROP_TAG( PT_BINARY, 0x0C10) +#define PR_PROOF_OF_DELIVERY PROP_TAG( PT_BINARY, 0x0C11) +#define PR_PROOF_OF_DELIVERY_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C12) +#define PR_RECIPIENT_CERTIFICATE PROP_TAG( PT_BINARY, 0x0C13) +#define PR_RECIPIENT_NUMBER_FOR_ADVICE PROP_TAG( PT_TSTRING, 0x0C14) +#define PR_RECIPIENT_NUMBER_FOR_ADVICE_W PROP_TAG( PT_UNICODE, 0x0C14) +#define PR_RECIPIENT_NUMBER_FOR_ADVICE_A PROP_TAG( PT_STRING8, 0x0C14) +#define PR_RECIPIENT_TYPE PROP_TAG( PT_LONG, 0x0C15) +#define PR_REGISTERED_MAIL_TYPE PROP_TAG( PT_LONG, 0x0C16) +#define PR_REPLY_REQUESTED PROP_TAG( PT_BOOLEAN, 0x0C17) +#define PR_REQUESTED_DELIVERY_METHOD PROP_TAG( PT_LONG, 0x0C18) +#define PR_SENDER_ENTRYID PROP_TAG( PT_BINARY, 0x0C19) +#define PR_SENDER_NAME PROP_TAG( PT_TSTRING, 0x0C1A) +#define PR_SENDER_NAME_W PROP_TAG( PT_UNICODE, 0x0C1A) +#define PR_SENDER_NAME_A PROP_TAG( PT_STRING8, 0x0C1A) +#define PR_SUPPLEMENTARY_INFO PROP_TAG( PT_TSTRING, 0x0C1B) +#define PR_SUPPLEMENTARY_INFO_W PROP_TAG( PT_UNICODE, 0x0C1B) +#define PR_SUPPLEMENTARY_INFO_A PROP_TAG( PT_STRING8, 0x0C1B) +#define PR_TYPE_OF_MTS_USER PROP_TAG( PT_LONG, 0x0C1C) +#define PR_SENDER_SEARCH_KEY PROP_TAG( PT_BINARY, 0x0C1D) +#define PR_SENDER_ADDRTYPE PROP_TAG( PT_TSTRING, 0x0C1E) +#define PR_SENDER_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x0C1E) +#define PR_SENDER_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x0C1E) +#define PR_SENDER_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x0C1F) +#define PR_SENDER_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x0C1F) +#define PR_SENDER_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x0C1F) + +/* + * Message non-transmittable properties + */ + +/* + * The two tags, PR_MESSAGE_RECIPIENTS and PR_MESSAGE_ATTACHMENTS, + * are to be used in the exclude list passed to + * IMessage::CopyTo when the caller wants either the recipients or attachments + * of the message to not get copied. It is also used in the ProblemArray + * return from IMessage::CopyTo when an error is encountered copying them + */ + +#define PR_CURRENT_VERSION PROP_TAG( PT_I8, 0x0E00) +#define PR_DELETE_AFTER_SUBMIT PROP_TAG( PT_BOOLEAN, 0x0E01) +#define PR_DISPLAY_BCC PROP_TAG( PT_TSTRING, 0x0E02) +#define PR_DISPLAY_BCC_W PROP_TAG( PT_UNICODE, 0x0E02) +#define PR_DISPLAY_BCC_A PROP_TAG( PT_STRING8, 0x0E02) +#define PR_DISPLAY_CC PROP_TAG( PT_TSTRING, 0x0E03) +#define PR_DISPLAY_CC_W PROP_TAG( PT_UNICODE, 0x0E03) +#define PR_DISPLAY_CC_A PROP_TAG( PT_STRING8, 0x0E03) +#define PR_DISPLAY_TO PROP_TAG( PT_TSTRING, 0x0E04) +#define PR_DISPLAY_TO_W PROP_TAG( PT_UNICODE, 0x0E04) +#define PR_DISPLAY_TO_A PROP_TAG( PT_STRING8, 0x0E04) +#define PR_PARENT_DISPLAY PROP_TAG( PT_TSTRING, 0x0E05) +#define PR_PARENT_DISPLAY_W PROP_TAG( PT_UNICODE, 0x0E05) +#define PR_PARENT_DISPLAY_A PROP_TAG( PT_STRING8, 0x0E05) +#define PR_MESSAGE_DELIVERY_TIME PROP_TAG( PT_SYSTIME, 0x0E06) +#define PR_MESSAGE_FLAGS PROP_TAG( PT_LONG, 0x0E07) +#define PR_MESSAGE_SIZE PROP_TAG( PT_LONG, 0x0E08) +#define PR_PARENT_ENTRYID PROP_TAG( PT_BINARY, 0x0E09) +#define PR_SENTMAIL_ENTRYID PROP_TAG( PT_BINARY, 0x0E0A) +#define PR_CORRELATE PROP_TAG( PT_BOOLEAN, 0x0E0C) +#define PR_CORRELATE_MTSID PROP_TAG( PT_BINARY, 0x0E0D) +#define PR_DISCRETE_VALUES PROP_TAG( PT_BOOLEAN, 0x0E0E) +#define PR_RESPONSIBILITY PROP_TAG( PT_BOOLEAN, 0x0E0F) +#define PR_SPOOLER_STATUS PROP_TAG( PT_LONG, 0x0E10) +#define PR_TRANSPORT_STATUS PROP_TAG( PT_LONG, 0x0E11) +#define PR_MESSAGE_RECIPIENTS PROP_TAG( PT_OBJECT, 0x0E12) +#define PR_MESSAGE_ATTACHMENTS PROP_TAG( PT_OBJECT, 0x0E13) +#define PR_SUBMIT_FLAGS PROP_TAG( PT_LONG, 0x0E14) +#define PR_RECIPIENT_STATUS PROP_TAG( PT_LONG, 0x0E15) +#define PR_TRANSPORT_KEY PROP_TAG( PT_LONG, 0x0E16) +#define PR_MSG_STATUS PROP_TAG( PT_LONG, 0x0E17) +#define PR_MESSAGE_DOWNLOAD_TIME PROP_TAG( PT_LONG, 0x0E18) +#define PR_CREATION_VERSION PROP_TAG( PT_I8, 0x0E19) +#define PR_MODIFY_VERSION PROP_TAG( PT_I8, 0x0E1A) +#define PR_HASATTACH PROP_TAG( PT_BOOLEAN, 0x0E1B) +#define PR_BODY_CRC PROP_TAG( PT_LONG, 0x0E1C) +#define PR_NORMALIZED_SUBJECT PROP_TAG( PT_TSTRING, 0x0E1D) +#define PR_NORMALIZED_SUBJECT_W PROP_TAG( PT_UNICODE, 0x0E1D) +#define PR_NORMALIZED_SUBJECT_A PROP_TAG( PT_STRING8, 0x0E1D) +#define PR_RTF_IN_SYNC PROP_TAG( PT_BOOLEAN, 0x0E1F) +#define PR_ATTACH_SIZE PROP_TAG( PT_LONG, 0x0E20) +#define PR_ATTACH_NUM PROP_TAG( PT_LONG, 0x0E21) +#define PR_PREPROCESS PROP_TAG( PT_BOOLEAN, 0x0E22) + +/* PR_ORIGINAL_DISPLAY_TO, _CC, and _BCC moved to transmittible range 03/09/95 */ + +#define PR_ORIGINATING_MTA_CERTIFICATE PROP_TAG( PT_BINARY, 0x0E25) +#define PR_PROOF_OF_SUBMISSION PROP_TAG( PT_BINARY, 0x0E26) + + +/* + * The range of non-message and non-recipient property IDs (0x3000 - 0x3FFF) is + * further broken down into ranges to make assigning new property IDs easier. + * + * From To Kind of property + * -------------------------------- + * 3000 32FF MAPI_defined common property + * 3200 33FF MAPI_defined form property + * 3400 35FF MAPI_defined message store property + * 3600 36FF MAPI_defined Folder or AB Container property + * 3700 38FF MAPI_defined attachment property + * 3900 39FF MAPI_defined address book property + * 3A00 3BFF MAPI_defined mailuser property + * 3C00 3CFF MAPI_defined DistList property + * 3D00 3DFF MAPI_defined Profile Section property + * 3E00 3EFF MAPI_defined Status property + * 3F00 3FFF MAPI_defined display table property + */ + +/* + * Properties common to numerous MAPI objects. + * + * Those properties that can appear on messages are in the + * non-transmittable range for messages. They start at the high + * end of that range and work down. + * + * Properties that never appear on messages are defined in the common + * property range (see above). + */ + +/* + * properties that are common to multiple objects (including message objects) + * -- these ids are in the non-transmittable range + */ + +#define PR_ENTRYID PROP_TAG( PT_BINARY, 0x0FFF) +#define PR_OBJECT_TYPE PROP_TAG( PT_LONG, 0x0FFE) +#define PR_ICON PROP_TAG( PT_BINARY, 0x0FFD) +#define PR_MINI_ICON PROP_TAG( PT_BINARY, 0x0FFC) +#define PR_STORE_ENTRYID PROP_TAG( PT_BINARY, 0x0FFB) +#define PR_STORE_RECORD_KEY PROP_TAG( PT_BINARY, 0x0FFA) +#define PR_RECORD_KEY PROP_TAG( PT_BINARY, 0x0FF9) +#define PR_MAPPING_SIGNATURE PROP_TAG( PT_BINARY, 0x0FF8) +#define PR_ACCESS_LEVEL PROP_TAG( PT_LONG, 0x0FF7) +#define PR_INSTANCE_KEY PROP_TAG( PT_BINARY, 0x0FF6) +#define PR_ROW_TYPE PROP_TAG( PT_LONG, 0x0FF5) +#define PR_ACCESS PROP_TAG( PT_LONG, 0x0FF4) + +/* + * properties that are common to multiple objects (usually not including message objects) + * -- these ids are in the transmittable range + */ + +#define PR_ROWID PROP_TAG( PT_LONG, 0x3000) +#define PR_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x3001) +#define PR_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x3001) +#define PR_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x3001) +#define PR_ADDRTYPE PROP_TAG( PT_TSTRING, 0x3002) +#define PR_ADDRTYPE_W PROP_TAG( PT_UNICODE, 0x3002) +#define PR_ADDRTYPE_A PROP_TAG( PT_STRING8, 0x3002) +#define PR_EMAIL_ADDRESS PROP_TAG( PT_TSTRING, 0x3003) +#define PR_EMAIL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x3003) +#define PR_EMAIL_ADDRESS_A PROP_TAG( PT_STRING8, 0x3003) +#define PR_COMMENT PROP_TAG( PT_TSTRING, 0x3004) +#define PR_COMMENT_W PROP_TAG( PT_UNICODE, 0x3004) +#define PR_COMMENT_A PROP_TAG( PT_STRING8, 0x3004) +#define PR_DEPTH PROP_TAG( PT_LONG, 0x3005) +#define PR_PROVIDER_DISPLAY PROP_TAG( PT_TSTRING, 0x3006) +#define PR_PROVIDER_DISPLAY_W PROP_TAG( PT_UNICODE, 0x3006) +#define PR_PROVIDER_DISPLAY_A PROP_TAG( PT_STRING8, 0x3006) +#define PR_CREATION_TIME PROP_TAG( PT_SYSTIME, 0x3007) +#define PR_LAST_MODIFICATION_TIME PROP_TAG( PT_SYSTIME, 0x3008) +#define PR_RESOURCE_FLAGS PROP_TAG( PT_LONG, 0x3009) +#define PR_PROVIDER_DLL_NAME PROP_TAG( PT_TSTRING, 0x300A) +#define PR_PROVIDER_DLL_NAME_W PROP_TAG( PT_UNICODE, 0x300A) +#define PR_PROVIDER_DLL_NAME_A PROP_TAG( PT_STRING8, 0x300A) +#define PR_SEARCH_KEY PROP_TAG( PT_BINARY, 0x300B) +#define PR_PROVIDER_UID PROP_TAG( PT_BINARY, 0x300C) +#define PR_PROVIDER_ORDINAL PROP_TAG( PT_LONG, 0x300D) + +/* + * MAPI Form properties + */ +#define PR_FORM_VERSION PROP_TAG(PT_TSTRING, 0x3301) +#define PR_FORM_VERSION_W PROP_TAG(PT_UNICODE, 0x3301) +#define PR_FORM_VERSION_A PROP_TAG(PT_STRING8, 0x3301) +#define PR_FORM_CLSID PROP_TAG(PT_CLSID, 0x3302) +#define PR_FORM_CONTACT_NAME PROP_TAG(PT_TSTRING, 0x3303) +#define PR_FORM_CONTACT_NAME_W PROP_TAG(PT_UNICODE, 0x3303) +#define PR_FORM_CONTACT_NAME_A PROP_TAG(PT_STRING8, 0x3303) +#define PR_FORM_CATEGORY PROP_TAG(PT_TSTRING, 0x3304) +#define PR_FORM_CATEGORY_W PROP_TAG(PT_UNICODE, 0x3304) +#define PR_FORM_CATEGORY_A PROP_TAG(PT_STRING8, 0x3304) +#define PR_FORM_CATEGORY_SUB PROP_TAG(PT_TSTRING, 0x3305) +#define PR_FORM_CATEGORY_SUB_W PROP_TAG(PT_UNICODE, 0x3305) +#define PR_FORM_CATEGORY_SUB_A PROP_TAG(PT_STRING8, 0x3305) +#define PR_FORM_HOST_MAP PROP_TAG(PT_MV_LONG, 0x3306) +#define PR_FORM_HIDDEN PROP_TAG(PT_BOOLEAN, 0x3307) +#define PR_FORM_DESIGNER_NAME PROP_TAG(PT_TSTRING, 0x3308) +#define PR_FORM_DESIGNER_NAME_W PROP_TAG(PT_UNICODE, 0x3308) +#define PR_FORM_DESIGNER_NAME_A PROP_TAG(PT_STRING8, 0x3308) +#define PR_FORM_DESIGNER_GUID PROP_TAG(PT_CLSID, 0x3309) +#define PR_FORM_MESSAGE_BEHAVIOR PROP_TAG(PT_LONG, 0x330A) + +/* + * Message store properties + */ + +#define PR_DEFAULT_STORE PROP_TAG( PT_BOOLEAN, 0x3400) +#define PR_STORE_SUPPORT_MASK PROP_TAG( PT_LONG, 0x340D) +#define PR_STORE_STATE PROP_TAG( PT_LONG, 0x340E) + +#define PR_IPM_SUBTREE_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3410) +#define PR_IPM_OUTBOX_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3411) +#define PR_IPM_WASTEBASKET_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3412) +#define PR_IPM_SENTMAIL_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3413) +#define PR_MDB_PROVIDER PROP_TAG( PT_BINARY, 0x3414) +#define PR_RECEIVE_FOLDER_SETTINGS PROP_TAG( PT_OBJECT, 0x3415) + +#define PR_VALID_FOLDER_MASK PROP_TAG( PT_LONG, 0x35DF) +#define PR_IPM_SUBTREE_ENTRYID PROP_TAG( PT_BINARY, 0x35E0) + +#define PR_IPM_OUTBOX_ENTRYID PROP_TAG( PT_BINARY, 0x35E2) +#define PR_IPM_WASTEBASKET_ENTRYID PROP_TAG( PT_BINARY, 0x35E3) +#define PR_IPM_SENTMAIL_ENTRYID PROP_TAG( PT_BINARY, 0x35E4) +#define PR_VIEWS_ENTRYID PROP_TAG( PT_BINARY, 0x35E5) +#define PR_COMMON_VIEWS_ENTRYID PROP_TAG( PT_BINARY, 0x35E6) +#define PR_FINDER_ENTRYID PROP_TAG( PT_BINARY, 0x35E7) + +/* Proptags 0x35E8-0x35FF reserved for folders "guaranteed" by PR_VALID_FOLDER_MASK */ + +/* + * Additional well-known folder ID properties + */ +#define PR_IPM_ARCHIVE_ENTRYID PROP_TAG( PT_BINARY, 0x35FF) + + +/* + * Folder and AB Container properties + */ + +#define PR_CONTAINER_FLAGS PROP_TAG( PT_LONG, 0x3600) +#define PR_FOLDER_TYPE PROP_TAG( PT_LONG, 0x3601) +#define PR_CONTENT_COUNT PROP_TAG( PT_LONG, 0x3602) +#define PR_CONTENT_UNREAD PROP_TAG( PT_LONG, 0x3603) +#define PR_CREATE_TEMPLATES PROP_TAG( PT_OBJECT, 0x3604) +#define PR_DETAILS_TABLE PROP_TAG( PT_OBJECT, 0x3605) +#define PR_SEARCH PROP_TAG( PT_OBJECT, 0x3607) +#define PR_SELECTABLE PROP_TAG( PT_BOOLEAN, 0x3609) +#define PR_SUBFOLDERS PROP_TAG( PT_BOOLEAN, 0x360A) +#define PR_STATUS PROP_TAG( PT_LONG, 0x360B) +#define PR_ANR PROP_TAG( PT_TSTRING, 0x360C) +#define PR_ANR_W PROP_TAG( PT_UNICODE, 0x360C) +#define PR_ANR_A PROP_TAG( PT_STRING8, 0x360C) +#define PR_CONTENTS_SORT_ORDER PROP_TAG( PT_MV_LONG, 0x360D) +#define PR_CONTAINER_HIERARCHY PROP_TAG( PT_OBJECT, 0x360E) +#define PR_CONTAINER_CONTENTS PROP_TAG( PT_OBJECT, 0x360F) +#define PR_FOLDER_ASSOCIATED_CONTENTS PROP_TAG( PT_OBJECT, 0x3610) +#define PR_DEF_CREATE_DL PROP_TAG( PT_BINARY, 0x3611) +#define PR_DEF_CREATE_MAILUSER PROP_TAG( PT_BINARY, 0x3612) +#define PR_CONTAINER_CLASS PROP_TAG( PT_TSTRING, 0x3613) +#define PR_CONTAINER_CLASS_W PROP_TAG( PT_UNICODE, 0x3613) +#define PR_CONTAINER_CLASS_A PROP_TAG( PT_STRING8, 0x3613) +#define PR_CONTAINER_MODIFY_VERSION PROP_TAG( PT_I8, 0x3614) +#define PR_AB_PROVIDER_ID PROP_TAG( PT_BINARY, 0x3615) +#define PR_DEFAULT_VIEW_ENTRYID PROP_TAG( PT_BINARY, 0x3616) +#define PR_ASSOC_CONTENT_COUNT PROP_TAG( PT_LONG, 0x3617) + + +/* + * Additional well-known folder ID properties + * https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/opening-a-message-store-folder + */ +#define PR_IPM_APPOINTMENT_ENTRYID PROP_TAG( PT_BINARY, 0x36D0) +#define PR_IPM_CONTACT_ENTRYID PROP_TAG( PT_BINARY, 0x36D1) +#define PR_IPM_TASK_ENTRYID PROP_TAG( PT_BINARY, 0x36D4) +#define PR_IPM_DRAFTS_ENTRYID PROP_TAG( PT_BINARY, 0x36D7) + + +/* Reserved 0x36C0-0x36FF */ + +/* + * Attachment properties + */ + +#define PR_ATTACHMENT_X400_PARAMETERS PROP_TAG( PT_BINARY, 0x3700) +#define PR_ATTACH_DATA_OBJ PROP_TAG( PT_OBJECT, 0x3701) +#define PR_ATTACH_DATA_BIN PROP_TAG( PT_BINARY, 0x3701) +#define PR_ATTACH_ENCODING PROP_TAG( PT_BINARY, 0x3702) +#define PR_ATTACH_EXTENSION PROP_TAG( PT_TSTRING, 0x3703) +#define PR_ATTACH_EXTENSION_W PROP_TAG( PT_UNICODE, 0x3703) +#define PR_ATTACH_EXTENSION_A PROP_TAG( PT_STRING8, 0x3703) +#define PR_ATTACH_FILENAME PROP_TAG( PT_TSTRING, 0x3704) +#define PR_ATTACH_FILENAME_W PROP_TAG( PT_UNICODE, 0x3704) +#define PR_ATTACH_FILENAME_A PROP_TAG( PT_STRING8, 0x3704) +#define PR_ATTACH_METHOD PROP_TAG( PT_LONG, 0x3705) +#define PR_ATTACH_LONG_FILENAME PROP_TAG( PT_TSTRING, 0x3707) +#define PR_ATTACH_LONG_FILENAME_W PROP_TAG( PT_UNICODE, 0x3707) +#define PR_ATTACH_LONG_FILENAME_A PROP_TAG( PT_STRING8, 0x3707) +#define PR_ATTACH_PATHNAME PROP_TAG( PT_TSTRING, 0x3708) +#define PR_ATTACH_PATHNAME_W PROP_TAG( PT_UNICODE, 0x3708) +#define PR_ATTACH_PATHNAME_A PROP_TAG( PT_STRING8, 0x3708) +#define PR_ATTACH_RENDERING PROP_TAG( PT_BINARY, 0x3709) +#define PR_ATTACH_TAG PROP_TAG( PT_BINARY, 0x370A) +#define PR_RENDERING_POSITION PROP_TAG( PT_LONG, 0x370B) +#define PR_ATTACH_TRANSPORT_NAME PROP_TAG( PT_TSTRING, 0x370C) +#define PR_ATTACH_TRANSPORT_NAME_W PROP_TAG( PT_UNICODE, 0x370C) +#define PR_ATTACH_TRANSPORT_NAME_A PROP_TAG( PT_STRING8, 0x370C) +#define PR_ATTACH_LONG_PATHNAME PROP_TAG( PT_TSTRING, 0x370D) +#define PR_ATTACH_LONG_PATHNAME_W PROP_TAG( PT_UNICODE, 0x370D) +#define PR_ATTACH_LONG_PATHNAME_A PROP_TAG( PT_STRING8, 0x370D) +#define PR_ATTACH_MIME_TAG PROP_TAG( PT_TSTRING, 0x370E) +#define PR_ATTACH_MIME_TAG_W PROP_TAG( PT_UNICODE, 0x370E) +#define PR_ATTACH_MIME_TAG_A PROP_TAG( PT_STRING8, 0x370E) +#define PR_ATTACH_ADDITIONAL_INFO PROP_TAG( PT_BINARY, 0x370F) + +/* + * AB Object properties + */ + +#define PR_DISPLAY_TYPE PROP_TAG( PT_LONG, 0x3900) +#define PR_TEMPLATEID PROP_TAG( PT_BINARY, 0x3902) +#define PR_PRIMARY_CAPABILITY PROP_TAG( PT_BINARY, 0x3904) +#define PR_SMTP_ADDRESS PROP_TAG( PT_TSTRING, 0x39FE) +#define PR_SMTP_ADDRESS_W PROP_TAG( PT_UNICODE, 0x39FE) +#define PR_SMTP_ADDRESS_A PROP_TAG( PT_STRING8, 0x39FE) + + +/* + * Mail user properties + */ +#define PR_7BIT_DISPLAY_NAME PROP_TAG( PT_STRING8, 0x39FF) +#define PR_ACCOUNT PROP_TAG( PT_TSTRING, 0x3A00) +#define PR_ACCOUNT_W PROP_TAG( PT_UNICODE, 0x3A00) +#define PR_ACCOUNT_A PROP_TAG( PT_STRING8, 0x3A00) +#define PR_ALTERNATE_RECIPIENT PROP_TAG( PT_BINARY, 0x3A01) +#define PR_CALLBACK_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A02) +#define PR_CALLBACK_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A02) +#define PR_CALLBACK_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A02) +#define PR_CONVERSION_PROHIBITED PROP_TAG( PT_BOOLEAN, 0x3A03) +#define PR_DISCLOSE_RECIPIENTS PROP_TAG( PT_BOOLEAN, 0x3A04) +#define PR_GENERATION PROP_TAG( PT_TSTRING, 0x3A05) +#define PR_GENERATION_W PROP_TAG( PT_UNICODE, 0x3A05) +#define PR_GENERATION_A PROP_TAG( PT_STRING8, 0x3A05) +#define PR_GIVEN_NAME PROP_TAG( PT_TSTRING, 0x3A06) +#define PR_GIVEN_NAME_W PROP_TAG( PT_UNICODE, 0x3A06) +#define PR_GIVEN_NAME_A PROP_TAG( PT_STRING8, 0x3A06) +#define PR_GOVERNMENT_ID_NUMBER PROP_TAG( PT_TSTRING, 0x3A07) +#define PR_GOVERNMENT_ID_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A07) +#define PR_GOVERNMENT_ID_NUMBER_A PROP_TAG( PT_STRING8, 0x3A07) +#define PR_BUSINESS_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A08) +#define PR_BUSINESS_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A08) +#define PR_BUSINESS_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A08) +#define PR_OFFICE_TELEPHONE_NUMBER PR_BUSINESS_TELEPHONE_NUMBER +#define PR_OFFICE_TELEPHONE_NUMBER_W PR_BUSINESS_TELEPHONE_NUMBER_W +#define PR_OFFICE_TELEPHONE_NUMBER_A PR_BUSINESS_TELEPHONE_NUMBER_A +#define PR_HOME_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A09) +#define PR_HOME_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A09) +#define PR_HOME_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A09) +#define PR_INITIALS PROP_TAG( PT_TSTRING, 0x3A0A) +#define PR_INITIALS_W PROP_TAG( PT_UNICODE, 0x3A0A) +#define PR_INITIALS_A PROP_TAG( PT_STRING8, 0x3A0A) +#define PR_KEYWORD PROP_TAG( PT_TSTRING, 0x3A0B) +#define PR_KEYWORD_W PROP_TAG( PT_UNICODE, 0x3A0B) +#define PR_KEYWORD_A PROP_TAG( PT_STRING8, 0x3A0B) +#define PR_LANGUAGE PROP_TAG( PT_TSTRING, 0x3A0C) +#define PR_LANGUAGE_W PROP_TAG( PT_UNICODE, 0x3A0C) +#define PR_LANGUAGE_A PROP_TAG( PT_STRING8, 0x3A0C) +#define PR_LOCATION PROP_TAG( PT_TSTRING, 0x3A0D) +#define PR_LOCATION_W PROP_TAG( PT_UNICODE, 0x3A0D) +#define PR_LOCATION_A PROP_TAG( PT_STRING8, 0x3A0D) +#define PR_MAIL_PERMISSION PROP_TAG( PT_BOOLEAN, 0x3A0E) +#define PR_MHS_COMMON_NAME PROP_TAG( PT_TSTRING, 0x3A0F) +#define PR_MHS_COMMON_NAME_W PROP_TAG( PT_UNICODE, 0x3A0F) +#define PR_MHS_COMMON_NAME_A PROP_TAG( PT_STRING8, 0x3A0F) +#define PR_ORGANIZATIONAL_ID_NUMBER PROP_TAG( PT_TSTRING, 0x3A10) +#define PR_ORGANIZATIONAL_ID_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A10) +#define PR_ORGANIZATIONAL_ID_NUMBER_A PROP_TAG( PT_STRING8, 0x3A10) +#define PR_SURNAME PROP_TAG( PT_TSTRING, 0x3A11) +#define PR_SURNAME_W PROP_TAG( PT_UNICODE, 0x3A11) +#define PR_SURNAME_A PROP_TAG( PT_STRING8, 0x3A11) +#define PR_ORIGINAL_ENTRYID PROP_TAG( PT_BINARY, 0x3A12) +#define PR_ORIGINAL_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x3A13) +#define PR_ORIGINAL_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x3A13) +#define PR_ORIGINAL_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x3A13) +#define PR_ORIGINAL_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3A14) +#define PR_POSTAL_ADDRESS PROP_TAG( PT_TSTRING, 0x3A15) +#define PR_POSTAL_ADDRESS_W PROP_TAG( PT_UNICODE, 0x3A15) +#define PR_POSTAL_ADDRESS_A PROP_TAG( PT_STRING8, 0x3A15) +#define PR_COMPANY_NAME PROP_TAG( PT_TSTRING, 0x3A16) +#define PR_COMPANY_NAME_W PROP_TAG( PT_UNICODE, 0x3A16) +#define PR_COMPANY_NAME_A PROP_TAG( PT_STRING8, 0x3A16) +#define PR_TITLE PROP_TAG( PT_TSTRING, 0x3A17) +#define PR_TITLE_W PROP_TAG( PT_UNICODE, 0x3A17) +#define PR_TITLE_A PROP_TAG( PT_STRING8, 0x3A17) +#define PR_DEPARTMENT_NAME PROP_TAG( PT_TSTRING, 0x3A18) +#define PR_DEPARTMENT_NAME_W PROP_TAG( PT_UNICODE, 0x3A18) +#define PR_DEPARTMENT_NAME_A PROP_TAG( PT_STRING8, 0x3A18) +#define PR_OFFICE_LOCATION PROP_TAG( PT_TSTRING, 0x3A19) +#define PR_OFFICE_LOCATION_W PROP_TAG( PT_UNICODE, 0x3A19) +#define PR_OFFICE_LOCATION_A PROP_TAG( PT_STRING8, 0x3A19) +#define PR_PRIMARY_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1A) +#define PR_PRIMARY_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1A) +#define PR_PRIMARY_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1A) +#define PR_BUSINESS2_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1B) +#define PR_BUSINESS2_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1B) +#define PR_BUSINESS2_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1B) +#define PR_OFFICE2_TELEPHONE_NUMBER PR_BUSINESS2_TELEPHONE_NUMBER +#define PR_OFFICE2_TELEPHONE_NUMBER_W PR_BUSINESS2_TELEPHONE_NUMBER_W +#define PR_OFFICE2_TELEPHONE_NUMBER_A PR_BUSINESS2_TELEPHONE_NUMBER_A +#define PR_MOBILE_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1C) +#define PR_MOBILE_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1C) +#define PR_MOBILE_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1C) +#define PR_CELLULAR_TELEPHONE_NUMBER PR_MOBILE_TELEPHONE_NUMBER +#define PR_CELLULAR_TELEPHONE_NUMBER_W PR_MOBILE_TELEPHONE_NUMBER_W +#define PR_CELLULAR_TELEPHONE_NUMBER_A PR_MOBILE_TELEPHONE_NUMBER_A +#define PR_RADIO_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1D) +#define PR_RADIO_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1D) +#define PR_RADIO_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1D) +#define PR_CAR_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1E) +#define PR_CAR_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1E) +#define PR_CAR_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1E) +#define PR_OTHER_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A1F) +#define PR_OTHER_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A1F) +#define PR_OTHER_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A1F) +#define PR_TRANSMITABLE_DISPLAY_NAME PROP_TAG( PT_TSTRING, 0x3A20) +#define PR_TRANSMITABLE_DISPLAY_NAME_W PROP_TAG( PT_UNICODE, 0x3A20) +#define PR_TRANSMITABLE_DISPLAY_NAME_A PROP_TAG( PT_STRING8, 0x3A20) +#define PR_PAGER_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A21) +#define PR_PAGER_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A21) +#define PR_PAGER_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A21) +#define PR_BEEPER_TELEPHONE_NUMBER PR_PAGER_TELEPHONE_NUMBER +#define PR_BEEPER_TELEPHONE_NUMBER_W PR_PAGER_TELEPHONE_NUMBER_W +#define PR_BEEPER_TELEPHONE_NUMBER_A PR_PAGER_TELEPHONE_NUMBER_A +#define PR_USER_CERTIFICATE PROP_TAG( PT_BINARY, 0x3A22) +#define PR_PRIMARY_FAX_NUMBER PROP_TAG( PT_TSTRING, 0x3A23) +#define PR_PRIMARY_FAX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A23) +#define PR_PRIMARY_FAX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A23) +#define PR_BUSINESS_FAX_NUMBER PROP_TAG( PT_TSTRING, 0x3A24) +#define PR_BUSINESS_FAX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A24) +#define PR_BUSINESS_FAX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A24) +#define PR_HOME_FAX_NUMBER PROP_TAG( PT_TSTRING, 0x3A25) +#define PR_HOME_FAX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A25) +#define PR_HOME_FAX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A25) +#define PR_COUNTRY PROP_TAG( PT_TSTRING, 0x3A26) +#define PR_COUNTRY_W PROP_TAG( PT_UNICODE, 0x3A26) +#define PR_COUNTRY_A PROP_TAG( PT_STRING8, 0x3A26) +#define PR_BUSINESS_ADDRESS_COUNTRY PR_COUNTRY +#define PR_BUSINESS_ADDRESS_COUNTRY_W PR_COUNTRY_W +#define PR_BUSINESS_ADDRESS_COUNTRY_A PR_COUNTRY_A + +#define PR_LOCALITY PROP_TAG( PT_TSTRING, 0x3A27) +#define PR_LOCALITY_W PROP_TAG( PT_UNICODE, 0x3A27) +#define PR_LOCALITY_A PROP_TAG( PT_STRING8, 0x3A27) +#define PR_BUSINESS_ADDRESS_CITY PR_LOCALITY +#define PR_BUSINESS_ADDRESS_CITY_W PR_LOCALITY_W +#define PR_BUSINESS_ADDRESS_CITY_A PR_LOCALITY_A + +#define PR_STATE_OR_PROVINCE PROP_TAG( PT_TSTRING, 0x3A28) +#define PR_STATE_OR_PROVINCE_W PROP_TAG( PT_UNICODE, 0x3A28) +#define PR_STATE_OR_PROVINCE_A PROP_TAG( PT_STRING8, 0x3A28) +#define PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE PR_STATE_OR_PROVINCE +#define PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE_W PR_STATE_OR_PROVINCE_W +#define PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE_A PR_STATE_OR_PROVINCE_A + +#define PR_STREET_ADDRESS PROP_TAG( PT_TSTRING, 0x3A29) +#define PR_STREET_ADDRESS_W PROP_TAG( PT_UNICODE, 0x3A29) +#define PR_STREET_ADDRESS_A PROP_TAG( PT_STRING8, 0x3A29) +#define PR_BUSINESS_ADDRESS_STREET PR_STREET_ADDRESS +#define PR_BUSINESS_ADDRESS_STREET_W PR_STREET_ADDRESS_W +#define PR_BUSINESS_ADDRESS_STREET_A PR_STREET_ADDRESS_A + +#define PR_POSTAL_CODE PROP_TAG( PT_TSTRING, 0x3A2A) +#define PR_POSTAL_CODE_W PROP_TAG( PT_UNICODE, 0x3A2A) +#define PR_POSTAL_CODE_A PROP_TAG( PT_STRING8, 0x3A2A) +#define PR_BUSINESS_ADDRESS_POSTAL_CODE PR_POSTAL_CODE +#define PR_BUSINESS_ADDRESS_POSTAL_CODE_W PR_POSTAL_CODE_W +#define PR_BUSINESS_ADDRESS_POSTAL_CODE_A PR_POSTAL_CODE_A + + +#define PR_POST_OFFICE_BOX PROP_TAG( PT_TSTRING, 0x3A2B) +#define PR_POST_OFFICE_BOX_W PROP_TAG( PT_UNICODE, 0x3A2B) +#define PR_POST_OFFICE_BOX_A PROP_TAG( PT_STRING8, 0x3A2B) +#define PR_BUSINESS_ADDRESS_POST_OFFICE_BOX PR_POST_OFFICE_BOX +#define PR_BUSINESS_ADDRESS_POST_OFFICE_BOX_W PR_POST_OFFICE_BOX_W +#define PR_BUSINESS_ADDRESS_POST_OFFICE_BOX_A PR_POST_OFFICE_BOX_A + + +#define PR_TELEX_NUMBER PROP_TAG( PT_TSTRING, 0x3A2C) +#define PR_TELEX_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2C) +#define PR_TELEX_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2C) +#define PR_ISDN_NUMBER PROP_TAG( PT_TSTRING, 0x3A2D) +#define PR_ISDN_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2D) +#define PR_ISDN_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2D) +#define PR_ASSISTANT_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A2E) +#define PR_ASSISTANT_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2E) +#define PR_ASSISTANT_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2E) +#define PR_HOME2_TELEPHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A2F) +#define PR_HOME2_TELEPHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A2F) +#define PR_HOME2_TELEPHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A2F) +#define PR_ASSISTANT PROP_TAG( PT_TSTRING, 0x3A30) +#define PR_ASSISTANT_W PROP_TAG( PT_UNICODE, 0x3A30) +#define PR_ASSISTANT_A PROP_TAG( PT_STRING8, 0x3A30) +#define PR_SEND_RICH_INFO PROP_TAG( PT_BOOLEAN, 0x3A40) + +#define PR_WEDDING_ANNIVERSARY PROP_TAG( PT_SYSTIME, 0x3A41) +#define PR_BIRTHDAY PROP_TAG( PT_SYSTIME, 0x3A42) + + +#define PR_HOBBIES PROP_TAG( PT_TSTRING, 0x3A43) +#define PR_HOBBIES_W PROP_TAG( PT_UNICODE, 0x3A43) +#define PR_HOBBIES_A PROP_TAG( PT_STRING8, 0x3A43) + +#define PR_MIDDLE_NAME PROP_TAG( PT_TSTRING, 0x3A44) +#define PR_MIDDLE_NAME_W PROP_TAG( PT_UNICODE, 0x3A44) +#define PR_MIDDLE_NAME_A PROP_TAG( PT_STRING8, 0x3A44) + +#define PR_DISPLAY_NAME_PREFIX PROP_TAG( PT_TSTRING, 0x3A45) +#define PR_DISPLAY_NAME_PREFIX_W PROP_TAG( PT_UNICODE, 0x3A45) +#define PR_DISPLAY_NAME_PREFIX_A PROP_TAG( PT_STRING8, 0x3A45) + +#define PR_PROFESSION PROP_TAG( PT_TSTRING, 0x3A46) +#define PR_PROFESSION_W PROP_TAG( PT_UNICODE, 0x3A46) +#define PR_PROFESSION_A PROP_TAG( PT_STRING8, 0x3A46) + +#define PR_PREFERRED_BY_NAME PROP_TAG( PT_TSTRING, 0x3A47) +#define PR_PREFERRED_BY_NAME_W PROP_TAG( PT_UNICODE, 0x3A47) +#define PR_PREFERRED_BY_NAME_A PROP_TAG( PT_STRING8, 0x3A47) + +#define PR_SPOUSE_NAME PROP_TAG( PT_TSTRING, 0x3A48) +#define PR_SPOUSE_NAME_W PROP_TAG( PT_UNICODE, 0x3A48) +#define PR_SPOUSE_NAME_A PROP_TAG( PT_STRING8, 0x3A48) + +#define PR_COMPUTER_NETWORK_NAME PROP_TAG( PT_TSTRING, 0x3A49) +#define PR_COMPUTER_NETWORK_NAME_W PROP_TAG( PT_UNICODE, 0x3A49) +#define PR_COMPUTER_NETWORK_NAME_A PROP_TAG( PT_STRING8, 0x3A49) + +#define PR_CUSTOMER_ID PROP_TAG( PT_TSTRING, 0x3A4A) +#define PR_CUSTOMER_ID_W PROP_TAG( PT_UNICODE, 0x3A4A) +#define PR_CUSTOMER_ID_A PROP_TAG( PT_STRING8, 0x3A4A) + +#define PR_TTYTDD_PHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A4B) +#define PR_TTYTDD_PHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A4B) +#define PR_TTYTDD_PHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A4B) + +#define PR_FTP_SITE PROP_TAG( PT_TSTRING, 0x3A4C) +#define PR_FTP_SITE_W PROP_TAG( PT_UNICODE, 0x3A4C) +#define PR_FTP_SITE_A PROP_TAG( PT_STRING8, 0x3A4C) + +#define PR_GENDER PROP_TAG( PT_SHORT, 0x3A4D) + +#define PR_MANAGER_NAME PROP_TAG( PT_TSTRING, 0x3A4E) +#define PR_MANAGER_NAME_W PROP_TAG( PT_UNICODE, 0x3A4E) +#define PR_MANAGER_NAME_A PROP_TAG( PT_STRING8, 0x3A4E) + +#define PR_NICKNAME PROP_TAG( PT_TSTRING, 0x3A4F) +#define PR_NICKNAME_W PROP_TAG( PT_UNICODE, 0x3A4F) +#define PR_NICKNAME_A PROP_TAG( PT_STRING8, 0x3A4F) + +#define PR_PERSONAL_HOME_PAGE PROP_TAG( PT_TSTRING, 0x3A50) +#define PR_PERSONAL_HOME_PAGE_W PROP_TAG( PT_UNICODE, 0x3A50) +#define PR_PERSONAL_HOME_PAGE_A PROP_TAG( PT_STRING8, 0x3A50) + + +#define PR_BUSINESS_HOME_PAGE PROP_TAG( PT_TSTRING, 0x3A51) +#define PR_BUSINESS_HOME_PAGE_W PROP_TAG( PT_UNICODE, 0x3A51) +#define PR_BUSINESS_HOME_PAGE_A PROP_TAG( PT_STRING8, 0x3A51) + +#define PR_CONTACT_VERSION PROP_TAG( PT_CLSID, 0x3A52) +#define PR_CONTACT_ENTRYIDS PROP_TAG( PT_MV_BINARY, 0x3A53) + +#define PR_CONTACT_ADDRTYPES PROP_TAG( PT_MV_TSTRING, 0x3A54) +#define PR_CONTACT_ADDRTYPES_W PROP_TAG( PT_MV_UNICODE, 0x3A54) +#define PR_CONTACT_ADDRTYPES_A PROP_TAG( PT_MV_STRING8, 0x3A54) + +#define PR_CONTACT_DEFAULT_ADDRESS_INDEX PROP_TAG( PT_LONG, 0x3A55) + +#define PR_CONTACT_EMAIL_ADDRESSES PROP_TAG( PT_MV_TSTRING, 0x3A56) +#define PR_CONTACT_EMAIL_ADDRESSES_W PROP_TAG( PT_MV_UNICODE, 0x3A56) +#define PR_CONTACT_EMAIL_ADDRESSES_A PROP_TAG( PT_MV_STRING8, 0x3A56) + + +#define PR_COMPANY_MAIN_PHONE_NUMBER PROP_TAG( PT_TSTRING, 0x3A57) +#define PR_COMPANY_MAIN_PHONE_NUMBER_W PROP_TAG( PT_UNICODE, 0x3A57) +#define PR_COMPANY_MAIN_PHONE_NUMBER_A PROP_TAG( PT_STRING8, 0x3A57) + +#define PR_CHILDRENS_NAMES PROP_TAG( PT_MV_TSTRING, 0x3A58) +#define PR_CHILDRENS_NAMES_W PROP_TAG( PT_MV_UNICODE, 0x3A58) +#define PR_CHILDRENS_NAMES_A PROP_TAG( PT_MV_STRING8, 0x3A58) + + + +#define PR_HOME_ADDRESS_CITY PROP_TAG( PT_TSTRING, 0x3A59) +#define PR_HOME_ADDRESS_CITY_W PROP_TAG( PT_UNICODE, 0x3A59) +#define PR_HOME_ADDRESS_CITY_A PROP_TAG( PT_STRING8, 0x3A59) + +#define PR_HOME_ADDRESS_COUNTRY PROP_TAG( PT_TSTRING, 0x3A5A) +#define PR_HOME_ADDRESS_COUNTRY_W PROP_TAG( PT_UNICODE, 0x3A5A) +#define PR_HOME_ADDRESS_COUNTRY_A PROP_TAG( PT_STRING8, 0x3A5A) + +#define PR_HOME_ADDRESS_POSTAL_CODE PROP_TAG( PT_TSTRING, 0x3A5B) +#define PR_HOME_ADDRESS_POSTAL_CODE_W PROP_TAG( PT_UNICODE, 0x3A5B) +#define PR_HOME_ADDRESS_POSTAL_CODE_A PROP_TAG( PT_STRING8, 0x3A5B) + +#define PR_HOME_ADDRESS_STATE_OR_PROVINCE PROP_TAG( PT_TSTRING, 0x3A5C) +#define PR_HOME_ADDRESS_STATE_OR_PROVINCE_W PROP_TAG( PT_UNICODE, 0x3A5C) +#define PR_HOME_ADDRESS_STATE_OR_PROVINCE_A PROP_TAG( PT_STRING8, 0x3A5C) + +#define PR_HOME_ADDRESS_STREET PROP_TAG( PT_TSTRING, 0x3A5D) +#define PR_HOME_ADDRESS_STREET_W PROP_TAG( PT_UNICODE, 0x3A5D) +#define PR_HOME_ADDRESS_STREET_A PROP_TAG( PT_STRING8, 0x3A5D) + +#define PR_HOME_ADDRESS_POST_OFFICE_BOX PROP_TAG( PT_TSTRING, 0x3A5E) +#define PR_HOME_ADDRESS_POST_OFFICE_BOX_W PROP_TAG( PT_UNICODE, 0x3A5E) +#define PR_HOME_ADDRESS_POST_OFFICE_BOX_A PROP_TAG( PT_STRING8, 0x3A5E) + +#define PR_OTHER_ADDRESS_CITY PROP_TAG( PT_TSTRING, 0x3A5F) +#define PR_OTHER_ADDRESS_CITY_W PROP_TAG( PT_UNICODE, 0x3A5F) +#define PR_OTHER_ADDRESS_CITY_A PROP_TAG( PT_STRING8, 0x3A5F) + +#define PR_OTHER_ADDRESS_COUNTRY PROP_TAG( PT_TSTRING, 0x3A60) +#define PR_OTHER_ADDRESS_COUNTRY_W PROP_TAG( PT_UNICODE, 0x3A60) +#define PR_OTHER_ADDRESS_COUNTRY_A PROP_TAG( PT_STRING8, 0x3A60) + +#define PR_OTHER_ADDRESS_POSTAL_CODE PROP_TAG( PT_TSTRING, 0x3A61) +#define PR_OTHER_ADDRESS_POSTAL_CODE_W PROP_TAG( PT_UNICODE, 0x3A61) +#define PR_OTHER_ADDRESS_POSTAL_CODE_A PROP_TAG( PT_STRING8, 0x3A61) + +#define PR_OTHER_ADDRESS_STATE_OR_PROVINCE PROP_TAG( PT_TSTRING, 0x3A62) +#define PR_OTHER_ADDRESS_STATE_OR_PROVINCE_W PROP_TAG( PT_UNICODE, 0x3A62) +#define PR_OTHER_ADDRESS_STATE_OR_PROVINCE_A PROP_TAG( PT_STRING8, 0x3A62) + +#define PR_OTHER_ADDRESS_STREET PROP_TAG( PT_TSTRING, 0x3A63) +#define PR_OTHER_ADDRESS_STREET_W PROP_TAG( PT_UNICODE, 0x3A63) +#define PR_OTHER_ADDRESS_STREET_A PROP_TAG( PT_STRING8, 0x3A63) + +#define PR_OTHER_ADDRESS_POST_OFFICE_BOX PROP_TAG( PT_TSTRING, 0x3A64) +#define PR_OTHER_ADDRESS_POST_OFFICE_BOX_W PROP_TAG( PT_UNICODE, 0x3A64) +#define PR_OTHER_ADDRESS_POST_OFFICE_BOX_A PROP_TAG( PT_STRING8, 0x3A64) + + +/* + * Profile section properties + */ + +#define PR_STORE_PROVIDERS PROP_TAG( PT_BINARY, 0x3D00) +#define PR_AB_PROVIDERS PROP_TAG( PT_BINARY, 0x3D01) +#define PR_TRANSPORT_PROVIDERS PROP_TAG( PT_BINARY, 0x3D02) + +#define PR_DEFAULT_PROFILE PROP_TAG( PT_BOOLEAN, 0x3D04) +#define PR_AB_SEARCH_PATH PROP_TAG( PT_MV_BINARY, 0x3D05) +#define PR_AB_DEFAULT_DIR PROP_TAG( PT_BINARY, 0x3D06) +#define PR_AB_DEFAULT_PAB PROP_TAG( PT_BINARY, 0x3D07) + +#define PR_FILTERING_HOOKS PROP_TAG( PT_BINARY, 0x3D08) +#define PR_SERVICE_NAME PROP_TAG( PT_TSTRING, 0x3D09) +#define PR_SERVICE_NAME_W PROP_TAG( PT_UNICODE, 0x3D09) +#define PR_SERVICE_NAME_A PROP_TAG( PT_STRING8, 0x3D09) +#define PR_SERVICE_DLL_NAME PROP_TAG( PT_TSTRING, 0x3D0A) +#define PR_SERVICE_DLL_NAME_W PROP_TAG( PT_UNICODE, 0x3D0A) +#define PR_SERVICE_DLL_NAME_A PROP_TAG( PT_STRING8, 0x3D0A) +#define PR_SERVICE_ENTRY_NAME PROP_TAG( PT_STRING8, 0x3D0B) +#define PR_SERVICE_UID PROP_TAG( PT_BINARY, 0x3D0C) +#define PR_SERVICE_EXTRA_UIDS PROP_TAG( PT_BINARY, 0x3D0D) +#define PR_SERVICES PROP_TAG( PT_BINARY, 0x3D0E) +#define PR_SERVICE_SUPPORT_FILES PROP_TAG( PT_MV_TSTRING, 0x3D0F) +#define PR_SERVICE_SUPPORT_FILES_W PROP_TAG( PT_MV_UNICODE, 0x3D0F) +#define PR_SERVICE_SUPPORT_FILES_A PROP_TAG( PT_MV_STRING8, 0x3D0F) +#define PR_SERVICE_DELETE_FILES PROP_TAG( PT_MV_TSTRING, 0x3D10) +#define PR_SERVICE_DELETE_FILES_W PROP_TAG( PT_MV_UNICODE, 0x3D10) +#define PR_SERVICE_DELETE_FILES_A PROP_TAG( PT_MV_STRING8, 0x3D10) +#define PR_AB_SEARCH_PATH_UPDATE PROP_TAG( PT_BINARY, 0x3D11) +#define PR_PROFILE_NAME PROP_TAG( PT_TSTRING, 0x3D12) +#define PR_PROFILE_NAME_A PROP_TAG( PT_STRING8, 0x3D12) +#define PR_PROFILE_NAME_W PROP_TAG( PT_UNICODE, 0x3D12) + +/* + * Status object properties + */ + +#define PR_IDENTITY_DISPLAY PROP_TAG( PT_TSTRING, 0x3E00) +#define PR_IDENTITY_DISPLAY_W PROP_TAG( PT_UNICODE, 0x3E00) +#define PR_IDENTITY_DISPLAY_A PROP_TAG( PT_STRING8, 0x3E00) +#define PR_IDENTITY_ENTRYID PROP_TAG( PT_BINARY, 0x3E01) +#define PR_RESOURCE_METHODS PROP_TAG( PT_LONG, 0x3E02) +#define PR_RESOURCE_TYPE PROP_TAG( PT_LONG, 0x3E03) +#define PR_STATUS_CODE PROP_TAG( PT_LONG, 0x3E04) +#define PR_IDENTITY_SEARCH_KEY PROP_TAG( PT_BINARY, 0x3E05) +#define PR_OWN_STORE_ENTRYID PROP_TAG( PT_BINARY, 0x3E06) +#define PR_RESOURCE_PATH PROP_TAG( PT_TSTRING, 0x3E07) +#define PR_RESOURCE_PATH_W PROP_TAG( PT_UNICODE, 0x3E07) +#define PR_RESOURCE_PATH_A PROP_TAG( PT_STRING8, 0x3E07) +#define PR_STATUS_STRING PROP_TAG( PT_TSTRING, 0x3E08) +#define PR_STATUS_STRING_W PROP_TAG( PT_UNICODE, 0x3E08) +#define PR_STATUS_STRING_A PROP_TAG( PT_STRING8, 0x3E08) +#define PR_X400_DEFERRED_DELIVERY_CANCEL PROP_TAG( PT_BOOLEAN, 0x3E09) +#define PR_HEADER_FOLDER_ENTRYID PROP_TAG( PT_BINARY, 0x3E0A) +#define PR_REMOTE_PROGRESS PROP_TAG( PT_LONG, 0x3E0B) +#define PR_REMOTE_PROGRESS_TEXT PROP_TAG( PT_TSTRING, 0x3E0C) +#define PR_REMOTE_PROGRESS_TEXT_W PROP_TAG( PT_UNICODE, 0x3E0C) +#define PR_REMOTE_PROGRESS_TEXT_A PROP_TAG( PT_STRING8, 0x3E0C) +#define PR_REMOTE_VALIDATE_OK PROP_TAG( PT_BOOLEAN, 0x3E0D) + +/* + * Display table properties + */ + +#define PR_CONTROL_FLAGS PROP_TAG( PT_LONG, 0x3F00) +#define PR_CONTROL_STRUCTURE PROP_TAG( PT_BINARY, 0x3F01) +#define PR_CONTROL_TYPE PROP_TAG( PT_LONG, 0x3F02) +#define PR_DELTAX PROP_TAG( PT_LONG, 0x3F03) +#define PR_DELTAY PROP_TAG( PT_LONG, 0x3F04) +#define PR_XPOS PROP_TAG( PT_LONG, 0x3F05) +#define PR_YPOS PROP_TAG( PT_LONG, 0x3F06) +#define PR_CONTROL_ID PROP_TAG( PT_BINARY, 0x3F07) +#define PR_INITIAL_DETAILS_PANE PROP_TAG( PT_LONG, 0x3F08) + +/* + * Secure property id range + */ + +#define PROP_ID_SECURE_MIN 0x67F0 +#define PROP_ID_SECURE_MAX 0x67FF + + +#endif /* MAPITAGS_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIUtil.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIUtil.h similarity index 93% rename from com/win32comext/mapi/src/mapi_headers/MAPIUtil.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIUtil.h index 95a9bb626..fa363d0b5 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIUtil.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIUtil.h @@ -1,891 +1,894 @@ -/* - * M A P I U T I L . H - * - * Definitions and prototypes for utility functions provided by MAPI - * in MAPI[xx].DLL. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef _MAPIUTIL_H_ -#define _MAPIUTIL_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - - -#if defined (WIN64) && !defined (_WIN64) -#define _WIN64 -#endif - -/* - * Under Win64 systems Win32 is also defined for backwards compatibility. - */ - -#if defined (WIN32) && !defined (_WIN32) -#define _WIN32 -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef MAPIX_H -#include -#endif - -#ifndef BEGIN_INTERFACE -#define BEGIN_INTERFACE -#endif - - -/* IMAPITable in memory */ - -/* ITableData Interface ---------------------------------------------------- */ - -DECLARE_MAPI_INTERFACE_PTR(ITableData, LPTABLEDATA); - -typedef void (STDAPICALLTYPE CALLERRELEASE)( - ULONG_PTR ulCallerData, - LPTABLEDATA lpTblData, - LPMAPITABLE lpVue -); - -#define MAPI_ITABLEDATA_METHODS(IPURE) \ - MAPIMETHOD(HrGetView) \ - (THIS_ LPSSortOrderSet lpSSortOrderSet, \ - CALLERRELEASE FAR * lpfCallerRelease, \ - ULONG_PTR ulCallerData, \ - LPMAPITABLE FAR * lppMAPITable) IPURE; \ - MAPIMETHOD(HrModifyRow) \ - (THIS_ LPSRow) IPURE; \ - MAPIMETHOD(HrDeleteRow) \ - (THIS_ LPSPropValue lpSPropValue) IPURE; \ - MAPIMETHOD(HrQueryRow) \ - (THIS_ LPSPropValue lpsPropValue, \ - LPSRow FAR * lppSRow, \ - ULONG FAR * lpuliRow) IPURE; \ - MAPIMETHOD(HrEnumRow) \ - (THIS_ ULONG ulRowNumber, \ - LPSRow FAR * lppSRow) IPURE; \ - MAPIMETHOD(HrNotify) \ - (THIS_ ULONG ulFlags, \ - ULONG cValues, \ - LPSPropValue lpSPropValue) IPURE; \ - MAPIMETHOD(HrInsertRow) \ - (THIS_ ULONG uliRow, \ - LPSRow lpSRow) IPURE; \ - MAPIMETHOD(HrModifyRows) \ - (THIS_ ULONG ulFlags, \ - LPSRowSet lpSRowSet) IPURE; \ - MAPIMETHOD(HrDeleteRows) \ - (THIS_ ULONG ulFlags, \ - LPSRowSet lprowsetToDelete, \ - ULONG FAR * cRowsDeleted) IPURE; \ - -#undef INTERFACE -#define INTERFACE ITableData -DECLARE_MAPI_INTERFACE_(ITableData, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_ITABLEDATA_METHODS(PURE) -}; - - -/* Entry Point for in memory ITable */ - - -/* CreateTable() - * Creates the internal memory structures and object handle - * to bring a new table into existence. - * - * lpInterface - * Interface ID of the TableData object (IID_IMAPITableData) - * - * lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer - * Function addresses are provided by the caller so that - * this DLL allocates/frees memory appropriately. - * lpvReserved - * Reserved. Should be NULL. - * ulTableType - * TBLTYPE_DYNAMIC, etc. Visible to the calling application - * as part of the GetStatus return data on its views - * ulPropTagIndexColumn - * Index column for use when changing the data - * lpSPropTagArrayColumns - * Column proptags for the minimum set of columns in the table - * lppTableData - * Address of the pointer which will receive the TableData object - */ - -STDAPI_(SCODE) -CreateTable( LPCIID lpInterface, - ALLOCATEBUFFER FAR * lpAllocateBuffer, - ALLOCATEMORE FAR * lpAllocateMore, - FREEBUFFER FAR * lpFreeBuffer, - LPVOID lpvReserved, - ULONG ulTableType, - ULONG ulPropTagIndexColumn, - LPSPropTagArray lpSPropTagArrayColumns, - LPTABLEDATA FAR * lppTableData ); - -/* HrGetView() - * This function obtains a new view on the underlying data - * which supports the IMAPITable interface. All rows and columns - * of the underlying table data are initially visible - * lpSSortOrderSet - * if specified, results in the view being sorted - * lpfCallerRelease - * pointer to a routine to be called when the view is released, or - * NULL. - * ulCallerData - * arbitrary data the caller wants saved with this view and returned in - * the Release callback. - */ - -/* HrModifyRows() - * Add or modify a set of rows in the table data - * ulFlags - * Must be zero - * lpSRowSet - * Each row in the row set contains all the properties for one row - * in the table. One of the properties must be the index column. Any - * row in the table with the same value for its index column is - * replaced, or if there is no current row with that value the - * row is added. - * Each row in LPSRowSet MUST have a unique Index column! - * If any views are open, the view is updated as well. - * The properties do not have to be in the same order as the - * columns in the current table - */ - -/* HrModifyRow() - * Add or modify one row in the table - * lpSRow - * This row contains all the properties for one row in the table. - * One of the properties must be the index column. Any row in - * the table with the same value for its index column is - * replaced, or if there is no current row with that value the - * row is added - * If any views are open, the view is updated as well. - * The properties do not have to be in the same order as the - * columns in the current table - */ - -/* HrDeleteRows() - * Delete a row in the table. - * ulFlags - * TAD_ALL_ROWS - Causes all rows in the table to be deleted - * lpSRowSet is ignored in this case. - * lpSRowSet - * Each row in the row set contains all the properties for one row - * in the table. One of the properties must be the index column. Any - * row in the table with the same value for its index column is - * deleted. - * Each row in LPSRowSet MUST have a unique Index column! - * If any views are open, the view is updated as well. - * The properties do not have to be in the same order as the - * columns in the current table - */ -#define TAD_ALL_ROWS 1 - -/* HrDeleteRow() - * Delete a row in the table. - * lpSPropValue - * This property value specifies the row which has this value - * for its index column - */ - -/* HrQueryRow() - * Returns the values of a specified row in the table - * lpSPropValue - * This property value specifies the row which has this value - * for its index column - * lppSRow - * Address of where to return a pointer to an SRow - * lpuliRow - * Address of where to return the row number. This can be NULL - * if the row number is not required. - * - */ - -/* HrEnumRow() - * Returns the values of a specific (numbered) row in the table - * ulRowNumber - * Indicates row number 0 to n-1 - * lppSRow - * Address of where to return a pointer to a SRow - */ - -/* HrInsertRow() - * Inserts a row into the table. - * uliRow - * The row number before which this row will be inserted into the table. - * Row numbers can be from 0 to n where o to n-1 result in row insertion - * a row number of n results in the row being appended to the table. - * lpSRow - * This row contains all the properties for one row in the table. - * One of the properties must be the index column. Any row in - * the table with the same value for its index column is - * replaced, or if there is no current row with that value the - * row is added - * If any views are open, the view is updated as well. - * The properties do not have to be in the same order as the - * columns in the current table - */ - - -/* IMAPIProp in memory */ - -/* IPropData Interface ---------------------------------------------------- */ - - -#define MAPI_IPROPDATA_METHODS(IPURE) \ - MAPIMETHOD(HrSetObjAccess) \ - (THIS_ ULONG ulAccess) IPURE; \ - MAPIMETHOD(HrSetPropAccess) \ - (THIS_ LPSPropTagArray lpPropTagArray, \ - ULONG FAR * rgulAccess) IPURE; \ - MAPIMETHOD(HrGetPropAccess) \ - (THIS_ LPSPropTagArray FAR * lppPropTagArray, \ - ULONG FAR * FAR * lprgulAccess) IPURE; \ - MAPIMETHOD(HrAddObjProps) \ - (THIS_ LPSPropTagArray lppPropTagArray, \ - LPSPropProblemArray FAR * lprgulAccess) IPURE; - - -#undef INTERFACE -#define INTERFACE IPropData -DECLARE_MAPI_INTERFACE_(IPropData, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IPROPDATA_METHODS(PURE) -}; - -DECLARE_MAPI_INTERFACE_PTR(IPropData, LPPROPDATA); - - -/* Entry Point for in memory IMAPIProp */ - - -/* CreateIProp() - * Creates the internal memory structures and object handle - * to bring a new property interface into existance. - * - * lpInterface - * Interface ID of the TableData object (IID_IMAPIPropData) - * - * lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer - * Function addresses are provided by the caller so that - * this DLL allocates/frees memory appropriately. - * lppPropData - * Address of the pointer which will receive the IPropData object - * lpvReserved - * Reserved. Should be NULL. - */ - -STDAPI_(SCODE) -CreateIProp( LPCIID lpInterface, - ALLOCATEBUFFER FAR * lpAllocateBuffer, - ALLOCATEMORE FAR * lpAllocateMore, - FREEBUFFER FAR * lpFreeBuffer, - LPVOID lpvReserved, - LPPROPDATA FAR * lppPropData ); - -/* - * Defines for prop/obj access - */ -#define IPROP_READONLY ((ULONG) 0x00000001) -#define IPROP_READWRITE ((ULONG) 0x00000002) -#define IPROP_CLEAN ((ULONG) 0x00010000) -#define IPROP_DIRTY ((ULONG) 0x00020000) - -/* - - HrSetPropAccess - - - * Sets access right attributes on a per-property basis. By default, - * all properties are read/write. - * - */ - -/* - - HrSetObjAccess - - - * Sets access rights for the object itself. By default, the object has - * read/write access. - * - */ - -#ifndef NOIDLEENGINE - -/* Idle time scheduler */ - -/* - * PRI - * - * Priority of an idle task. - * The idle engine sorts tasks by priority, and the one with the higher - * value runs first. Within a priority level, the functions are called - * round-robin. - */ - -#define PRILOWEST -32768 -#define PRIHIGHEST 32767 -#define PRIUSER 0 - -/* - * IRO - * - * Idle routine options. This is a combined bit mask consisting of - * individual firo's. Listed below are the possible bit flags. - * - * FIROWAIT and FIROINTERVAL are mutually exclusive. - * If neither of the flags are specified, the default action - * is to ignore the time parameter of the idle function and - * call it as often as possible if firoPerBlock is not set; - * otherwise call it one time only during the idle block - * once the time constraint has been set. FIROINTERVAL - * is also incompatible with FIROPERBLOCK. - * - * FIROWAIT - time given is minimum idle time before calling - * for the first time in the block of idle time, - * afterwhich call as often as possible. - * FIROINTERVAL - time given is minimum interval between each - * successive call - * FIROPERBLOCK - called only once per contiguous block of idle - * time - * FIRODISABLED - initially disabled when registered, the - * default is to enable the function when registered. - * FIROONCEONLY - called only one time by the scheduler and then - * deregistered automatically. - */ - -#define IRONULL ((USHORT) 0x0000) -#define FIROWAIT ((USHORT) 0x0001) -#define FIROINTERVAL ((USHORT) 0x0002) -#define FIROPERBLOCK ((USHORT) 0x0004) -#define FIRODISABLED ((USHORT) 0x0020) -#define FIROONCEONLY ((USHORT) 0x0040) - -/* - * IRC - * - * Idle routine change options. This is a combined bit mask consisting - * of individual firc's; each one identifies an aspect of the idle task - * that can be changed. - * - */ - -#define IRCNULL ((USHORT) 0x0000) -#define FIRCPFN ((USHORT) 0x0001) /* change function pointer */ -#define FIRCPV ((USHORT) 0x0002) /* change parameter block */ -#define FIRCPRI ((USHORT) 0x0004) /* change priority */ -#define FIRCCSEC ((USHORT) 0x0008) /* change time */ -#define FIRCIRO ((USHORT) 0x0010) /* change routine options */ - -/* - * Type definition for idle functions. An idle function takes one - * parameter, an PV, and returns a BOOL value. - */ - -typedef BOOL (STDAPICALLTYPE FNIDLE) (LPVOID); -typedef FNIDLE FAR *PFNIDLE; - -/* - * FTG - * - * Function Tag. Used to identify a registered idle function. - * - */ - -typedef void FAR *FTG; -typedef FTG FAR *PFTG; -#define FTGNULL ((FTG) NULL) - -/* - - MAPIInitIdle/MAPIDeinitIdle - - - * Purpose: - * Initialises the idle engine - * If the initialisation succeded, returns 0, else returns -1 - * - * Arguments: - * lpvReserved Reserved, must be NULL. - */ - -STDAPI_(LONG) -MAPIInitIdle (LPVOID lpvReserved); - -STDAPI_(VOID) -MAPIDeinitIdle (VOID); - - -/* - * FtgRegisterIdleRoutine - * - * Registers the function pfn of type PFNIDLE, i.e., (BOOL (*)(LPVOID)) - * as an idle function. - * - * The idle function will be called with the parameter pv by the - * idle engine. The function has initial priority priIdle, - * associated time csecIdle, and options iroIdle. - */ - -STDAPI_(FTG) -FtgRegisterIdleRoutine (PFNIDLE lpfnIdle, LPVOID lpvIdleParam, - short priIdle, ULONG csecIdle, USHORT iroIdle); - -/* - * DeregisterIdleRoutine - * - * Removes the given routine from the list of idle routines. - * The routine will not be called again. It is the responsibility - * of the caller to clean up any data structures pointed to by the - * pvIdleParam parameter; this routine does not free the block. - */ - -STDAPI_(void) -DeregisterIdleRoutine (FTG ftg); - -/* - * EnableIdleRoutine - * - * Enables or disables an idle routine. - */ - -STDAPI_(void) -EnableIdleRoutine (FTG ftg, BOOL fEnable); - -/* - * ChangeIdleRoutine - * - * Changes some or all of the characteristics of the given idle - * function. The changes to make are indicated with flags in the - * ircIdle parameter. - */ - -STDAPI_(void) -ChangeIdleRoutine (FTG ftg, PFNIDLE lpfnIdle, LPVOID lpvIdleParam, - short priIdle, ULONG csecIdle, USHORT iroIdle, USHORT ircIdle); - - -#endif /* ! NOIDLEENGINE */ - - -/* IMalloc Utilities */ - -STDAPI_(LPMALLOC) MAPIGetDefaultMalloc(VOID); - - -/* StreamOnFile (SOF) */ - -/* - * Methods and #define's for implementing an OLE 2.0 storage stream - * (as defined in the OLE 2.0 specs) on top of a system file. - */ - -#define SOF_UNIQUEFILENAME ((ULONG) 0x80000000) - -STDMETHODIMP OpenStreamOnFile( - LPALLOCATEBUFFER lpAllocateBuffer, - LPFREEBUFFER lpFreeBuffer, - ULONG ulFlags, - __in LPCTSTR lpszFileName, - __in_opt LPCTSTR lpszPrefix, - LPSTREAM FAR * lppStream); - -typedef HRESULT (STDMETHODCALLTYPE FAR * LPOPENSTREAMONFILE) ( - LPALLOCATEBUFFER lpAllocateBuffer, - LPFREEBUFFER lpFreeBuffer, - ULONG ulFlags, - __in LPCTSTR lpszFileName, - __in_opt LPCTSTR lpszPrefix, - LPSTREAM FAR * lppStream); - -#if defined(_WIN64) || defined(_WIN32) -#define OPENSTREAMONFILE "OpenStreamOnFile" -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif - - -/* Property interface utilities */ - -/* - * Copies a single SPropValue from Src to Dest. Handles all the various - * types of properties and will link its allocations given the master - * allocation object and an allocate more function. - */ -STDAPI_(SCODE) -PropCopyMore( LPSPropValue lpSPropValueDest, - LPSPropValue lpSPropValueSrc, - ALLOCATEMORE * lpfAllocMore, - LPVOID lpvObject ); - -/* - * Returns the size in bytes of structure at lpSPropValue, including the - * Value. - */ -STDAPI_(ULONG) -UlPropSize( LPSPropValue lpSPropValue ); - - -STDAPI_(BOOL) -FEqualNames( LPMAPINAMEID lpName1, LPMAPINAMEID lpName2 ); - -#if (defined(_WIN64) || defined(_WIN32)) && !defined(_WINNT) && !defined(_WIN95) && !defined(_MAC) -#define _WINNT -#endif - -STDAPI_(void) -GetInstance(LPSPropValue lpPropMv, LPSPropValue lpPropSv, ULONG uliInst); - -extern char rgchCsds[]; -extern char rgchCids[]; -extern char rgchCsdi[]; -extern char rgchCidi[]; - -STDAPI_(BOOL) -FPropContainsProp( LPSPropValue lpSPropValueDst, - LPSPropValue lpSPropValueSrc, - ULONG ulFuzzyLevel ); - -STDAPI_(BOOL) -FPropCompareProp( LPSPropValue lpSPropValue1, - ULONG ulRelOp, - LPSPropValue lpSPropValue2 ); - -STDAPI_(LONG) -LPropCompareProp( LPSPropValue lpSPropValueA, - LPSPropValue lpSPropValueB ); - -STDAPI_(HRESULT) -HrAddColumns( LPMAPITABLE lptbl, - LPSPropTagArray lpproptagColumnsNew, - LPALLOCATEBUFFER lpAllocateBuffer, - LPFREEBUFFER lpFreeBuffer); - -STDAPI_(HRESULT) -HrAddColumnsEx( LPMAPITABLE lptbl, - LPSPropTagArray lpproptagColumnsNew, - LPALLOCATEBUFFER lpAllocateBuffer, - LPFREEBUFFER lpFreeBuffer, - void (FAR *lpfnFilterColumns)(LPSPropTagArray ptaga)); - - -/* Notification utilities */ - -/* - * Function that creates an advise sink object given a notification - * callback function and context. - */ - -STDAPI -HrAllocAdviseSink( LPNOTIFCALLBACK lpfnCallback, - LPVOID lpvContext, - LPMAPIADVISESINK FAR *lppAdviseSink ); - - -/* - * Wraps an existing advise sink with another one which guarantees - * that the original advise sink will be called in the thread on - * which it was created. - */ - -STDAPI -HrThisThreadAdviseSink( LPMAPIADVISESINK lpAdviseSink, - LPMAPIADVISESINK FAR *lppAdviseSink); - - - -/* - * Allows a client and/or provider to force notifications - * which are currently queued in the MAPI notification engine - * to be dispatched without doing a message dispatch. - */ - -STDAPI HrDispatchNotifications (ULONG ulFlags); - - -/* Service Provider Utilities */ - -/* - * Structures and utility function for building a display table - * from resources. - */ - -typedef struct { - ULONG ulCtlType; /* DTCT_LABEL, etc. */ - ULONG ulCtlFlags; /* DT_REQUIRED, etc. */ - LPBYTE lpbNotif; /* pointer to notification data */ - ULONG cbNotif; /* count of bytes of notification data */ - LPTSTR lpszFilter; /* character filter for edit/combobox */ - ULONG ulItemID; /* to validate parallel dlg template entry */ - union { /* ulCtlType discriminates */ - LPVOID lpv; /* Initialize this to avoid warnings */ - LPDTBLLABEL lplabel; - LPDTBLEDIT lpedit; - LPDTBLLBX lplbx; - LPDTBLCOMBOBOX lpcombobox; - LPDTBLDDLBX lpddlbx; - LPDTBLCHECKBOX lpcheckbox; - LPDTBLGROUPBOX lpgroupbox; - LPDTBLBUTTON lpbutton; - LPDTBLRADIOBUTTON lpradiobutton; - LPDTBLMVLISTBOX lpmvlbx; - LPDTBLMVDDLBX lpmvddlbx; - LPDTBLPAGE lppage; - } ctl; -} DTCTL, FAR *LPDTCTL; - -typedef struct { - ULONG cctl; - LPTSTR lpszResourceName; /* as usual, may be an integer ID */ - union { /* as usual, may be an integer ID */ - LPTSTR lpszComponent; - ULONG ulItemID; - }; - LPDTCTL lpctl; -} DTPAGE, FAR *LPDTPAGE; - - - -STDAPI -BuildDisplayTable( LPALLOCATEBUFFER lpAllocateBuffer, - LPALLOCATEMORE lpAllocateMore, - LPFREEBUFFER lpFreeBuffer, - LPMALLOC lpMalloc, - HINSTANCE hInstance, - UINT cPages, - LPDTPAGE lpPage, - ULONG ulFlags, - LPMAPITABLE * lppTable, - LPTABLEDATA * lppTblData ); - - -/* MAPI structure validation/copy utilities */ - -/* - * Validate, copy, and adjust pointers in MAPI structures: - * notification - * property value array - * option data - */ - -STDAPI_(SCODE) -ScCountNotifications(int cNotifications, LPNOTIFICATION lpNotifications, - ULONG FAR *lpcb); - -STDAPI_(SCODE) -ScCopyNotifications(int cNotification, LPNOTIFICATION lpNotifications, - LPVOID lpvDst, ULONG FAR *lpcb); - -STDAPI_(SCODE) -ScRelocNotifications(int cNotification, LPNOTIFICATION lpNotifications, - LPVOID lpvBaseOld, LPVOID lpvBaseNew, ULONG FAR *lpcb); - - -STDAPI_(SCODE) -ScCountProps(int cValues, LPSPropValue lpPropArray, ULONG FAR *lpcb); - -STDAPI_(LPSPropValue) -LpValFindProp(ULONG ulPropTag, ULONG cValues, LPSPropValue lpPropArray); - -STDAPI_(SCODE) -ScCopyProps(int cValues, LPSPropValue lpPropArray, LPVOID lpvDst, - ULONG FAR *lpcb); - -STDAPI_(SCODE) -ScRelocProps(int cValues, LPSPropValue lpPropArray, - LPVOID lpvBaseOld, LPVOID lpvBaseNew, ULONG FAR *lpcb); - -STDAPI_(SCODE) -ScDupPropset(int cValues, LPSPropValue lpPropArray, - LPALLOCATEBUFFER lpAllocateBuffer, LPSPropValue FAR *lppPropArray); - - -/* General utility functions */ - -/* Related to the OLE Component object model */ - -STDAPI_(ULONG) UlAddRef(LPVOID lpunk); -STDAPI_(ULONG) UlRelease(LPVOID lpunk); - -/* Related to the MAPI interface */ - -STDAPI HrGetOneProp(LPMAPIPROP lpMapiProp, ULONG ulPropTag, - LPSPropValue FAR *lppProp); -STDAPI HrSetOneProp(LPMAPIPROP lpMapiProp, - LPSPropValue lpProp); -STDAPI_(BOOL) FPropExists(LPMAPIPROP lpMapiProp, ULONG ulPropTag); -STDAPI_(LPSPropValue) PpropFindProp(LPSPropValue lpPropArray, ULONG cValues, - ULONG ulPropTag); -STDAPI_(void) FreePadrlist(LPADRLIST lpAdrlist); -STDAPI_(void) FreeProws(LPSRowSet lpRows); -STDAPI HrQueryAllRows(LPMAPITABLE lpTable, - LPSPropTagArray lpPropTags, - LPSRestriction lpRestriction, - LPSSortOrderSet lpSortOrderSet, - LONG crowsMax, - LPSRowSet FAR *lppRows); - -/* Create or validate the IPM folder tree in a message store */ - -#define MAPI_FORCE_CREATE 1 -#define MAPI_FULL_IPM_TREE 2 - -STDAPI HrValidateIPMSubtree(LPMDB lpMDB, ULONG ulFlags, - ULONG FAR *lpcValues, LPSPropValue FAR *lppValues, - LPMAPIERROR FAR *lpperr); - -/* Encoding and decoding strings */ - -STDAPI_(BOOL) FBinFromHex(__in LPTSTR lpsz, LPBYTE lpb); -STDAPI_(SCODE) ScBinFromHexBounded(__in LPTSTR lpsz, LPBYTE lpb, ULONG cb); -STDAPI_(void) HexFromBin(LPBYTE lpb, int cb, __in LPTSTR lpsz); -STDAPI_(ULONG) UlFromSzHex(LPCTSTR lpsz); - -/* Encoding and decoding entry IDs */ -STDAPI HrEntryIDFromSz(__in LPTSTR lpsz, ULONG FAR *lpcb, - LPENTRYID FAR *lppEntryID); -STDAPI HrSzFromEntryID(ULONG cb, LPENTRYID lpEntryID, - __in LPTSTR FAR *lpsz); -STDAPI HrComposeEID(LPMAPISESSION lpSession, - ULONG cbStoreRecordKey, LPBYTE lpStoreRecordKey, - ULONG cbMsgEntryID, LPENTRYID lpMsgEntryID, - ULONG FAR *lpcbEID, LPENTRYID FAR *lppEntryID); -STDAPI HrDecomposeEID(LPMAPISESSION lpSession, - ULONG cbEntryID, LPENTRYID lpEntryID, - ULONG FAR *lpcbStoreEntryID, - LPENTRYID FAR *lppStoreEntryID, - ULONG FAR *lpcbMsgEntryID, - LPENTRYID FAR *lppMsgEntryID); -STDAPI HrComposeMsgID(LPMAPISESSION lpSession, - ULONG cbStoreSearchKey, LPBYTE pStoreSearchKey, - ULONG cbMsgEntryID, LPENTRYID lpMsgEntryID, - __in LPTSTR FAR *lpszMsgID); -STDAPI HrDecomposeMsgID(LPMAPISESSION lpSession, - __in LPTSTR lpszMsgID, - ULONG FAR *lpcbStoreEntryID, - LPENTRYID FAR *lppStoreEntryID, - ULONG FAR *lppcbMsgEntryID, - LPENTRYID FAR *lppMsgEntryID); - -/* C runtime substitutes */ - - -STDAPI_(LPTSTR) SzFindCh(LPCTSTR lpsz, USHORT ch); /* strchr */ -STDAPI_(LPTSTR) SzFindLastCh(LPCTSTR lpsz, USHORT ch); /* strrchr */ -STDAPI_(LPTSTR) SzFindSz(LPCTSTR lpsz, LPCTSTR lpszKey); /*strstr */ -STDAPI_(unsigned int) UFromSz(LPCTSTR lpsz); /* atoi */ - -STDAPI_(SCODE) ScUNCFromLocalPath(__in LPSTR lpszLocal, __in LPSTR lpszUNC, - UINT cchUNC); -STDAPI_(SCODE) ScLocalPathFromUNC(__in LPSTR lpszUNC, __in LPSTR lpszLocal, - UINT cchLocal); - -/* 64-bit arithmetic with times */ - -STDAPI_(FILETIME) FtAddFt(FILETIME ftAddend1, FILETIME ftAddend2); -STDAPI_(FILETIME) FtMulDwDw(DWORD ftMultiplicand, DWORD ftMultiplier); -STDAPI_(FILETIME) FtMulDw(DWORD ftMultiplier, FILETIME ftMultiplicand); -STDAPI_(FILETIME) FtSubFt(FILETIME ftMinuend, FILETIME ftSubtrahend); -STDAPI_(FILETIME) FtNegFt(FILETIME ft); - -/* Message composition */ - -STDAPI_(SCODE) ScCreateConversationIndex (ULONG cbParent, - LPBYTE lpbParent, - ULONG FAR * lpcbConvIndex, - LPBYTE FAR * lppbConvIndex); - -/* Store support */ - -STDAPI WrapStoreEntryID (ULONG ulFlags, __in LPTSTR lpszDLLName, ULONG cbOrigEntry, - LPENTRYID lpOrigEntry, ULONG *lpcbWrappedEntry, LPENTRYID *lppWrappedEntry); - -/* RTF Sync Utilities */ - -#define RTF_SYNC_RTF_CHANGED ((ULONG) 0x00000001) -#define RTF_SYNC_BODY_CHANGED ((ULONG) 0x00000002) - -STDAPI_(HRESULT) -RTFSync (LPMESSAGE lpMessage, ULONG ulFlags, __out BOOL FAR * lpfMessageUpdated); - - -/* Flags for WrapCompressedRTFStream() */ - -/****** MAPI_MODIFY ((ULONG) 0x00000001) mapidefs.h */ -/****** STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) mapidefs.h */ - -STDAPI_(HRESULT) -WrapCompressedRTFStream (__in LPSTREAM lpCompressedRTFStream, - ULONG ulFlags, __out LPSTREAM FAR * lpUncompressedRTFStream); - -/* Storage on Stream */ - -#if defined(_WIN64) || defined(_WIN32) || defined(WIN16) -STDAPI_(HRESULT) -HrIStorageFromStream (LPUNKNOWN lpUnkIn, - LPCIID lpInterface, ULONG ulFlags, LPSTORAGE FAR * lppStorageOut); -#endif - - -/* - * Setup and cleanup. - * - * Providers never need to make these calls. - * - * Test applications and the like which do not call MAPIInitialize - * may want to call them, so that the few utility functions which - * need MAPI allocators (and do not ask for them explicitly) - * will work. - */ - -/* All flags are reserved for ScInitMapiUtil. */ - -STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags); -STDAPI_(VOID) DeinitMapiUtil(VOID); - - -/* - * Entry point names. - * - * These are for new entry points defined since MAPI first shipped - * in Windows 95. Using these names in a GetProcAddress call makes - * it easier to write code which uses them optionally. - */ - -#if defined (_WIN64) && (defined (_AMD64_) || defined(_ARM64_)) -#define szHrDispatchNotifications "HrDispatchNotifications" -#elif defined (_WIN32) && defined (_X86_) -#define szHrDispatchNotifications "_HrDispatchNotifications@4" -#else -#error "Unknown Platform: MAPI is currently supported on Win32/X86 and Win64/AMD64" -#endif - -typedef HRESULT (STDAPICALLTYPE DISPATCHNOTIFICATIONS)(ULONG ulFlags); -typedef DISPATCHNOTIFICATIONS FAR * LPDISPATCHNOTIFICATIONS; - -#if defined (_WIN64) && (defined (_AMD64_) || defined(_ARM64_)) -#define szScCreateConversationIndex "ScCreateConversationIndex" -#elif defined (_WIN32) && defined (_X86_) -#define szScCreateConversationIndex "_ScCreateConversationIndex@16" -#else -#error "Unknown Platform: MAPI is currently supported on Win32/X86 and Win64/AMD64" -#endif - -typedef SCODE (STDAPICALLTYPE CREATECONVERSATIONINDEX)(ULONG cbParent, - LPBYTE lpbParent, ULONG FAR *lpcbConvIndex, LPBYTE FAR *lppbConvIndex); -typedef CREATECONVERSATIONINDEX FAR *LPCREATECONVERSATIONINDEX; - -#ifdef __cplusplus -} -#endif - -#endif /* _MAPIUTIL_H_ */ - +/* + * M A P I U T I L . H + * + * Definitions and prototypes for utility functions provided by MAPI + * in MAPI[xx].DLL. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef _MAPIUTIL_H_ +#define _MAPIUTIL_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + + +#if (defined (WIN64) && !defined (_WIN64)) || defined(_M__X86_64) +#define _WIN64 +#endif + +/* + * Under Win64 systems Win32 is also defined for backwards compatibility. + */ + +#if defined (WIN32) && !defined (_WIN32) +#define _WIN32 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef MAPIX_H +#include +#endif + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + + +/* IMAPITable in memory */ + +/* ITableData Interface ---------------------------------------------------- */ + +DECLARE_MAPI_INTERFACE_PTR(ITableData, LPTABLEDATA); + +typedef void (STDAPICALLTYPE CALLERRELEASE)( + ULONG_PTR ulCallerData, + LPTABLEDATA lpTblData, + LPMAPITABLE lpVue +); + +#define MAPI_ITABLEDATA_METHODS(IPURE) \ + MAPIMETHOD(HrGetView) \ + (THIS_ LPSSortOrderSet lpSSortOrderSet, \ + CALLERRELEASE FAR * lpfCallerRelease, \ + ULONG_PTR ulCallerData, \ + LPMAPITABLE FAR * lppMAPITable) IPURE; \ + MAPIMETHOD(HrModifyRow) \ + (THIS_ LPSRow) IPURE; \ + MAPIMETHOD(HrDeleteRow) \ + (THIS_ LPSPropValue lpSPropValue) IPURE; \ + MAPIMETHOD(HrQueryRow) \ + (THIS_ LPSPropValue lpsPropValue, \ + LPSRow FAR * lppSRow, \ + ULONG FAR * lpuliRow) IPURE; \ + MAPIMETHOD(HrEnumRow) \ + (THIS_ ULONG ulRowNumber, \ + LPSRow FAR * lppSRow) IPURE; \ + MAPIMETHOD(HrNotify) \ + (THIS_ ULONG ulFlags, \ + ULONG cValues, \ + LPSPropValue lpSPropValue) IPURE; \ + MAPIMETHOD(HrInsertRow) \ + (THIS_ ULONG uliRow, \ + LPSRow lpSRow) IPURE; \ + MAPIMETHOD(HrModifyRows) \ + (THIS_ ULONG ulFlags, \ + LPSRowSet lpSRowSet) IPURE; \ + MAPIMETHOD(HrDeleteRows) \ + (THIS_ ULONG ulFlags, \ + LPSRowSet lprowsetToDelete, \ + ULONG FAR * cRowsDeleted) IPURE; \ + +#undef INTERFACE +#define INTERFACE ITableData +DECLARE_MAPI_INTERFACE_(ITableData, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_ITABLEDATA_METHODS(PURE) +}; + + +/* Entry Point for in memory ITable */ + + +/* CreateTable() + * Creates the internal memory structures and object handle + * to bring a new table into existence. + * + * lpInterface + * Interface ID of the TableData object (IID_IMAPITableData) + * + * lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer + * Function addresses are provided by the caller so that + * this DLL allocates/frees memory appropriately. + * lpvReserved + * Reserved. Should be NULL. + * ulTableType + * TBLTYPE_DYNAMIC, etc. Visible to the calling application + * as part of the GetStatus return data on its views + * ulPropTagIndexColumn + * Index column for use when changing the data + * lpSPropTagArrayColumns + * Column proptags for the minimum set of columns in the table + * lppTableData + * Address of the pointer which will receive the TableData object + */ + +STDAPI_(SCODE) +CreateTable( LPCIID lpInterface, + ALLOCATEBUFFER FAR * lpAllocateBuffer, + ALLOCATEMORE FAR * lpAllocateMore, + FREEBUFFER FAR * lpFreeBuffer, + LPVOID lpvReserved, + ULONG ulTableType, + ULONG ulPropTagIndexColumn, + LPSPropTagArray lpSPropTagArrayColumns, + LPTABLEDATA FAR * lppTableData ); + +/* HrGetView() + * This function obtains a new view on the underlying data + * which supports the IMAPITable interface. All rows and columns + * of the underlying table data are initially visible + * lpSSortOrderSet + * if specified, results in the view being sorted + * lpfCallerRelease + * pointer to a routine to be called when the view is released, or + * NULL. + * ulCallerData + * arbitrary data the caller wants saved with this view and returned in + * the Release callback. + */ + +/* HrModifyRows() + * Add or modify a set of rows in the table data + * ulFlags + * Must be zero + * lpSRowSet + * Each row in the row set contains all the properties for one row + * in the table. One of the properties must be the index column. Any + * row in the table with the same value for its index column is + * replaced, or if there is no current row with that value the + * row is added. + * Each row in LPSRowSet MUST have a unique Index column! + * If any views are open, the view is updated as well. + * The properties do not have to be in the same order as the + * columns in the current table + */ + +/* HrModifyRow() + * Add or modify one row in the table + * lpSRow + * This row contains all the properties for one row in the table. + * One of the properties must be the index column. Any row in + * the table with the same value for its index column is + * replaced, or if there is no current row with that value the + * row is added + * If any views are open, the view is updated as well. + * The properties do not have to be in the same order as the + * columns in the current table + */ + +/* HrDeleteRows() + * Delete a row in the table. + * ulFlags + * TAD_ALL_ROWS - Causes all rows in the table to be deleted + * lpSRowSet is ignored in this case. + * lpSRowSet + * Each row in the row set contains all the properties for one row + * in the table. One of the properties must be the index column. Any + * row in the table with the same value for its index column is + * deleted. + * Each row in LPSRowSet MUST have a unique Index column! + * If any views are open, the view is updated as well. + * The properties do not have to be in the same order as the + * columns in the current table + */ +#define TAD_ALL_ROWS 1 + +/* HrDeleteRow() + * Delete a row in the table. + * lpSPropValue + * This property value specifies the row which has this value + * for its index column + */ + +/* HrQueryRow() + * Returns the values of a specified row in the table + * lpSPropValue + * This property value specifies the row which has this value + * for its index column + * lppSRow + * Address of where to return a pointer to an SRow + * lpuliRow + * Address of where to return the row number. This can be NULL + * if the row number is not required. + * + */ + +/* HrEnumRow() + * Returns the values of a specific (numbered) row in the table + * ulRowNumber + * Indicates row number 0 to n-1 + * lppSRow + * Address of where to return a pointer to a SRow + */ + +/* HrInsertRow() + * Inserts a row into the table. + * uliRow + * The row number before which this row will be inserted into the table. + * Row numbers can be from 0 to n where o to n-1 result in row insertion + * a row number of n results in the row being appended to the table. + * lpSRow + * This row contains all the properties for one row in the table. + * One of the properties must be the index column. Any row in + * the table with the same value for its index column is + * replaced, or if there is no current row with that value the + * row is added + * If any views are open, the view is updated as well. + * The properties do not have to be in the same order as the + * columns in the current table + */ + + +/* IMAPIProp in memory */ + +/* IPropData Interface ---------------------------------------------------- */ + + +#define MAPI_IPROPDATA_METHODS(IPURE) \ + MAPIMETHOD(HrSetObjAccess) \ + (THIS_ ULONG ulAccess) IPURE; \ + MAPIMETHOD(HrSetPropAccess) \ + (THIS_ LPSPropTagArray lpPropTagArray, \ + ULONG FAR * rgulAccess) IPURE; \ + MAPIMETHOD(HrGetPropAccess) \ + (THIS_ LPSPropTagArray FAR * lppPropTagArray, \ + ULONG FAR * FAR * lprgulAccess) IPURE; \ + MAPIMETHOD(HrAddObjProps) \ + (THIS_ LPSPropTagArray lppPropTagArray, \ + LPSPropProblemArray FAR * lprgulAccess) IPURE; + + +#undef INTERFACE +#define INTERFACE IPropData +DECLARE_MAPI_INTERFACE_(IPropData, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IPROPDATA_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IPropData, LPPROPDATA); + + +/* Entry Point for in memory IMAPIProp */ + + +/* CreateIProp() + * Creates the internal memory structures and object handle + * to bring a new property interface into existance. + * + * lpInterface + * Interface ID of the TableData object (IID_IMAPIPropData) + * + * lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer + * Function addresses are provided by the caller so that + * this DLL allocates/frees memory appropriately. + * lppPropData + * Address of the pointer which will receive the IPropData object + * lpvReserved + * Reserved. Should be NULL. + */ + +STDAPI_(SCODE) +CreateIProp( LPCIID lpInterface, + ALLOCATEBUFFER FAR * lpAllocateBuffer, + ALLOCATEMORE FAR * lpAllocateMore, + FREEBUFFER FAR * lpFreeBuffer, + LPVOID lpvReserved, + LPPROPDATA FAR * lppPropData ); + +/* + * Defines for prop/obj access + */ +#define IPROP_READONLY ((ULONG) 0x00000001) +#define IPROP_READWRITE ((ULONG) 0x00000002) +#define IPROP_CLEAN ((ULONG) 0x00010000) +#define IPROP_DIRTY ((ULONG) 0x00020000) + +/* + - HrSetPropAccess + - + * Sets access right attributes on a per-property basis. By default, + * all properties are read/write. + * + */ + +/* + - HrSetObjAccess + - + * Sets access rights for the object itself. By default, the object has + * read/write access. + * + */ + +#ifndef NOIDLEENGINE + +/* Idle time scheduler */ + +/* + * PRI + * + * Priority of an idle task. + * The idle engine sorts tasks by priority, and the one with the higher + * value runs first. Within a priority level, the functions are called + * round-robin. + */ + +#define PRILOWEST -32768 +#define PRIHIGHEST 32767 +#define PRIUSER 0 + +/* + * IRO + * + * Idle routine options. This is a combined bit mask consisting of + * individual firo's. Listed below are the possible bit flags. + * + * FIROWAIT and FIROINTERVAL are mutually exclusive. + * + * FIROWAIT - time given is minimum idle time before calling + * for the first time in the block of idle time, + * afterwhich every subsequent call has to wait + * for the specified idle time. + * FIROINTERVAL - time given is minimum interval between each + * successive call + * FIROPERBLOCK - called only once per contiguous block of idle + * time + * FIRODISABLED - initially disabled when registered, the + * default is to enable the function when registered. + * FIROONCEONLY - called only one time by the scheduler and then + * deregistered automatically. + */ + +#define IRONULL ((USHORT) 0x0000) +#define FIROWAIT ((USHORT) 0x0001) +#define FIROINTERVAL ((USHORT) 0x0002) +#define FIROPERBLOCK ((USHORT) 0x0004) +#define FIRODISABLED ((USHORT) 0x0020) +#define FIROONCEONLY ((USHORT) 0x0040) + +/* + * IRC + * + * Idle routine change options. This is a combined bit mask consisting + * of individual firc's; each one identifies an aspect of the idle task + * that can be changed. + * + */ + +#define IRCNULL ((USHORT) 0x0000) +#define FIRCPFN ((USHORT) 0x0001) /* change function pointer */ +#define FIRCPV ((USHORT) 0x0002) /* change parameter block */ +#define FIRCPRI ((USHORT) 0x0004) /* change priority */ +#define FIRCCSEC ((USHORT) 0x0008) /* change time */ +#define FIRCIRO ((USHORT) 0x0010) /* change routine options */ + +/* + * Type definition for idle functions. An idle function takes one + * parameter, an PV, and returns a BOOL value. + */ + +typedef BOOL (STDAPICALLTYPE FNIDLE) (LPVOID); +typedef FNIDLE FAR *PFNIDLE; + +/* + * FTG + * + * Function Tag. Used to identify a registered idle function. + * + */ + +typedef void FAR *FTG; +typedef FTG FAR *PFTG; +#define FTGNULL ((FTG) NULL) + +/* + - MAPIInitIdle/MAPIDeinitIdle + - + * Purpose: + * Initialises the idle engine + * If the initialisation succeded, returns 0, else returns -1 + * + * Arguments: + * lpvReserved Reserved, must be NULL. + */ + +STDAPI_(LONG) +MAPIInitIdle (LPVOID lpvReserved); + +STDAPI_(VOID) +MAPIDeinitIdle (VOID); + + +/* + * FtgRegisterIdleRoutine + * + * Registers the function pfn of type PFNIDLE, i.e., (BOOL (*)(LPVOID)) + * as an idle function. + * + * The idle function will be called with the parameter pv by the + * idle engine. The function has initial priority priIdle, + * associated time csecIdle, and options iroIdle. + */ + +STDAPI_(FTG) +FtgRegisterIdleRoutine (PFNIDLE lpfnIdle, LPVOID lpvIdleParam, + short priIdle, ULONG csecIdle, USHORT iroIdle); + +/* + * DeregisterIdleRoutine + * + * Removes the given routine from the list of idle routines. + * The routine will not be called again. It is the responsibility + * of the caller to clean up any data structures pointed to by the + * pvIdleParam parameter; this routine does not free the block. + */ + +STDAPI_(void) +DeregisterIdleRoutine (FTG ftg); + +/* + * EnableIdleRoutine + * + * Enables or disables an idle routine. + */ + +STDAPI_(void) +EnableIdleRoutine (FTG ftg, BOOL fEnable); + +/* + * ChangeIdleRoutine + * + * Changes some or all of the characteristics of the given idle + * function. The changes to make are indicated with flags in the + * ircIdle parameter. + */ + +STDAPI_(void) +ChangeIdleRoutine (FTG ftg, PFNIDLE lpfnIdle, LPVOID lpvIdleParam, + short priIdle, ULONG csecIdle, USHORT iroIdle, USHORT ircIdle); + + +#endif /* ! NOIDLEENGINE */ + + +/* IMalloc Utilities */ + +STDAPI_(LPMALLOC) MAPIGetDefaultMalloc(VOID); + + +/* StreamOnFile (SOF) */ + +/* + * Methods and #define's for implementing an OLE 2.0 storage stream + * (as defined in the OLE 2.0 specs) on top of a system file. + */ + +#define SOF_UNIQUEFILENAME ((ULONG) 0x80000000) + +STDMETHODIMP OpenStreamOnFile( + LPALLOCATEBUFFER lpAllocateBuffer, + LPFREEBUFFER lpFreeBuffer, + ULONG ulFlags, + __in LPCTSTR lpszFileName, + __in_opt LPCTSTR lpszPrefix, + LPSTREAM FAR * lppStream); + +typedef HRESULT (STDMETHODCALLTYPE FAR * LPOPENSTREAMONFILE) ( + LPALLOCATEBUFFER lpAllocateBuffer, + LPFREEBUFFER lpFreeBuffer, + ULONG ulFlags, + __in LPCTSTR lpszFileName, + __in_opt LPCTSTR lpszPrefix, + LPSTREAM FAR * lppStream); + +#if defined(_WIN64) || defined(_WIN32) || defined(_M_ARM) +#define OPENSTREAMONFILE "OpenStreamOnFile" +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif + + +/* Property interface utilities */ + +/* + * Copies a single SPropValue from Src to Dest. Handles all the various + * types of properties and will link its allocations given the master + * allocation object and an allocate more function. + */ +STDAPI_(SCODE) +PropCopyMore( LPSPropValue lpSPropValueDest, + LPSPropValue lpSPropValueSrc, + ALLOCATEMORE * lpfAllocMore, + LPVOID lpvObject ); + +/* + * Returns the size in bytes of structure at lpSPropValue, including the + * Value. + */ +STDAPI_(ULONG) +UlPropSize( LPSPropValue lpSPropValue ); + + +STDAPI_(BOOL) +FEqualNames( LPMAPINAMEID lpName1, LPMAPINAMEID lpName2 ); + +#if (defined(_WIN64) || defined(_WIN32) || defined(_M_ARM)) && !defined(_WINNT) && !defined(_WIN95) && !defined(_MAC) +#define _WINNT +#endif + +STDAPI_(void) +GetInstance(LPSPropValue lpPropMv, LPSPropValue lpPropSv, ULONG uliInst); + +extern char rgchCsds[]; +extern char rgchCids[]; +extern char rgchCsdi[]; +extern char rgchCidi[]; + +STDAPI_(BOOL) +FPropContainsProp( LPSPropValue lpSPropValueDst, + LPSPropValue lpSPropValueSrc, + ULONG ulFuzzyLevel ); + +STDAPI_(BOOL) +FPropCompareProp( LPSPropValue lpSPropValue1, + ULONG ulRelOp, + LPSPropValue lpSPropValue2 ); + +STDAPI_(LONG) +LPropCompareProp( LPSPropValue lpSPropValueA, + LPSPropValue lpSPropValueB ); + +STDAPI_(HRESULT) +HrAddColumns( LPMAPITABLE lptbl, + LPSPropTagArray lpproptagColumnsNew, + LPALLOCATEBUFFER lpAllocateBuffer, + LPFREEBUFFER lpFreeBuffer); + +STDAPI_(HRESULT) +HrAddColumnsEx( LPMAPITABLE lptbl, + LPSPropTagArray lpproptagColumnsNew, + LPALLOCATEBUFFER lpAllocateBuffer, + LPFREEBUFFER lpFreeBuffer, + void (FAR *lpfnFilterColumns)(LPSPropTagArray ptaga)); + + +/* Notification utilities */ + +/* + * Function that creates an advise sink object given a notification + * callback function and context. + */ + +STDAPI +HrAllocAdviseSink( LPNOTIFCALLBACK lpfnCallback, + LPVOID lpvContext, + LPMAPIADVISESINK FAR *lppAdviseSink ); + + +/* + * Wraps an existing advise sink with another one which guarantees + * that the original advise sink will be called in the thread on + * which it was created. + */ + +STDAPI +HrThisThreadAdviseSink( LPMAPIADVISESINK lpAdviseSink, + LPMAPIADVISESINK FAR *lppAdviseSink); + + + +/* + * Allows a client and/or provider to force notifications + * which are currently queued in the MAPI notification engine + * to be dispatched without doing a message dispatch. + */ + +STDAPI HrDispatchNotifications (ULONG ulFlags); + + +/* Service Provider Utilities */ + +/* + * Structures and utility function for building a display table + * from resources. + */ + +typedef struct { + ULONG ulCtlType; /* DTCT_LABEL, etc. */ + ULONG ulCtlFlags; /* DT_REQUIRED, etc. */ + LPBYTE lpbNotif; /* pointer to notification data */ + ULONG cbNotif; /* count of bytes of notification data */ + LPTSTR lpszFilter; /* character filter for edit/combobox */ + ULONG ulItemID; /* to validate parallel dlg template entry */ + union { /* ulCtlType discriminates */ + LPVOID lpv; /* Initialize this to avoid warnings */ + LPDTBLLABEL lplabel; + LPDTBLEDIT lpedit; + LPDTBLLBX lplbx; + LPDTBLCOMBOBOX lpcombobox; + LPDTBLDDLBX lpddlbx; + LPDTBLCHECKBOX lpcheckbox; + LPDTBLGROUPBOX lpgroupbox; + LPDTBLBUTTON lpbutton; + LPDTBLRADIOBUTTON lpradiobutton; + LPDTBLMVLISTBOX lpmvlbx; + LPDTBLMVDDLBX lpmvddlbx; + LPDTBLPAGE lppage; + } ctl; +} DTCTL, FAR *LPDTCTL; + +typedef struct { + ULONG cctl; + LPTSTR lpszResourceName; /* as usual, may be an integer ID */ + union { /* as usual, may be an integer ID */ + LPTSTR lpszComponent; + ULONG ulItemID; + }; + LPDTCTL lpctl; +} DTPAGE, FAR *LPDTPAGE; + + + +STDAPI +BuildDisplayTable( LPALLOCATEBUFFER lpAllocateBuffer, + LPALLOCATEMORE lpAllocateMore, + LPFREEBUFFER lpFreeBuffer, + LPMALLOC lpMalloc, + HINSTANCE hInstance, + UINT cPages, + LPDTPAGE lpPage, + ULONG ulFlags, + LPMAPITABLE * lppTable, + LPTABLEDATA * lppTblData ); + + +/* MAPI structure validation/copy utilities */ + +/* + * Validate, copy, and adjust pointers in MAPI structures: + * notification + * property value array + * option data + */ + +STDAPI_(SCODE) +ScCountNotifications(int cNotifications, LPNOTIFICATION lpNotifications, + ULONG FAR *lpcb); + +STDAPI_(SCODE) +ScCopyNotifications(int cNotification, LPNOTIFICATION lpNotifications, + LPVOID lpvDst, ULONG FAR *lpcb); + +STDAPI_(SCODE) +ScRelocNotifications(int cNotification, LPNOTIFICATION lpNotifications, + LPVOID lpvBaseOld, LPVOID lpvBaseNew, ULONG FAR *lpcb); + + +STDAPI_(SCODE) +ScCountProps(int cValues, LPSPropValue lpPropArray, ULONG FAR *lpcb); + +STDAPI_(LPSPropValue) +LpValFindProp(ULONG ulPropTag, ULONG cValues, LPSPropValue lpPropArray); + +STDAPI_(SCODE) +ScCopyProps(int cValues, LPSPropValue lpPropArray, LPVOID lpvDst, + ULONG FAR *lpcb); + +STDAPI_(SCODE) +ScRelocProps(int cValues, LPSPropValue lpPropArray, + LPVOID lpvBaseOld, LPVOID lpvBaseNew, ULONG FAR *lpcb); + +STDAPI_(SCODE) +ScDupPropset(int cValues, LPSPropValue lpPropArray, + LPALLOCATEBUFFER lpAllocateBuffer, LPSPropValue FAR *lppPropArray); + + +/* General utility functions */ + +/* Related to the OLE Component object model */ + +STDAPI_(ULONG) UlAddRef(LPVOID lpunk); +STDAPI_(ULONG) UlRelease(LPVOID lpunk); + +/* Related to the MAPI interface */ + +STDAPI HrGetOneProp(LPMAPIPROP lpMapiProp, ULONG ulPropTag, + LPSPropValue FAR *lppProp); +STDAPI HrSetOneProp(LPMAPIPROP lpMapiProp, + LPSPropValue lpProp); +STDAPI_(BOOL) FPropExists(LPMAPIPROP lpMapiProp, ULONG ulPropTag); +STDAPI_(LPSPropValue) PpropFindProp(LPSPropValue lpPropArray, ULONG cValues, + ULONG ulPropTag); +STDAPI_(void) FreePadrlist(LPADRLIST lpAdrlist); +STDAPI_(void) FreeProws(LPSRowSet lpRows); +STDAPI HrQueryAllRows(LPMAPITABLE lpTable, + LPSPropTagArray lpPropTags, + LPSRestriction lpRestriction, + LPSSortOrderSet lpSortOrderSet, + LONG crowsMax, + LPSRowSet FAR *lppRows); + +/* Create or validate the IPM folder tree in a message store */ + +#define MAPI_FORCE_CREATE 1 +#define MAPI_FULL_IPM_TREE 2 + +STDAPI HrValidateIPMSubtree(LPMDB lpMDB, ULONG ulFlags, + ULONG FAR *lpcValues, LPSPropValue FAR *lppValues, + LPMAPIERROR FAR *lpperr); + +/* Encoding and decoding strings */ + +STDAPI_(BOOL) FBinFromHex(__in LPTSTR lpsz, LPBYTE lpb); +STDAPI_(SCODE) ScBinFromHexBounded(__in LPTSTR lpsz, LPBYTE lpb, ULONG cb); +STDAPI_(void) HexFromBin(LPBYTE lpb, int cb, __in LPTSTR lpsz); +STDAPI_(ULONG) UlFromSzHex(LPCTSTR lpsz); + +/* Encoding and decoding entry IDs */ +STDAPI HrEntryIDFromSz(__in LPTSTR lpsz, ULONG FAR *lpcb, + LPENTRYID FAR *lppEntryID); +STDAPI HrSzFromEntryID(ULONG cb, LPENTRYID lpEntryID, + __in LPTSTR FAR *lpsz); +STDAPI HrComposeEID(LPMAPISESSION lpSession, + ULONG cbStoreRecordKey, LPBYTE lpStoreRecordKey, + ULONG cbMsgEntryID, LPENTRYID lpMsgEntryID, + ULONG FAR *lpcbEID, LPENTRYID FAR *lppEntryID); +STDAPI HrDecomposeEID(LPMAPISESSION lpSession, + ULONG cbEntryID, LPENTRYID lpEntryID, + ULONG FAR *lpcbStoreEntryID, + LPENTRYID FAR *lppStoreEntryID, + ULONG FAR *lpcbMsgEntryID, + LPENTRYID FAR *lppMsgEntryID); +STDAPI HrComposeMsgID(LPMAPISESSION lpSession, + ULONG cbStoreSearchKey, LPBYTE pStoreSearchKey, + ULONG cbMsgEntryID, LPENTRYID lpMsgEntryID, + __in LPTSTR FAR *lpszMsgID); +STDAPI HrDecomposeMsgID(LPMAPISESSION lpSession, + __in LPTSTR lpszMsgID, + ULONG FAR *lpcbStoreEntryID, + LPENTRYID FAR *lppStoreEntryID, + ULONG FAR *lppcbMsgEntryID, + LPENTRYID FAR *lppMsgEntryID); + +/* C runtime substitutes */ + + +STDAPI_(LPTSTR) SzFindCh(LPCTSTR lpsz, USHORT ch); /* strchr */ +STDAPI_(LPTSTR) SzFindLastCh(LPCTSTR lpsz, USHORT ch); /* strrchr */ +STDAPI_(LPTSTR) SzFindSz(LPCTSTR lpsz, LPCTSTR lpszKey); /*strstr */ +STDAPI_(unsigned int) UFromSz(LPCTSTR lpsz); /* atoi */ + +STDAPI_(SCODE) ScUNCFromLocalPath(__in LPSTR lpszLocal, __in LPSTR lpszUNC, + UINT cchUNC); +STDAPI_(SCODE) ScLocalPathFromUNC(__in LPSTR lpszUNC, __in LPSTR lpszLocal, + UINT cchLocal); + +/* 64-bit arithmetic with times */ + +STDAPI_(FILETIME) FtAddFt(FILETIME ftAddend1, FILETIME ftAddend2); +STDAPI_(FILETIME) FtMulDwDw(DWORD ftMultiplicand, DWORD ftMultiplier); +STDAPI_(FILETIME) FtMulDw(DWORD ftMultiplier, FILETIME ftMultiplicand); +STDAPI_(FILETIME) FtSubFt(FILETIME ftMinuend, FILETIME ftSubtrahend); +STDAPI_(FILETIME) FtNegFt(FILETIME ft); + +/* Message composition */ + +STDAPI_(SCODE) ScCreateConversationIndex (ULONG cbParent, + LPBYTE lpbParent, + ULONG FAR * lpcbConvIndex, + LPBYTE FAR * lppbConvIndex); + +/* Store support */ + +STDAPI WrapStoreEntryID (ULONG ulFlags, __in LPTSTR lpszDLLName, ULONG cbOrigEntry, + LPENTRYID lpOrigEntry, ULONG *lpcbWrappedEntry, LPENTRYID *lppWrappedEntry); + +/* RTF Sync Utilities */ + +#define RTF_SYNC_RTF_CHANGED ((ULONG) 0x00000001) +#define RTF_SYNC_BODY_CHANGED ((ULONG) 0x00000002) + +STDAPI_(HRESULT) +RTFSync (LPMESSAGE lpMessage, ULONG ulFlags, __out BOOL FAR * lpfMessageUpdated); + + +/* Flags for WrapCompressedRTFStream() */ + +/****** MAPI_MODIFY ((ULONG) 0x00000001) mapidefs.h */ +/****** STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) mapidefs.h */ + +STDAPI_(HRESULT) +WrapCompressedRTFStream (__in LPSTREAM lpCompressedRTFStream, + ULONG ulFlags, __out LPSTREAM FAR * lpUncompressedRTFStream); + +/* Storage on Stream */ + +#if defined(_WIN64) || defined(_WIN32) || defined(_M_ARM) +STDAPI_(HRESULT) +HrIStorageFromStream (LPUNKNOWN lpUnkIn, + LPCIID lpInterface, ULONG ulFlags, LPSTORAGE FAR * lppStorageOut); +#endif + + +/* + * Setup and cleanup. + * + * Providers never need to make these calls. + * + * Test applications and the like which do not call MAPIInitialize + * may want to call them, so that the few utility functions which + * need MAPI allocators (and do not ask for them explicitly) + * will work. + */ + +/* All flags are reserved for ScInitMapiUtil. */ + +STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags); +STDAPI_(VOID) DeinitMapiUtil(VOID); + + +/* + * Entry point names. + * + * These are for new entry points defined since MAPI first shipped + * in Windows 95. Using these names in a GetProcAddress call makes + * it easier to write code which uses them optionally. + */ + +#if defined (_WIN64) && defined(_AMD64_) +#define szHrDispatchNotifications "HrDispatchNotifications" +#elif defined (_WIN32) && defined (_X86_) +#define szHrDispatchNotifications "_HrDispatchNotifications@4" +#elif defined (_M_ARM) || defined(_M_ARM64) +#define szHrDispatchNotifications "HrDispatchNotifications" +#else +#error "Unknown Platform: MAPI is currently supported on Win32/X86 and Win64/AMD64" +#endif + +typedef HRESULT (STDAPICALLTYPE DISPATCHNOTIFICATIONS)(ULONG ulFlags); +typedef DISPATCHNOTIFICATIONS FAR * LPDISPATCHNOTIFICATIONS; + +#if defined (_WIN64) && defined (_AMD64_) +#define szScCreateConversationIndex "ScCreateConversationIndex" +#elif defined (_WIN32) && defined (_X86_) +#define szScCreateConversationIndex "_ScCreateConversationIndex@16" +#elif defined (_M_ARM) || defined(_M_ARM64) +#define szScCreateConversationIndex "ScCreateConversationIndex" +#else +#error "Unknown Platform: MAPI is currently supported on Win32/X86 and Win64/AMD64" +#endif + +typedef SCODE (STDAPICALLTYPE CREATECONVERSATIONINDEX)(ULONG cbParent, + LPBYTE lpbParent, ULONG FAR *lpcbConvIndex, LPBYTE FAR *lppbConvIndex); +typedef CREATECONVERSATIONINDEX FAR *LPCREATECONVERSATIONINDEX; + +typedef BOOL (STDAPICALLTYPE FGETCOMPONENTPATH) (LPTSTR szComponent, + LPTSTR szQualifier, LPTSTR szDllPath, DWORD cchBufferSize, BOOL fInstall); +typedef FGETCOMPONENTPATH FAR * LPFGETCOMPONENTPATH; + +#ifdef __cplusplus +} +#endif + +#endif /* _MAPIUTIL_H_ */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIVal.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIVal.h similarity index 97% rename from com/win32comext/mapi/src/mapi_headers/MAPIVal.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIVal.h index 61283873a..7c13813d5 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIVal.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIVal.h @@ -1,1975 +1,1968 @@ -/* - * M A P I V A L . H - * - * Macros used to validate parameters on standard MAPI object methods. - * Used in conjunction with routines found in MAPIU.DLL. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef _INC_VALIDATE -#define _INC_VALIDATE - -#if _MSC_VER > 1000 -#pragma once -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef MAPIUTIL_H -#include -#endif -#include -#include - - -#define MAKE_ENUM(Method, Interface) Interface##_##Method - -typedef enum _tagMethods -{ -/* IUnknown */ - MAKE_ENUM(QueryInterface, IUnknown) = 0, - MAKE_ENUM(AddRef, IUnknown), /* For completness */ - MAKE_ENUM(Release, IUnknown), /* For completness */ - -/* IMAPIProps */ - MAKE_ENUM(GetLastError, IMAPIProp), - MAKE_ENUM(SaveChanges, IMAPIProp), - MAKE_ENUM(GetProps, IMAPIProp), - MAKE_ENUM(GetPropList, IMAPIProp), - MAKE_ENUM(OpenProperty, IMAPIProp), - MAKE_ENUM(SetProps, IMAPIProp), - MAKE_ENUM(DeleteProps, IMAPIProp), - MAKE_ENUM(CopyTo, IMAPIProp), - MAKE_ENUM(CopyProps, IMAPIProp), - MAKE_ENUM(GetNamesFromIDs, IMAPIProp), - MAKE_ENUM(GetIDsFromNames, IMAPIProp), - -/* IMAPITable */ - MAKE_ENUM(GetLastError, IMAPITable), - MAKE_ENUM(Advise, IMAPITable), - MAKE_ENUM(Unadvise, IMAPITable), - MAKE_ENUM(GetStatus, IMAPITable), - MAKE_ENUM(SetColumns, IMAPITable), - MAKE_ENUM(QueryColumns, IMAPITable), - MAKE_ENUM(GetRowCount, IMAPITable), - MAKE_ENUM(SeekRow, IMAPITable), - MAKE_ENUM(SeekRowApprox, IMAPITable), - MAKE_ENUM(QueryPosition, IMAPITable), - MAKE_ENUM(FindRow, IMAPITable), - MAKE_ENUM(Restrict, IMAPITable), - MAKE_ENUM(CreateBookmark, IMAPITable), - MAKE_ENUM(FreeBookmark, IMAPITable), - MAKE_ENUM(SortTable, IMAPITable), - MAKE_ENUM(QuerySortOrder, IMAPITable), - MAKE_ENUM(QueryRows, IMAPITable), - MAKE_ENUM(Abort, IMAPITable), - MAKE_ENUM(ExpandRow, IMAPITable), - MAKE_ENUM(CollapseRow, IMAPITable), - MAKE_ENUM(WaitForCompletion, IMAPITable), - MAKE_ENUM(GetCollapseState, IMAPITable), - MAKE_ENUM(SetCollapseState, IMAPITable), - -/* IMAPIContainer */ - MAKE_ENUM(GetContentsTable, IMAPIContainer), - MAKE_ENUM(GetHierarchyTable, IMAPIContainer), - MAKE_ENUM(OpenEntry, IMAPIContainer), - MAKE_ENUM(SetSearchCriteria, IMAPIContainer), - MAKE_ENUM(GetSearchCriteria, IMAPIContainer), - -/* IABContainer */ - MAKE_ENUM(CreateEntry, IABContainer), - MAKE_ENUM(CopyEntries, IABContainer), - MAKE_ENUM(DeleteEntries, IABContainer), - MAKE_ENUM(ResolveNames, IABContainer), - -/* IDistList */ - MAKE_ENUM(CreateEntry, IDistList), - MAKE_ENUM(CopyEntries, IDistList), - MAKE_ENUM(DeleteEntries, IDistList), - MAKE_ENUM(ResolveNames, IDistList), - -/* IMAPIFolder */ - MAKE_ENUM(CreateMessage, IMAPIFolder), - MAKE_ENUM(CopyMessages, IMAPIFolder), - MAKE_ENUM(DeleteMessages, IMAPIFolder), - MAKE_ENUM(CreateFolder, IMAPIFolder), - MAKE_ENUM(CopyFolder, IMAPIFolder), - MAKE_ENUM(DeleteFolder, IMAPIFolder), - MAKE_ENUM(SetReadFlags, IMAPIFolder), - MAKE_ENUM(GetMessageStatus, IMAPIFolder), - MAKE_ENUM(SetMessageStatus, IMAPIFolder), - MAKE_ENUM(SaveContentsSort, IMAPIFolder), - MAKE_ENUM(EmptyFolder, IMAPIFolder), - -/* IMsgStore */ - MAKE_ENUM(Advise, IMsgStore), - MAKE_ENUM(Unadvise, IMsgStore), - MAKE_ENUM(CompareEntryIDs, IMsgStore), - MAKE_ENUM(OpenEntry, IMsgStore), - MAKE_ENUM(SetReceiveFolder, IMsgStore), - MAKE_ENUM(GetReceiveFolder, IMsgStore), - MAKE_ENUM(GetReceiveFolderTable, IMsgStore), - MAKE_ENUM(StoreLogoff, IMsgStore), - MAKE_ENUM(AbortSubmit, IMsgStore), - MAKE_ENUM(GetOutgoingQueue, IMsgStore), - MAKE_ENUM(SetLockState, IMsgStore), - MAKE_ENUM(FinishedMsg, IMsgStore), - MAKE_ENUM(NotifyNewMail, IMsgStore), - -/* IMessage */ - MAKE_ENUM(GetAttachmentTable, IMessage), - MAKE_ENUM(OpenAttach, IMessage), - MAKE_ENUM(CreateAttach, IMessage), - MAKE_ENUM(DeleteAttach, IMessage), - MAKE_ENUM(GetRecipientTable, IMessage), - MAKE_ENUM(ModifyRecipients, IMessage), - MAKE_ENUM(SubmitMessage, IMessage), - MAKE_ENUM(SetReadFlag, IMessage), - - -/* IABProvider */ - MAKE_ENUM(Shutdown, IABProvider), - MAKE_ENUM(Logon, IABProvider), - -/* IABLogon */ - MAKE_ENUM(GetLastError, IABLogon), - MAKE_ENUM(Logoff, IABLogon), - MAKE_ENUM(OpenEntry, IABLogon), - MAKE_ENUM(CompareEntryIDs, IABLogon), - MAKE_ENUM(Advise, IABLogon), - MAKE_ENUM(Unadvise, IABLogon), - MAKE_ENUM(OpenStatusEntry, IABLogon), - MAKE_ENUM(OpenTemplateID, IABLogon), - MAKE_ENUM(GetOneOffTable, IABLogon), - MAKE_ENUM(PrepareRecips, IABLogon), - -/* IXPProvider */ - MAKE_ENUM(Shutdown, IXPProvider), - MAKE_ENUM(TransportLogon, IXPProvider), - -/* IXPLogon */ - MAKE_ENUM(AddressTypes, IXPLogon), - MAKE_ENUM(RegisterOptions, IXPLogon), - MAKE_ENUM(TransportNotify, IXPLogon), - MAKE_ENUM(Idle, IXPLogon), - MAKE_ENUM(TransportLogoff, IXPLogon), - MAKE_ENUM(SubmitMessage, IXPLogon), - MAKE_ENUM(EndMessage, IXPLogon), - MAKE_ENUM(Poll, IXPLogon), - MAKE_ENUM(StartMessage, IXPLogon), - MAKE_ENUM(OpenStatusEntry, IXPLogon), - MAKE_ENUM(ValidateState, IXPLogon), - MAKE_ENUM(FlushQueues, IXPLogon), - -/* IMSProvider */ - MAKE_ENUM(Shutdown, IMSProvider), - MAKE_ENUM(Logon, IMSProvider), - MAKE_ENUM(SpoolerLogon, IMSProvider), - MAKE_ENUM(CompareStoreIDs, IMSProvider), - -/* IMSLogon */ - MAKE_ENUM(GetLastError, IMSLogon), - MAKE_ENUM(Logoff, IMSLogon), - MAKE_ENUM(OpenEntry, IMSLogon), - MAKE_ENUM(CompareEntryIDs, IMSLogon), - MAKE_ENUM(Advise, IMSLogon), - MAKE_ENUM(Unadvise, IMSLogon), - MAKE_ENUM(OpenStatusEntry, IMSLogon), - -/* IMAPIControl */ - MAKE_ENUM(GetLastError, IMAPIControl), - MAKE_ENUM(Activate, IMAPIControl), - MAKE_ENUM(GetState, IMAPIControl), - -/* IMAPIStatus */ - MAKE_ENUM(ValidateState, IMAPIStatus), - MAKE_ENUM(SettingsDialog, IMAPIStatus), - MAKE_ENUM(ChangePassword, IMAPIStatus), - MAKE_ENUM(FlushQueues, IMAPIStatus), - -/* IStream */ - MAKE_ENUM(_Read, IStream), - MAKE_ENUM(_Write, IStream), - MAKE_ENUM(Seek, IStream), - MAKE_ENUM(SetSize, IStream), - MAKE_ENUM(CopyTo, IStream), - MAKE_ENUM(Commit, IStream), - MAKE_ENUM(Revert, IStream), - MAKE_ENUM(LockRegion, IStream), - MAKE_ENUM(UnlockRegion, IStream), - MAKE_ENUM(Stat, IStream), - MAKE_ENUM(Clone, IStream), - -/* IMAPIAdviseSink */ - MAKE_ENUM(OnNotify, IMAPIAdviseSink), - -} METHODS; - - -/* Macro wrappers to hide the Validate function return handling */ -#if defined(_AMD64_) || defined(_X86_) -#ifdef __cplusplus - -/* C++ methods can't take the address of the This pointer, so we must - use the first parameter instead */ - -#define ValidateParameters(eMethod, First) \ - { HRESULT _hr_; \ - _hr_ = __CPPValidateParameters(eMethod, (LPVOID) &First); \ - if (HR_FAILED(_hr_)) return (_hr_); } - -#define UlValidateParameters(eMethod, First) \ - { HRESULT _hr_; \ - _hr_ = __CPPValidateParameters(eMethod, &First); \ - if (HR_FAILED(_hr_)) return (ULONG) (_hr_); } - -/* Methods called by MAPI should have correct parameters - - just assert in Debug to check */ -#define CheckParameters(eMethod, First) \ - AssertSz(HR_SUCCEEDED(__CPPValidateParameters(eMethod, &First)), "Parameter validation failed for method called by MAPI!") - - -#else /* __cplusplus */ - -/* For methods that will be called by clients - - validate always */ - -#define ValidateParameters(eMethod, ppThis) \ - { HRESULT _hr_; \ - _hr_ = __ValidateParameters(eMethod, ppThis); \ - if (HR_FAILED(_hr_)) return (_hr_); } - -#define UlValidateParameters(eMethod, ppThis) \ - { HRESULT _hr_; \ - _hr_ = __ValidateParameters(eMethod, ppThis); \ - if (HR_FAILED(_hr_)) return (ULONG) (_hr_); } - -/* Methods called by MAPI should have correct parameters - - just assert in Debug to check */ -#define CheckParameters(eMethod, ppThis) \ - AssertSz(HR_SUCCEEDED(__ValidateParameters(eMethod, ppThis)), "Parameter validation failed for method called by MAPI!") - -#endif /* __cplusplus */ -#endif /* _X86_ || _AMD64_ */ - -/* Prototypes for functions used to validate complex parameters. - */ -#define FBadPropVal( lpPropVal) (FAILED(ScCountProps( 1, lpPropVal, NULL))) - -#define FBadRgPropVal( lpPropVal, cValues) \ - (FAILED(ScCountProps( cValues, lpPropVal, NULL))) - -#define FBadAdrList( lpAdrList) \ - ( AssertSz( ( offsetof( ADRLIST, cEntries) \ - == offsetof( SRowSet, cRows)) \ - && ( offsetof( ADRLIST, aEntries) \ - == offsetof( SRowSet, aRow)) \ - && ( offsetof( ADRENTRY, cValues) \ - == offsetof( SRow, cValues)) \ - && ( offsetof( ADRENTRY, rgPropVals) \ - == offsetof( SRow, lpProps)) \ - , "ADRLIST doesn't match SRowSet") \ - || FBadRowSet( (LPSRowSet) lpAdrList)) - -STDAPI_(BOOL) -FBadRglpszW(__in LPWSTR FAR *lppszW, - ULONG cStrings); - -STDAPI_(BOOL) -FBadRowSet( LPSRowSet lpRowSet); - -STDAPI_(BOOL) -FBadRglpNameID( LPMAPINAMEID FAR * lppNameId, - ULONG cNames); - -STDAPI_(BOOL) -FBadEntryList( LPENTRYLIST lpEntryList); - - -/* BAD_STANDARD_OBJ - * - * This macro insures that the object is a writable object of the correct size - * and that this method belongs to the object. - * - * NOTES ON USE! - * This depends upon using the standard method of declaring the object - * interface. - * - * prefix is the method prefix you chose when declaring the object interface. - * method is the standard method name of the calling method. - * lpVtbl is the name of the lpVtbl element of your object. - */ -#define BAD_STANDARD_OBJ( lpObj, prefix, method, lpVtbl) \ - ( IsBadWritePtr( (lpObj), sizeof(*lpObj)) \ - || IsBadReadPtr( (void *) &(lpObj->lpVtbl->method), sizeof(LPVOID)) \ - ||( ( LPVOID) (lpObj->lpVtbl->method) != (LPVOID) (prefix##method))) - - -#define FBadUnknown( lpObj ) \ - ( IsBadReadPtr( (lpObj), sizeof(LPVOID) ) \ - || IsBadReadPtr( (lpObj)->lpVtbl, 3 * sizeof(LPUNKNOWN) ) \ - || IsBadCodePtr( (FARPROC)(lpObj)->lpVtbl->QueryInterface )) - -/* - * IUnknown - */ - - -/* - * QueryInterface - */ -#define FBadQueryInterface( lpObj, riid, ppvObj) \ - ( IsBadReadPtr( riid, sizeof(IID)) \ - || IsBadWritePtr( ppvObj, sizeof(LPVOID))) - - -/* - * AddRef - * No parameter validation required. - */ -#define FBadAddRef( lpObj) FALSE - - -/* - * Release - * No parameter validation required. - */ -#define FBadRelease( lpObj) FALSE - - -/* - * GetLastError - */ -#define FBadGetLastError( lpObj, hResult, ulFlags, lppMAPIError )\ - (IsBadWritePtr( lppMAPIError, sizeof(LPMAPIERROR))) - -/* - * IMAPIProp - */ - - -/* - * SaveChanges - * No parameter validation required. - */ -#define FBadSaveChanges( lpObj, ulFlags) FALSE - - -/* - * GetProps - */ -#define FBadGetProps( lpObj, lpPTagA, lpcValues, lppPropArray) \ - ( ( lpPTagA \ - && ( IsBadReadPtr( lpPTagA, sizeof(ULONG)) \ - || IsBadReadPtr( lpPTagA, (UINT)( (lpPTagA->cValues + 1) \ - * sizeof(ULONG))))) \ - || IsBadWritePtr( lpcValues, sizeof(ULONG)) \ - || IsBadWritePtr( lppPropArray, sizeof(LPSPropValue))) - - -/* - * GetPropList - */ -#define FBadGetPropList( lpObj, lppPTagA) \ - (IsBadWritePtr( lppPTagA, sizeof(LPSPropTagArray FAR *))) - - -/* - * OpenProperty - */ -#define FBadOpenProperty( lpObj, ulPropTag, lpiid, ulInterfaceOptions, ulFlags \ - , lppUnk) \ - ( IsBadReadPtr( lpiid, sizeof(IID)) \ - || IsBadWritePtr( lppUnk, sizeof (LPUNKNOWN FAR *))) - - -/* - * SetProps - */ -#define FBadSetProps( lpObj, cValues, lpPropArray, lppProblems) \ - ( FBadRgPropVal( lpPropArray, (UINT) cValues) \ - || ( lppProblems \ - && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) - - -/* - * DeleteProps - */ -#define FBadDeleteProps( lpObj, lpPTagA, lppProblems) \ - ( ( !lpPTagA \ - || ( IsBadReadPtr( lpPTagA, sizeof(ULONG)) \ - || IsBadReadPtr( lpPTagA, (UINT)( (lpPTagA->cValues + 1) \ - * sizeof(ULONG))))) \ - || ( lppProblems \ - && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) - - -/* - * CopyTo - */ -#define FBadCopyTo( lpIPDAT, ciidExclude, rgiidExclude, lpExcludeProps \ - , ulUIParam, lpProgress, lpInterface, lpDestObj \ - , ulFlags, lppProblems) \ - ( ( ciidExclude \ - && ( IsBadReadPtr( rgiidExclude, (UINT)(ciidExclude * sizeof(IID))))) \ - || ( lpExcludeProps \ - && ( IsBadReadPtr( lpExcludeProps, sizeof(ULONG)) \ - || IsBadReadPtr( lpExcludeProps \ - , (UINT)( (lpExcludeProps->cValues + 1) \ - * sizeof(ULONG))))) \ - || (lpProgress && FBadUnknown( lpProgress )) \ - || (lpInterface && IsBadReadPtr( lpInterface, sizeof(IID))) \ - || IsBadReadPtr( lpDestObj, sizeof(LPVOID)) \ - || ( lppProblems \ - && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) - - -/* - * CopyProps - */ -#define FBadCopyProps( lpIPDAT, lpPropTagArray \ - , ulUIParam, lpProgress, lpInterface, lpDestObj \ - , ulFlags, lppProblems) \ - ( ( lpPropTagArray \ - && ( IsBadReadPtr( lpPropTagArray, sizeof(ULONG)) \ - || IsBadReadPtr( lpPropTagArray \ - , (UINT)( (lpPropTagArray->cValues + 1) \ - * sizeof(ULONG))))) \ - || (lpProgress && FBadUnknown( lpProgress )) \ - || (lpInterface && IsBadReadPtr( lpInterface, sizeof(IID))) \ - || IsBadReadPtr( lpDestObj, sizeof(LPVOID)) \ - || ( lppProblems \ - && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) - - - -/* - * GetNamesFromIDs - */ -#define FBadGetNamesFromIDs( lpIPDAT, lppPropTags, lpPropSetGuid, ulFlags, \ - lpcPropNames, lpppPropNames) \ - ( IsBadReadPtr( lppPropTags, sizeof(LPSPropTagArray)) \ - || ( lpPropSetGuid && IsBadReadPtr( lpPropSetGuid, sizeof(GUID))) \ - || ( *lppPropTags \ - && ( IsBadReadPtr( *lppPropTags, sizeof(ULONG)) \ - || IsBadReadPtr( *lppPropTags \ - , (UINT)( ( ( *lppPropTags)->cValues + 1) \ - * sizeof(ULONG))))) \ - || IsBadWritePtr( lpcPropNames, sizeof (ULONG)) \ - || IsBadWritePtr( lpppPropNames, sizeof (LPVOID FAR *))) - - - -/* - * GetNamesFromIDs - */ -#define FBadGetIDsFromNames( lpIPDAT, cPropNames, lppPropNames, ulFlags \ - , lppPropTags) \ - ( (cPropNames && FBadRglpNameID( lppPropNames, cPropNames)) \ - || IsBadWritePtr( lppPropTags, sizeof(LPULONG FAR *))) - - -STDAPI_(ULONG) -FBadRestriction( LPSRestriction lpres ); - -STDAPI_(ULONG) -FBadPropTag( ULONG ulPropTag ); - -STDAPI_(ULONG) -FBadRow( LPSRow lprow ); - -STDAPI_(ULONG) -FBadProp( LPSPropValue lpprop ); - -STDAPI_(ULONG) -FBadSortOrderSet( LPSSortOrderSet lpsos ); - -STDAPI_(ULONG) -FBadColumnSet( LPSPropTagArray lpptaCols ); - -/* Validation function - - The eMethod parameter tells us which internal validation to perform. - - The ppThis parameter tells us where the stack is, so we can access the other - parameters. - - Becuase of this *magic* we MUST obtain the pointer to the This pointer in - the method function. - -*/ - -#if defined(_WIN64) || defined(_WIN32) -#define BASED_STACK -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif - -#if defined(_WIN64) || defined(_WIN32) -HRESULT STDAPICALLTYPE -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif - -__CPPValidateParameters(METHODS eMethod, const LPVOID ppFirst); - -#if defined(_WIN64) || defined(_WIN32) -HRESULT STDAPICALLTYPE -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif -__ValidateParameters(METHODS eMethod, LPVOID ppThis); - -#ifdef _MAC -#define STDAPIVCALLTYPE __cdecl -#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE -#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE -#endif /* _MAC */ - -/* Macro wrappers for platform independent validation */ - -#if defined(_AMD64_) || defined(_X86_) - -#define ArgShiftN (1 + (sizeof(DWORD_PTR)>>2)) -#define ArgSize(T) ((sizeof(T)+sizeof(DWORD_PTR)-1)>>ArgShiftN) - -#define MakeArg1(idx, a1) memcpy(__rgArgs+idx, &a1, ArgSize(a1)*sizeof(DWORD_PTR)) -#define MakeArg2(idx, a1, a2) MakeArg1(idx, a1); MakeArg1(idx+ArgSize(a1), a2) -#define MakeArg3(idx, a1, a2, a3) MakeArg1(idx, a1); MakeArg2(idx+ArgSize(a1), a2, a3) -#define MakeArg4(idx, a1, a2, a3, a4) MakeArg1(idx, a1); MakeArg3(idx+ArgSize(a1), a2, a3, a4) -#define MakeArg5(idx, a1, a2, a3, a4, a5) MakeArg1(idx, a1); MakeArg4(idx+ArgSize(a1), a2, a3, a4, a5) -#define MakeArg6(idx, a1, a2, a3, a4, a5, a6) MakeArg1(idx, a1); MakeArg5(idx+ArgSize(a1), a2, a3, a4, a5, a6) -#define MakeArg7(idx, a1, a2, a3, a4, a5, a6, a7) MakeArg1(idx, a1); MakeArg6(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7) -#define MakeArg8(idx, a1, a2, a3, a4, a5, a6, a7, a8) MakeArg1(idx, a1); MakeArg7(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8) -#define MakeArg9(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9) MakeArg1(idx, a1); MakeArg8(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9) -#define MakeArg10(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) MakeArg1(idx, a1); MakeArg9(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10) -#define MakeArg11(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) MakeArg1(idx, a1); MakeArg10(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) -#define MakeArg12(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) MakeArg1(idx, a1); MakeArg11(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) -#define MakeArg13(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) MakeArg1(idx, a1); MakeArg12(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) -#define MakeArg14(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) MakeArg1(idx, a1); MakeArg13(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) -#define MakeArg15(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) MakeArg1(idx, a1); MakeArg14(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) -#define MakeArg16(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) MakeArg1(idx, a1); MakeArg15(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) - -#define MakeArray1(a1) \ - DWORD_PTR __rgArgs[ArgSize(a1)]; \ - MakeArg1(0, a1) - -#define MakeArray2(a1, a2) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2)]; \ - MakeArg2(0, a1, a2) - -#define MakeArray3(a1, a2, a3) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3)]; \ - MakeArg3(0, a1, a2, a3) - -#define MakeArray4(a1, a2, a3, a4) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4)]; \ - MakeArg4(0, a1, a2, a3, a4) - -#define MakeArray5(a1, a2, a3, a4, a5) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5)]; \ - MakeArg5(0, a1, a2, a3, a4, a5) - -#define MakeArray6(a1, a2, a3, a4, a5, a6) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6)]; \ - MakeArg6(0, a1, a2, a3, a4, a5, a6) - -#define MakeArray7(a1, a2, a3, a4, a5, a6, a7) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7)]; \ - MakeArg7(0, a1, a2, a3, a4, a5, a6, a7) - -#define MakeArray8(a1, a2, a3, a4, a5, a6, a7, a8) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8)]; \ - MakeArg8(0, a1, a2, a3, a4, a5, a6, a7, a8) - -#define MakeArray9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9)]; \ - MakeArg9(0, a1, a2, a3, a4, a5, a6, a7, a8, a9) - -#define MakeArray10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10)]; \ - MakeArg10(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - -#define MakeArray11(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11)]; \ - MakeArg11(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) - -#define MakeArray12(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12)]; \ - MakeArg12(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) - -#define MakeArray13(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13)]; \ - MakeArg13(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) - -#define MakeArray14(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13) + ArgSize(a14)]; \ - MakeArg14(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) - -#define MakeArray15(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13) + ArgSize(a14) + ArgSize(a15)]; \ - MakeArg15(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) - -#define MakeArray16(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) \ - DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13) + ArgSize(a14) + ArgSize(a15) + ArgSize(a16)]; \ - MakeArg16(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) - - - -#define ValidateParameters1( m, a1 ) -#define ValidateParameters2( m, a1, a2 ) \ - { HRESULT _hr_; \ - MakeArray1(a2); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters3( m, a1, a2, a3 ) \ - { HRESULT _hr_; \ - MakeArray2(a2, a3); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters4( m, a1, a2, a3, a4 ) \ - { HRESULT _hr_; \ - MakeArray3(a2, a3, a4); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters5( m, a1, a2, a3, a4, a5 ) \ - { HRESULT _hr_; \ - MakeArray4(a2, a3, a4, a5); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ - { HRESULT _hr_; \ - MakeArray5(a2, a3, a4, a5, a6); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ - { HRESULT _hr_; \ - MakeArray6(a2, a3, a4, a5, a6, a7); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ - { HRESULT _hr_; \ - MakeArray7(a2, a3, a4, a5, a6, a7, a8); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - { HRESULT _hr_; \ - MakeArray8(a2, a3, a4, a5, a6, a7, a8, a9); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - { HRESULT _hr_; \ - MakeArray9(a2, a3, a4, a5, a6, a7, a8, a9, a10); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ - { HRESULT _hr_; \ - MakeArray10(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ - { HRESULT _hr_; \ - MakeArray11(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - { HRESULT _hr_; \ - MakeArray12(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ - { HRESULT _hr_; \ - MakeArray13(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ - { HRESULT _hr_; \ - MakeArray14(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } -#define ValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ - { HRESULT _hr_; \ - MakeArray15(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } - -#define UlValidateParameters1( m, a1 ) -#define UlValidateParameters2( m, a1, a2 ) \ - { HRESULT _hr_; \ - MakeArray1(a2); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters3( m, a1, a2, a3 ) \ - { HRESULT _hr_; \ - MakeArray2(a2, a3); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters4( m, a1, a2, a3, a4 ) \ - { HRESULT _hr_; \ - MakeArray3(a2, a3, a4); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters5( m, a1, a2, a3, a4, a5 ) \ - { HRESULT _hr_; \ - MakeArray4(a2, a3, a4, a5); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ - { HRESULT _hr_; \ - MakeArray5(a2, a3, a4, a5, a6); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ - { HRESULT _hr_; \ - MakeArray6(a2, a3, a4, a5, a6, a7); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ - { HRESULT _hr_; \ - MakeArray7(a2, a3, a4, a5, a6, a7, a8); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - { HRESULT _hr_; \ - MakeArray8(a2, a3, a4, a5, a6, a7, a8, a9); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - { HRESULT _hr_; \ - MakeArray9(a2, a3, a4, a5, a6, a7, a8, a9, a10); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ - { HRESULT _hr_; \ - MakeArray10(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ - { HRESULT _hr_; \ - MakeArray11(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - { HRESULT _hr_; \ - MakeArray12(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ - { HRESULT _hr_; \ - MakeArray13(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ - { HRESULT _hr_; \ - MakeArray14(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } -#define UlValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ - { HRESULT _hr_; \ - MakeArray15(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); \ - _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } - -#ifdef DEBUG -#define CheckParameters1( m, a1 ) -#define CheckParameters2( m, a1, a2 ) \ - { \ - MakeArray1(a2); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters3( m, a1, a2, a3 ) \ - { \ - MakeArray2(a2, a3); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters4( m, a1, a2, a3, a4 ) \ - { \ - MakeArray3(a2, a3, a4); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters5( m, a1, a2, a3, a4, a5 ) \ - { \ - MakeArray4(a2, a3, a4, a5); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) \ - { \ - MakeArray5(a2, a3, a4, a5, a6); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ - { \ - MakeArray6(a2, a3, a4, a5, a6, a7); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ - { \ - MakeArray7(a2, a3, a4, a5, a6, a7, a8); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - { \ - MakeArray8(a2, a3, a4, a5, a6, a7, a8, a9); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - { \ - MakeArray9(a2, a3, a4, a5, a6, a7, a8, a9, a10); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ - { \ - MakeArray10(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ - { \ - MakeArray11(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - { \ - MakeArray12(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ - { \ - MakeArray13(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ - { \ - MakeArray14(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ - { \ - MakeArray15(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); \ - AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } -#else /* DEBUG */ -#define CheckParameters1( m, a1 ) -#define CheckParameters2( m, a1, a2 ) -#define CheckParameters3( m, a1, a2, a3 ) -#define CheckParameters4( m, a1, a2, a3, a4 ) -#define CheckParameters5( m, a1, a2, a3, a4, a5 ) -#define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) -#define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) -#define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) -#define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) -#define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) -#define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) -#define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) -#define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) -#define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) -#endif /* DEBUG */ -#else /* !_AMD64_ && !_X86_ */ -#define ValidateParms(x) { HRESULT _hr_ = HrValidateParametersV x; if (HR_FAILED(_hr_)) return (_hr_); } -#define UlValidateParms(x) { HRESULT _hr_ = HrValidateParametersV x; if (HR_FAILED(_hr_)) return (ULONG)(_hr_); } -#define CheckParms(x) AssertSz(HR_SUCCEEDED( HrValidateParametersV x ), "Parameter validation failed for method called by MAPI!") - -#define ValidateParameters1( m, a1 ) \ - ValidateParms( ( m, a1 ) ) -#define ValidateParameters2( m, a1, a2 ) \ - ValidateParms( ( m, a1, a2 )) -#define ValidateParameters3( m, a1, a2, a3 ) \ - ValidateParms( ( m, a1, a2, a3 )) -#define ValidateParameters4( m, a1, a2, a3, a4 ) \ - ValidateParms( ( m, a1, a2, a3, a4 )) -#define ValidateParameters5( m, a1, a2, a3, a4, a5 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5 )) -#define ValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6 )) -#define ValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7 )) -#define ValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 )) -#define ValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 )) -#define ValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )) -#define ValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 )) -#define ValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 )) -#define ValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 )) -#define ValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 )) -#define ValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 )) -#define ValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ - ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 )) - -#define UlValidateParameters1( m, a1 ) \ - UlValidateParms( ( m, a1 ) ) -#define UlValidateParameters2( m, a1, a2 ) \ - UlValidateParms( ( m, a1, a2 )) -#define UlValidateParameters3( m, a1, a2, a3 ) \ - UlValidateParms( ( m, a1, a2, a3 )) -#define UlValidateParameters4( m, a1, a2, a3, a4 ) \ - UlValidateParms( ( m, a1, a2, a3, a4 )) -#define UlValidateParameters5( m, a1, a2, a3, a4, a5 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5 )) -#define UlValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6 )) -#define UlValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7 )) -#define UlValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 )) -#define UlValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 )) -#define UlValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )) -#define UlValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 )) -#define UlValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 )) -#define UlValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 )) -#define UlValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 )) -#define UlValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 )) -#define UlValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ - UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 )) - -#define CheckParameters1( m, a1 ) \ - CheckParms( ( m, a1 ) ) -#define CheckParameters2( m, a1, a2 ) \ - CheckParms( ( m, a1, a2 )) -#define CheckParameters3( m, a1, a2, a3 ) \ - CheckParms( ( m, a1, a2, a3 )) -#define CheckParameters4( m, a1, a2, a3, a4 ) \ - CheckParms( ( m, a1, a2, a3, a4 )) -#define CheckParameters5( m, a1, a2, a3, a4, a5 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5 )) -#define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6 )) -#define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7 )) -#define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 )) -#define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 )) -#define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )) -#define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 )) -#define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 )) -#define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 )) -#define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 )) -#define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 )) -#define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ - CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 )) - -#endif /* _AMD64_ || _X86_ */ - - -/* - * M A P I P A R A M E T E R V A L I D A T I O N M A C R O S - */ - - -/* IUnknown */ - -#define Validate_IUnknown_QueryInterface( a1, a2, a3 ) \ - ValidateParameters3( IUnknown_QueryInterface, a1, a2, a3 ) -#define UlValidate_IUnknown_QueryInterface( a1, a2, a3 ) \ - UlValidateParameters3( IUnknown_QueryInterface, a1, a2, a3 ) -#define CheckParameters_IUnknown_QueryInterface( a1, a2, a3 ) \ - CheckParameters3( IUnknown_QueryInterface, a1, a2, a3 ) - -#define Validate_IUnknown_AddRef( a1 ) \ - ValidateParameters1( IUnknown_AddRef, a1 ) -#define UlValidate_IUnknown_AddRef( a1 ) \ - UlValidateParameters1( IUnknown_AddRef, a1 ) -#define CheckParameters_IUnknown_AddRef( a1 ) \ - CheckParameters1( IUnknown_AddRef, a1 ) - -#define Validate_IUnknown_Release( a1 ) \ - ValidateParameters1( IUnknown_Release, a1 ) -#define UlValidate_IUnknown_Release( a1 ) \ - UlValidateParameters1( IUnknown_Release, a1 ) -#define CheckParameters_IUnknown_Release( a1 ) \ - CheckParameters1( IUnknown_Release, a1 ) - - -/* IMAPIProp */ - -#define Validate_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 ) -#define UlValidate_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 ) -#define CheckParameters_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 ) - -#define Validate_IMAPIProp_SaveChanges( a1, a2 ) \ - ValidateParameters2( IMAPIProp_SaveChanges, a1, a2 ) -#define UlValidate_IMAPIProp_SaveChanges( a1, a2 ) \ - UlValidateParameters2( IMAPIProp_SaveChanges, a1, a2 ) -#define CheckParameters_IMAPIProp_SaveChanges( a1, a2 ) \ - CheckParameters2( IMAPIProp_SaveChanges, a1, a2 ) - -#define Validate_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 ) - -#define Validate_IMAPIProp_GetPropList( a1, a2, a3 ) \ - ValidateParameters3( IMAPIProp_GetPropList, a1, a2, a3 ) -#define UlValidate_IMAPIProp_GetPropList( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIProp_GetPropList, a1, a2, a3 ) -#define CheckParameters_IMAPIProp_GetPropList( a1, a2, a3 ) \ - CheckParameters3( IMAPIProp_GetPropList, a1, a2, a3 ) - -#define Validate_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMAPIProp_SetProps( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 ) -#define UlValidate_IMAPIProp_SetProps( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 ) -#define CheckParameters_IMAPIProp_SetProps( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 ) - -#define Validate_IMAPIProp_DeleteProps( a1, a2, a3 ) \ - ValidateParameters3( IMAPIProp_DeleteProps, a1, a2, a3 ) -#define UlValidate_IMAPIProp_DeleteProps( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIProp_DeleteProps, a1, a2, a3 ) -#define CheckParameters_IMAPIProp_DeleteProps( a1, a2, a3 ) \ - CheckParameters3( IMAPIProp_DeleteProps, a1, a2, a3 ) - -#define Validate_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - ValidateParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) -#define UlValidate_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - UlValidateParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) -#define CheckParameters_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ - CheckParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) - -#define Validate_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \ - ValidateParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 ) -#define UlValidate_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \ - UlValidateParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 ) -#define CheckParameters_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \ - CheckParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 ) - -#define Validate_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 ) - - -/* IMAPITable */ - -#define Validate_IMAPITable_GetLastError( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 ) -#define UlValidate_IMAPITable_GetLastError( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 ) -#define CheckParameters_IMAPITable_GetLastError( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 ) - -#define Validate_IMAPITable_Advise( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPITable_Advise, a1, a2, a3, a4 ) -#define UlValidate_IMAPITable_Advise( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPITable_Advise, a1, a2, a3, a4 ) -#define CheckParameters_IMAPITable_Advise( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPITable_Advise, a1, a2, a3, a4 ) - -#define Validate_IMAPITable_Unadvise( a1, a2 ) \ - ValidateParameters2( IMAPITable_Unadvise, a1, a2 ) -#define UlValidate_IMAPITable_Unadvise( a1, a2 ) \ - UlValidateParameters2( IMAPITable_Unadvise, a1, a2 ) -#define CheckParameters_IMAPITable_Unadvise( a1, a2 ) \ - CheckParameters2( IMAPITable_Unadvise, a1, a2 ) - -#define Validate_IMAPITable_GetStatus( a1, a2, a3 ) \ - ValidateParameters3( IMAPITable_GetStatus, a1, a2, a3 ) -#define UlValidate_IMAPITable_GetStatus( a1, a2, a3 ) \ - UlValidateParameters3( IMAPITable_GetStatus, a1, a2, a3 ) -#define CheckParameters_IMAPITable_GetStatus( a1, a2, a3 ) \ - CheckParameters3( IMAPITable_GetStatus, a1, a2, a3 ) - -#define Validate_IMAPITable_SetColumns( a1, a2, a3 ) \ - ValidateParameters3( IMAPITable_SetColumns, a1, a2, a3 ) -#define UlValidate_IMAPITable_SetColumns( a1, a2, a3 ) \ - UlValidateParameters3( IMAPITable_SetColumns, a1, a2, a3 ) -#define CheckParameters_IMAPITable_SetColumns( a1, a2, a3 ) \ - CheckParameters3( IMAPITable_SetColumns, a1, a2, a3 ) - -#define Validate_IMAPITable_QueryColumns( a1, a2, a3 ) \ - ValidateParameters3( IMAPITable_QueryColumns, a1, a2, a3 ) -#define UlValidate_IMAPITable_QueryColumns( a1, a2, a3 ) \ - UlValidateParameters3( IMAPITable_QueryColumns, a1, a2, a3 ) -#define CheckParameters_IMAPITable_QueryColumns( a1, a2, a3 ) \ - CheckParameters3( IMAPITable_QueryColumns, a1, a2, a3 ) - -#define Validate_IMAPITable_GetRowCount( a1, a2, a3 ) \ - ValidateParameters3( IMAPITable_GetRowCount, a1, a2, a3 ) -#define UlValidate_IMAPITable_GetRowCount( a1, a2, a3 ) \ - UlValidateParameters3( IMAPITable_GetRowCount, a1, a2, a3 ) -#define CheckParameters_IMAPITable_GetRowCount( a1, a2, a3 ) \ - CheckParameters3( IMAPITable_GetRowCount, a1, a2, a3 ) - -#define Validate_IMAPITable_SeekRow( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 ) -#define UlValidate_IMAPITable_SeekRow( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 ) -#define CheckParameters_IMAPITable_SeekRow( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 ) - -#define Validate_IMAPITable_SeekRowApprox( a1, a2, a3 ) \ - ValidateParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 ) -#define UlValidate_IMAPITable_SeekRowApprox( a1, a2, a3 ) \ - UlValidateParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 ) -#define CheckParameters_IMAPITable_SeekRowApprox( a1, a2, a3 ) \ - CheckParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 ) - -#define Validate_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 ) -#define UlValidate_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 ) -#define CheckParameters_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 ) - -#define Validate_IMAPITable_FindRow( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPITable_FindRow, a1, a2, a3, a4 ) -#define UlValidate_IMAPITable_FindRow( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPITable_FindRow, a1, a2, a3, a4 ) -#define CheckParameters_IMAPITable_FindRow( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPITable_FindRow, a1, a2, a3, a4 ) - -#define Validate_IMAPITable_Restrict( a1, a2, a3 ) \ - ValidateParameters3( IMAPITable_Restrict, a1, a2, a3 ) -#define UlValidate_IMAPITable_Restrict( a1, a2, a3 ) \ - UlValidateParameters3( IMAPITable_Restrict, a1, a2, a3 ) -#define CheckParameters_IMAPITable_Restrict( a1, a2, a3 ) \ - CheckParameters3( IMAPITable_Restrict, a1, a2, a3 ) - -#define Validate_IMAPITable_CreateBookmark( a1, a2 ) \ - ValidateParameters2( IMAPITable_CreateBookmark, a1, a2 ) -#define UlValidate_IMAPITable_CreateBookmark( a1, a2 ) \ - UlValidateParameters2( IMAPITable_CreateBookmark, a1, a2 ) -#define CheckParameters_IMAPITable_CreateBookmark( a1, a2 ) \ - CheckParameters2( IMAPITable_CreateBookmark, a1, a2 ) - -#define Validate_IMAPITable_FreeBookmark( a1, a2 ) \ - ValidateParameters2( IMAPITable_FreeBookmark, a1, a2 ) -#define UlValidate_IMAPITable_FreeBookmark( a1, a2 ) \ - UlValidateParameters2( IMAPITable_FreeBookmark, a1, a2 ) -#define CheckParameters_IMAPITable_FreeBookmark( a1, a2 ) \ - CheckParameters2( IMAPITable_FreeBookmark, a1, a2 ) - -#define Validate_IMAPITable_SortTable( a1, a2, a3 ) \ - ValidateParameters3( IMAPITable_SortTable, a1, a2, a3 ) -#define UlValidate_IMAPITable_SortTable( a1, a2, a3 ) \ - UlValidateParameters3( IMAPITable_SortTable, a1, a2, a3 ) -#define CheckParameters_IMAPITable_SortTable( a1, a2, a3 ) \ - CheckParameters3( IMAPITable_SortTable, a1, a2, a3 ) - -#define Validate_IMAPITable_QuerySortOrder( a1, a2 ) \ - ValidateParameters2( IMAPITable_QuerySortOrder, a1, a2 ) -#define UlValidate_IMAPITable_QuerySortOrder( a1, a2 ) \ - UlValidateParameters2( IMAPITable_QuerySortOrder, a1, a2 ) -#define CheckParameters_IMAPITable_QuerySortOrder( a1, a2 ) \ - CheckParameters2( IMAPITable_QuerySortOrder, a1, a2 ) - -#define Validate_IMAPITable_QueryRows( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 ) -#define UlValidate_IMAPITable_QueryRows( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 ) -#define CheckParameters_IMAPITable_QueryRows( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 ) - -#define Validate_IMAPITable_Abort( a1 ) \ - ValidateParameters1( IMAPITable_Abort, a1 ) -#define UlValidate_IMAPITable_Abort( a1 ) \ - UlValidateParameters1( IMAPITable_Abort, a1 ) -#define CheckParameters_IMAPITable_Abort( a1 ) \ - CheckParameters1( IMAPITable_Abort, a1 ) - -#define Validate_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 ) - -#define Validate_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 ) -#define UlValidate_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 ) -#define CheckParameters_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 ) - -#define Validate_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 ) - - -/* IMAPIContainer */ - -#define Validate_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \ - ValidateParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 ) -#define UlValidate_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 ) -#define CheckParameters_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \ - CheckParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 ) - -#define Validate_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \ - ValidateParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 ) -#define UlValidate_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 ) -#define CheckParameters_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \ - CheckParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 ) - -#define Validate_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 ) -#define UlValidate_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 ) -#define CheckParameters_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 ) - -#define Validate_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 ) - - -/* IABContainer */ - -#define Validate_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 ) -#define UlValidate_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 ) -#define CheckParameters_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 ) - -#define Validate_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 ) -#define UlValidate_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 ) -#define CheckParameters_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 ) - -#define Validate_IABContainer_DeleteEntries( a1, a2, a3 ) \ - ValidateParameters3( IABContainer_DeleteEntries, a1, a2, a3 ) -#define UlValidate_IABContainer_DeleteEntries( a1, a2, a3 ) \ - UlValidateParameters3( IABContainer_DeleteEntries, a1, a2, a3 ) -#define CheckParameters_IABContainer_DeleteEntries( a1, a2, a3 ) \ - CheckParameters3( IABContainer_DeleteEntries, a1, a2, a3 ) - -#define Validate_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 ) -#define UlValidate_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 ) -#define CheckParameters_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 ) - - -/* IDistList */ - -#define Validate_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 ) -#define UlValidate_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 ) -#define CheckParameters_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 ) - -#define Validate_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 ) -#define UlValidate_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 ) -#define CheckParameters_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 ) - -#define Validate_IDistList_DeleteEntries( a1, a2, a3 ) \ - ValidateParameters3( IDistList_DeleteEntries, a1, a2, a3 ) -#define UlValidate_IDistList_DeleteEntries( a1, a2, a3 ) \ - UlValidateParameters3( IDistList_DeleteEntries, a1, a2, a3 ) -#define CheckParameters_IDistList_DeleteEntries( a1, a2, a3 ) \ - CheckParameters3( IDistList_DeleteEntries, a1, a2, a3 ) - -#define Validate_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 ) -#define UlValidate_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 ) -#define CheckParameters_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 ) - - -/* IMAPIFolder */ - -#define Validate_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 ) -#define UlValidate_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 ) -#define CheckParameters_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 ) - -#define Validate_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 ) - -#define Validate_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - ValidateParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) -#define UlValidate_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - UlValidateParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) -#define CheckParameters_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - CheckParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) - -#define Validate_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 ) - -#define Validate_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 ) - -#define Validate_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \ - ValidateParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 ) -#define UlValidate_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 ) -#define CheckParameters_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \ - CheckParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 ) - -#define Validate_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 ) -#define UlValidate_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 ) -#define CheckParameters_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 ) - - -/* IMsgStore */ - -#define Validate_IMsgStore_Advise( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMsgStore_Advise, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMsgStore_Advise( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMsgStore_Advise, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMsgStore_Advise( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMsgStore_Advise, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMsgStore_Unadvise( a1, a2 ) \ - ValidateParameters2( IMsgStore_Unadvise, a1, a2 ) -#define UlValidate_IMsgStore_Unadvise( a1, a2 ) \ - UlValidateParameters2( IMsgStore_Unadvise, a1, a2 ) -#define CheckParameters_IMsgStore_Unadvise( a1, a2 ) \ - CheckParameters2( IMsgStore_Unadvise, a1, a2 ) - -#define Validate_IMsgStore_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMsgStore_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMsgStore_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMsgStore_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMsgStore_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMsgStore_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMsgStore_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMsgStore_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMsgStore_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMsgStore_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMsgStore_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMsgStore_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMsgStore_SetReceiveFolder( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMsgStore_SetReceiveFolder, a1, a2, a3, a4, a5 ) -#define UlValidate_IMsgStore_SetReceiveFolder( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMsgStore_SetReceiveFolder, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMsgStore_SetReceiveFolder( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMsgStore_SetReceiveFolder, a1, a2, a3, a4, a5 ) - -#define Validate_IMsgStore_GetReceiveFolder( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMsgStore_GetReceiveFolder, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMsgStore_GetReceiveFolder( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMsgStore_GetReceiveFolder, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMsgStore_GetReceiveFolder( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMsgStore_GetReceiveFolder, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMsgStore_GetReceiveFolderTable( a1, a2, a3 ) \ - ValidateParameters3( IMsgStore_GetReceiveFolderTable, a1, a2, a3 ) -#define UlValidate_IMsgStore_GetReceiveFolderTable( a1, a2, a3 ) \ - UlValidateParameters3( IMsgStore_GetReceiveFolderTable, a1, a2, a3 ) -#define CheckParameters_IMsgStore_GetReceiveFolderTable( a1, a2, a3 ) \ - CheckParameters3( IMsgStore_GetReceiveFolderTable, a1, a2, a3 ) - -#define Validate_IMsgStore_StoreLogoff( a1, a2 ) \ - ValidateParameters2( IMsgStore_StoreLogoff, a1, a2 ) -#define UlValidate_IMsgStore_StoreLogoff( a1, a2 ) \ - UlValidateParameters2( IMsgStore_StoreLogoff, a1, a2 ) -#define CheckParameters_IMsgStore_StoreLogoff( a1, a2 ) \ - CheckParameters2( IMsgStore_StoreLogoff, a1, a2 ) - -#define Validate_IMsgStore_AbortSubmit( a1, a2, a3, a4 ) \ - ValidateParameters4( IMsgStore_AbortSubmit, a1, a2, a3, a4 ) -#define UlValidate_IMsgStore_AbortSubmit( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMsgStore_AbortSubmit, a1, a2, a3, a4 ) -#define CheckParameters_IMsgStore_AbortSubmit( a1, a2, a3, a4 ) \ - CheckParameters4( IMsgStore_AbortSubmit, a1, a2, a3, a4 ) - -#define Validate_IMsgStore_GetOutgoingQueue( a1, a2, a3 ) \ - ValidateParameters3( IMsgStore_GetOutgoingQueue, a1, a2, a3 ) -#define UlValidate_IMsgStore_GetOutgoingQueue( a1, a2, a3 ) \ - UlValidateParameters3( IMsgStore_GetOutgoingQueue, a1, a2, a3 ) -#define CheckParameters_IMsgStore_GetOutgoingQueue( a1, a2, a3 ) \ - CheckParameters3( IMsgStore_GetOutgoingQueue, a1, a2, a3 ) - -#define Validate_IMsgStore_SetLockState( a1, a2, a3 ) \ - ValidateParameters3( IMsgStore_SetLockState, a1, a2, a3 ) -#define UlValidate_IMsgStore_SetLockState( a1, a2, a3 ) \ - UlValidateParameters3( IMsgStore_SetLockState, a1, a2, a3 ) -#define CheckParameters_IMsgStore_SetLockState( a1, a2, a3 ) \ - CheckParameters3( IMsgStore_SetLockState, a1, a2, a3 ) - -#define Validate_IMsgStore_FinishedMsg( a1, a2, a3, a4 ) \ - ValidateParameters4( IMsgStore_FinishedMsg, a1, a2, a3, a4 ) -#define UlValidate_IMsgStore_FinishedMsg( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMsgStore_FinishedMsg, a1, a2, a3, a4 ) -#define CheckParameters_IMsgStore_FinishedMsg( a1, a2, a3, a4 ) \ - CheckParameters4( IMsgStore_FinishedMsg, a1, a2, a3, a4 ) - -#define Validate_IMsgStore_NotifyNewMail( a1, a2 ) \ - ValidateParameters2( IMsgStore_NotifyNewMail, a1, a2 ) -#define UlValidate_IMsgStore_NotifyNewMail( a1, a2 ) \ - UlValidateParameters2( IMsgStore_NotifyNewMail, a1, a2 ) -#define CheckParameters_IMsgStore_NotifyNewMail( a1, a2 ) \ - CheckParameters2( IMsgStore_NotifyNewMail, a1, a2 ) - - -/* IMessage */ - -#define Validate_IMessage_GetAttachmentTable( a1, a2, a3 ) \ - ValidateParameters3( IMessage_GetAttachmentTable, a1, a2, a3 ) -#define UlValidate_IMessage_GetAttachmentTable( a1, a2, a3 ) \ - UlValidateParameters3( IMessage_GetAttachmentTable, a1, a2, a3 ) -#define CheckParameters_IMessage_GetAttachmentTable( a1, a2, a3 ) \ - CheckParameters3( IMessage_GetAttachmentTable, a1, a2, a3 ) - -#define Validate_IMessage_OpenAttach( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMessage_OpenAttach, a1, a2, a3, a4, a5 ) -#define UlValidate_IMessage_OpenAttach( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMessage_OpenAttach, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMessage_OpenAttach( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMessage_OpenAttach, a1, a2, a3, a4, a5 ) - -#define Validate_IMessage_CreateAttach( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMessage_CreateAttach, a1, a2, a3, a4, a5 ) -#define UlValidate_IMessage_CreateAttach( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMessage_CreateAttach, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMessage_CreateAttach( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMessage_CreateAttach, a1, a2, a3, a4, a5 ) - -#define Validate_IMessage_DeleteAttach( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMessage_DeleteAttach, a1, a2, a3, a4, a5 ) -#define UlValidate_IMessage_DeleteAttach( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMessage_DeleteAttach, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMessage_DeleteAttach( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMessage_DeleteAttach, a1, a2, a3, a4, a5 ) - -#define Validate_IMessage_GetRecipientTable( a1, a2, a3 ) \ - ValidateParameters3( IMessage_GetRecipientTable, a1, a2, a3 ) -#define UlValidate_IMessage_GetRecipientTable( a1, a2, a3 ) \ - UlValidateParameters3( IMessage_GetRecipientTable, a1, a2, a3 ) -#define CheckParameters_IMessage_GetRecipientTable( a1, a2, a3 ) \ - CheckParameters3( IMessage_GetRecipientTable, a1, a2, a3 ) - -#define Validate_IMessage_ModifyRecipients( a1, a2, a3 ) \ - ValidateParameters3( IMessage_ModifyRecipients, a1, a2, a3 ) -#define UlValidate_IMessage_ModifyRecipients( a1, a2, a3 ) \ - UlValidateParameters3( IMessage_ModifyRecipients, a1, a2, a3 ) -#define CheckParameters_IMessage_ModifyRecipients( a1, a2, a3 ) \ - CheckParameters3( IMessage_ModifyRecipients, a1, a2, a3 ) - -#define Validate_IMessage_SubmitMessage( a1, a2 ) \ - ValidateParameters2( IMessage_SubmitMessage, a1, a2 ) -#define UlValidate_IMessage_SubmitMessage( a1, a2 ) \ - UlValidateParameters2( IMessage_SubmitMessage, a1, a2 ) -#define CheckParameters_IMessage_SubmitMessage( a1, a2 ) \ - CheckParameters2( IMessage_SubmitMessage, a1, a2 ) - -#define Validate_IMessage_SetReadFlag( a1, a2 ) \ - ValidateParameters2( IMessage_SetReadFlag, a1, a2 ) -#define UlValidate_IMessage_SetReadFlag( a1, a2 ) \ - UlValidateParameters2( IMessage_SetReadFlag, a1, a2 ) -#define CheckParameters_IMessage_SetReadFlag( a1, a2 ) \ - CheckParameters2( IMessage_SetReadFlag, a1, a2 ) - - -/* IABProvider */ - -#define Validate_IABProvider_Shutdown( a1, a2 ) \ - ValidateParameters2( IABProvider_Shutdown, a1, a2 ) -#define UlValidate_IABProvider_Shutdown( a1, a2 ) \ - UlValidateParameters2( IABProvider_Shutdown, a1, a2 ) -#define CheckParameters_IABProvider_Shutdown( a1, a2 ) \ - CheckParameters2( IABProvider_Shutdown, a1, a2 ) - -#define Validate_IABProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - ValidateParameters9( IABProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) -#define UlValidate_IABProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - UlValidateParameters9( IABProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) -#define CheckParameters_IABProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ - CheckParameters9( IABProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) - - -/* IABLogon */ - -#define Validate_IABLogon_GetLastError( a1, a2, a3, a4 ) \ - ValidateParameters4( IABLogon_GetLastError, a1, a2, a3, a4 ) -#define UlValidate_IABLogon_GetLastError( a1, a2, a3, a4 ) \ - UlValidateParameters4( IABLogon_GetLastError, a1, a2, a3, a4 ) -#define CheckParameters_IABLogon_GetLastError( a1, a2, a3, a4 ) \ - CheckParameters4( IABLogon_GetLastError, a1, a2, a3, a4 ) - -#define Validate_IABLogon_Logoff( a1, a2 ) \ - ValidateParameters2( IABLogon_Logoff, a1, a2 ) -#define UlValidate_IABLogon_Logoff( a1, a2 ) \ - UlValidateParameters2( IABLogon_Logoff, a1, a2 ) -#define CheckParameters_IABLogon_Logoff( a1, a2 ) \ - CheckParameters2( IABLogon_Logoff, a1, a2 ) - -#define Validate_IABLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IABLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IABLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IABLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IABLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IABLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IABLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IABLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IABLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IABLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IABLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IABLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IABLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IABLogon_Advise, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IABLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IABLogon_Advise, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IABLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IABLogon_Advise, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IABLogon_Unadvise( a1, a2 ) \ - ValidateParameters2( IABLogon_Unadvise, a1, a2 ) -#define UlValidate_IABLogon_Unadvise( a1, a2 ) \ - UlValidateParameters2( IABLogon_Unadvise, a1, a2 ) -#define CheckParameters_IABLogon_Unadvise( a1, a2 ) \ - CheckParameters2( IABLogon_Unadvise, a1, a2 ) - -#define Validate_IABLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IABLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) -#define UlValidate_IABLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IABLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) -#define CheckParameters_IABLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IABLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) - -#define Validate_IABLogon_OpenTemplateID( a1, a2, a3, a4, a5, a6, a7, a8 ) \ - ValidateParameters8( IABLogon_OpenTemplateID, a1, a2, a3, a4, a5, a6, a7, a8 ) -#define UlValidate_IABLogon_OpenTemplateID( a1, a2, a3, a4, a5, a6, a7, a8 ) \ - UlValidateParameters8( IABLogon_OpenTemplateID, a1, a2, a3, a4, a5, a6, a7, a8 ) -#define CheckParameters_IABLogon_OpenTemplateID( a1, a2, a3, a4, a5, a6, a7, a8 ) \ - CheckParameters8( IABLogon_OpenTemplateID, a1, a2, a3, a4, a5, a6, a7, a8 ) - -#define Validate_IABLogon_GetOneOffTable( a1, a2, a3 ) \ - ValidateParameters3( IABLogon_GetOneOffTable, a1, a2, a3 ) -#define UlValidate_IABLogon_GetOneOffTable( a1, a2, a3 ) \ - UlValidateParameters3( IABLogon_GetOneOffTable, a1, a2, a3 ) -#define CheckParameters_IABLogon_GetOneOffTable( a1, a2, a3 ) \ - CheckParameters3( IABLogon_GetOneOffTable, a1, a2, a3 ) - -#define Validate_IABLogon_PrepareRecips( a1, a2, a3, a4 ) \ - ValidateParameters4( IABLogon_PrepareRecips, a1, a2, a3, a4 ) -#define UlValidate_IABLogon_PrepareRecips( a1, a2, a3, a4 ) \ - UlValidateParameters4( IABLogon_PrepareRecips, a1, a2, a3, a4 ) -#define CheckParameters_IABLogon_PrepareRecips( a1, a2, a3, a4 ) \ - CheckParameters4( IABLogon_PrepareRecips, a1, a2, a3, a4 ) - - -/* IXPProvider */ - -#define Validate_IXPProvider_Shutdown( a1, a2 ) \ - ValidateParameters2( IXPProvider_Shutdown, a1, a2 ) -#define UlValidate_IXPProvider_Shutdown( a1, a2 ) \ - UlValidateParameters2( IXPProvider_Shutdown, a1, a2 ) -#define CheckParameters_IXPProvider_Shutdown( a1, a2 ) \ - CheckParameters2( IXPProvider_Shutdown, a1, a2 ) - -#define Validate_IXPProvider_TransportLogon( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IXPProvider_TransportLogon, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IXPProvider_TransportLogon( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IXPProvider_TransportLogon, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IXPProvider_TransportLogon( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IXPProvider_TransportLogon, a1, a2, a3, a4, a5, a6, a7 ) - - -/* IXPLogon */ - -#define Validate_IXPLogon_AddressTypes( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IXPLogon_AddressTypes, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IXPLogon_AddressTypes( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IXPLogon_AddressTypes, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IXPLogon_AddressTypes( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IXPLogon_AddressTypes, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IXPLogon_RegisterOptions( a1, a2, a3, a4 ) \ - ValidateParameters4( IXPLogon_RegisterOptions, a1, a2, a3, a4 ) -#define UlValidate_IXPLogon_RegisterOptions( a1, a2, a3, a4 ) \ - UlValidateParameters4( IXPLogon_RegisterOptions, a1, a2, a3, a4 ) -#define CheckParameters_IXPLogon_RegisterOptions( a1, a2, a3, a4 ) \ - CheckParameters4( IXPLogon_RegisterOptions, a1, a2, a3, a4 ) - -#define Validate_IXPLogon_TransportNotify( a1, a2, a3 ) \ - ValidateParameters3( IXPLogon_TransportNotify, a1, a2, a3 ) -#define UlValidate_IXPLogon_TransportNotify( a1, a2, a3 ) \ - UlValidateParameters3( IXPLogon_TransportNotify, a1, a2, a3 ) -#define CheckParameters_IXPLogon_TransportNotify( a1, a2, a3 ) \ - CheckParameters3( IXPLogon_TransportNotify, a1, a2, a3 ) - -#define Validate_IXPLogon_Idle( a1, a2 ) \ - ValidateParameters2( IXPLogon_Idle, a1, a2 ) -#define UlValidate_IXPLogon_Idle( a1, a2 ) \ - UlValidateParameters2( IXPLogon_Idle, a1, a2 ) -#define CheckParameters_IXPLogon_Idle( a1, a2 ) \ - CheckParameters2( IXPLogon_Idle, a1, a2 ) - -#define Validate_IXPLogon_TransportLogoff( a1, a2 ) \ - ValidateParameters2( IXPLogon_TransportLogoff, a1, a2 ) -#define UlValidate_IXPLogon_TransportLogoff( a1, a2 ) \ - UlValidateParameters2( IXPLogon_TransportLogoff, a1, a2 ) -#define CheckParameters_IXPLogon_TransportLogoff( a1, a2 ) \ - CheckParameters2( IXPLogon_TransportLogoff, a1, a2 ) - -#define Validate_IXPLogon_SubmitMessage( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IXPLogon_SubmitMessage, a1, a2, a3, a4, a5 ) -#define UlValidate_IXPLogon_SubmitMessage( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IXPLogon_SubmitMessage, a1, a2, a3, a4, a5 ) -#define CheckParameters_IXPLogon_SubmitMessage( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IXPLogon_SubmitMessage, a1, a2, a3, a4, a5 ) - -#define Validate_IXPLogon_EndMessage( a1, a2, a3 ) \ - ValidateParameters3( IXPLogon_EndMessage, a1, a2, a3 ) -#define UlValidate_IXPLogon_EndMessage( a1, a2, a3 ) \ - UlValidateParameters3( IXPLogon_EndMessage, a1, a2, a3 ) -#define CheckParameters_IXPLogon_EndMessage( a1, a2, a3 ) \ - CheckParameters3( IXPLogon_EndMessage, a1, a2, a3 ) - -#define Validate_IXPLogon_Poll( a1, a2 ) \ - ValidateParameters2( IXPLogon_Poll, a1, a2 ) -#define UlValidate_IXPLogon_Poll( a1, a2 ) \ - UlValidateParameters2( IXPLogon_Poll, a1, a2 ) -#define CheckParameters_IXPLogon_Poll( a1, a2 ) \ - CheckParameters2( IXPLogon_Poll, a1, a2 ) - -#define Validate_IXPLogon_StartMessage( a1, a2, a3, a4 ) \ - ValidateParameters4( IXPLogon_StartMessage, a1, a2, a3, a4 ) -#define UlValidate_IXPLogon_StartMessage( a1, a2, a3, a4 ) \ - UlValidateParameters4( IXPLogon_StartMessage, a1, a2, a3, a4 ) -#define CheckParameters_IXPLogon_StartMessage( a1, a2, a3, a4 ) \ - CheckParameters4( IXPLogon_StartMessage, a1, a2, a3, a4 ) - -#define Validate_IXPLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IXPLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) -#define UlValidate_IXPLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IXPLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) -#define CheckParameters_IXPLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IXPLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) - -#define Validate_IXPLogon_ValidateState( a1, a2, a3 ) \ - ValidateParameters3( IXPLogon_ValidateState, a1, a2, a3 ) -#define UlValidate_IXPLogon_ValidateState( a1, a2, a3 ) \ - UlValidateParameters3( IXPLogon_ValidateState, a1, a2, a3 ) -#define CheckParameters_IXPLogon_ValidateState( a1, a2, a3 ) \ - CheckParameters3( IXPLogon_ValidateState, a1, a2, a3 ) - -#define Validate_IXPLogon_FlushQueues( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IXPLogon_FlushQueues, a1, a2, a3, a4, a5 ) -#define UlValidate_IXPLogon_FlushQueues( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IXPLogon_FlushQueues, a1, a2, a3, a4, a5 ) -#define CheckParameters_IXPLogon_FlushQueues( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IXPLogon_FlushQueues, a1, a2, a3, a4, a5 ) - - -/* IMSProvider */ - -#define Validate_IMSProvider_Shutdown( a1, a2 ) \ - ValidateParameters2( IMSProvider_Shutdown, a1, a2 ) -#define UlValidate_IMSProvider_Shutdown( a1, a2 ) \ - UlValidateParameters2( IMSProvider_Shutdown, a1, a2 ) -#define CheckParameters_IMSProvider_Shutdown( a1, a2 ) \ - CheckParameters2( IMSProvider_Shutdown, a1, a2 ) - -#define Validate_IMSProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - ValidateParameters13( IMSProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) -#define UlValidate_IMSProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - UlValidateParameters13( IMSProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) -#define CheckParameters_IMSProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - CheckParameters13( IMSProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) - -#define Validate_IMSProvider_SpoolerLogon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - ValidateParameters13( IMSProvider_SpoolerLogon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) -#define UlValidate_IMSProvider_SpoolerLogon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - UlValidateParameters13( IMSProvider_SpoolerLogon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) -#define CheckParameters_IMSProvider_SpoolerLogon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ - CheckParameters13( IMSProvider_SpoolerLogon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) - -#define Validate_IMSProvider_CompareStoreIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMSProvider_CompareStoreIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMSProvider_CompareStoreIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMSProvider_CompareStoreIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMSProvider_CompareStoreIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMSProvider_CompareStoreIDs, a1, a2, a3, a4, a5, a6, a7 ) - - -/* IMSLogon */ - -#define Validate_IMSLogon_GetLastError( a1, a2, a3, a4 ) \ - ValidateParameters4( IMSLogon_GetLastError, a1, a2, a3, a4 ) -#define UlValidate_IMSLogon_GetLastError( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMSLogon_GetLastError, a1, a2, a3, a4 ) -#define CheckParameters_IMSLogon_GetLastError( a1, a2, a3, a4 ) \ - CheckParameters4( IMSLogon_GetLastError, a1, a2, a3, a4 ) - -#define Validate_IMSLogon_Logoff( a1, a2 ) \ - ValidateParameters2( IMSLogon_Logoff, a1, a2 ) -#define UlValidate_IMSLogon_Logoff( a1, a2 ) \ - UlValidateParameters2( IMSLogon_Logoff, a1, a2 ) -#define CheckParameters_IMSLogon_Logoff( a1, a2 ) \ - CheckParameters2( IMSLogon_Logoff, a1, a2 ) - -#define Validate_IMSLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMSLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMSLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMSLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMSLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMSLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMSLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - ValidateParameters7( IMSLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define UlValidate_IMSLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - UlValidateParameters7( IMSLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) -#define CheckParameters_IMSLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ - CheckParameters7( IMSLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) - -#define Validate_IMSLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ - ValidateParameters6( IMSLogon_Advise, a1, a2, a3, a4, a5, a6 ) -#define UlValidate_IMSLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ - UlValidateParameters6( IMSLogon_Advise, a1, a2, a3, a4, a5, a6 ) -#define CheckParameters_IMSLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ - CheckParameters6( IMSLogon_Advise, a1, a2, a3, a4, a5, a6 ) - -#define Validate_IMSLogon_Unadvise( a1, a2 ) \ - ValidateParameters2( IMSLogon_Unadvise, a1, a2 ) -#define UlValidate_IMSLogon_Unadvise( a1, a2 ) \ - UlValidateParameters2( IMSLogon_Unadvise, a1, a2 ) -#define CheckParameters_IMSLogon_Unadvise( a1, a2 ) \ - CheckParameters2( IMSLogon_Unadvise, a1, a2 ) - -#define Validate_IMSLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMSLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) -#define UlValidate_IMSLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMSLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMSLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMSLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) - - -/* IMAPIControl */ - -#define Validate_IMAPIControl_GetLastError( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPIControl_GetLastError, a1, a2, a3, a4 ) -#define UlValidate_IMAPIControl_GetLastError( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPIControl_GetLastError, a1, a2, a3, a4 ) -#define CheckParameters_IMAPIControl_GetLastError( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPIControl_GetLastError, a1, a2, a3, a4 ) - -#define Validate_IMAPIControl_Activate( a1, a2, a3 ) \ - ValidateParameters3( IMAPIControl_Activate, a1, a2, a3 ) -#define UlValidate_IMAPIControl_Activate( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIControl_Activate, a1, a2, a3 ) -#define CheckParameters_IMAPIControl_Activate( a1, a2, a3 ) \ - CheckParameters3( IMAPIControl_Activate, a1, a2, a3 ) - -#define Validate_IMAPIControl_GetState( a1, a2, a3 ) \ - ValidateParameters3( IMAPIControl_GetState, a1, a2, a3 ) -#define UlValidate_IMAPIControl_GetState( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIControl_GetState, a1, a2, a3 ) -#define CheckParameters_IMAPIControl_GetState( a1, a2, a3 ) \ - CheckParameters3( IMAPIControl_GetState, a1, a2, a3 ) - - -/* IMAPIStatus */ - -#define Validate_IMAPIStatus_ValidateState( a1, a2, a3 ) \ - ValidateParameters3( IMAPIStatus_ValidateState, a1, a2, a3 ) -#define UlValidate_IMAPIStatus_ValidateState( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIStatus_ValidateState, a1, a2, a3 ) -#define CheckParameters_IMAPIStatus_ValidateState( a1, a2, a3 ) \ - CheckParameters3( IMAPIStatus_ValidateState, a1, a2, a3 ) - -#define Validate_IMAPIStatus_SettingsDialog( a1, a2, a3 ) \ - ValidateParameters3( IMAPIStatus_SettingsDialog, a1, a2, a3 ) -#define UlValidate_IMAPIStatus_SettingsDialog( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIStatus_SettingsDialog, a1, a2, a3 ) -#define CheckParameters_IMAPIStatus_SettingsDialog( a1, a2, a3 ) \ - CheckParameters3( IMAPIStatus_SettingsDialog, a1, a2, a3 ) - -#define Validate_IMAPIStatus_ChangePassword( a1, a2, a3, a4 ) \ - ValidateParameters4( IMAPIStatus_ChangePassword, a1, a2, a3, a4 ) -#define UlValidate_IMAPIStatus_ChangePassword( a1, a2, a3, a4 ) \ - UlValidateParameters4( IMAPIStatus_ChangePassword, a1, a2, a3, a4 ) -#define CheckParameters_IMAPIStatus_ChangePassword( a1, a2, a3, a4 ) \ - CheckParameters4( IMAPIStatus_ChangePassword, a1, a2, a3, a4 ) - -#define Validate_IMAPIStatus_FlushQueues( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IMAPIStatus_FlushQueues, a1, a2, a3, a4, a5 ) -#define UlValidate_IMAPIStatus_FlushQueues( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IMAPIStatus_FlushQueues, a1, a2, a3, a4, a5 ) -#define CheckParameters_IMAPIStatus_FlushQueues( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IMAPIStatus_FlushQueues, a1, a2, a3, a4, a5 ) - - -/* IStream */ - -#define Validate_IStream_Read( a1, a2, a3, a4 ) \ - ValidateParameters4( IStream__Read, a1, a2, a3, a4 ) -#define UlValidate_IStream_Read( a1, a2, a3, a4 ) \ - UlValidateParameters4( IStream__Read, a1, a2, a3, a4 ) -#define CheckParameters_IStream_Read( a1, a2, a3, a4 ) \ - CheckParameters4( IStream__Read, a1, a2, a3, a4 ) - -#define Validate_IStream_Write( a1, a2, a3, a4 ) \ - ValidateParameters4( IStream__Write, a1, a2, a3, a4 ) -#define UlValidate_IStream_Write( a1, a2, a3, a4 ) \ - UlValidateParameters4( IStream__Write, a1, a2, a3, a4 ) -#define CheckParameters_IStream_Write( a1, a2, a3, a4 ) \ - CheckParameters4( IStream__Write, a1, a2, a3, a4 ) - -#define Validate_IStream_Seek( a1, a2, a3, a4 ) \ - ValidateParameters4( IStream_Seek, a1, a2, a3, a4 ) -#define UlValidate_IStream_Seek( a1, a2, a3, a4 ) \ - UlValidateParameters4( IStream_Seek, a1, a2, a3, a4 ) -#define CheckParameters_IStream_Seek( a1, a2, a3, a4 ) \ - CheckParameters4( IStream_Seek, a1, a2, a3, a4 ) - -#define Validate_IStream_SetSize( a1, a2 ) \ - ValidateParameters2( IStream_SetSize, a1, a2 ) -#define UlValidate_IStream_SetSize( a1, a2 ) \ - UlValidateParameters2( IStream_SetSize, a1, a2 ) -#define CheckParameters_IStream_SetSize( a1, a2 ) \ - CheckParameters2( IStream_SetSize, a1, a2 ) - -#define Validate_IStream_CopyTo( a1, a2, a3, a4, a5 ) \ - ValidateParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 ) -#define UlValidate_IStream_CopyTo( a1, a2, a3, a4, a5 ) \ - UlValidateParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 ) -#define CheckParameters_IStream_CopyTo( a1, a2, a3, a4, a5 ) \ - CheckParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 ) - -#define Validate_IStream_Commit( a1, a2 ) \ - ValidateParameters2( IStream_Commit, a1, a2 ) -#define UlValidate_IStream_Commit( a1, a2 ) \ - UlValidateParameters2( IStream_Commit, a1, a2 ) -#define CheckParameters_IStream_Commit( a1, a2 ) \ - CheckParameters2( IStream_Commit, a1, a2 ) - -#define Validate_IStream_Revert( a1 ) \ - ValidateParameters1( IStream_Revert, a1 ) -#define UlValidate_IStream_Revert( a1 ) \ - UlValidateParameters1( IStream_Revert, a1 ) -#define CheckParameters_IStream_Revert( a1 ) \ - CheckParameters1( IStream_Revert, a1 ) - -#define Validate_IStream_LockRegion( a1, a2, a3, a4 ) \ - ValidateParameters4( IStream_LockRegion, a1, a2, a3, a4 ) -#define UlValidate_IStream_LockRegion( a1, a2, a3, a4 ) \ - UlValidateParameters4( IStream_LockRegion, a1, a2, a3, a4 ) -#define CheckParameters_IStream_LockRegion( a1, a2, a3, a4 ) \ - CheckParameters4( IStream_LockRegion, a1, a2, a3, a4 ) - -#define Validate_IStream_UnlockRegion( a1, a2, a3, a4 ) \ - ValidateParameters4( IStream_UnlockRegion, a1, a2, a3, a4 ) -#define UlValidate_IStream_UnlockRegion( a1, a2, a3, a4 ) \ - UlValidateParameters4( IStream_UnlockRegion, a1, a2, a3, a4 ) -#define CheckParameters_IStream_UnlockRegion( a1, a2, a3, a4 ) \ - CheckParameters4( IStream_UnlockRegion, a1, a2, a3, a4 ) - -#define Validate_IStream_Stat( a1, a2, a3 ) \ - ValidateParameters3( IStream_Stat, a1, a2, a3 ) -#define UlValidate_IStream_Stat( a1, a2, a3 ) \ - UlValidateParameters3( IStream_Stat, a1, a2, a3 ) -#define CheckParameters_IStream_Stat( a1, a2, a3 ) \ - CheckParameters3( IStream_Stat, a1, a2, a3 ) - -#define Validate_IStream_Clone( a1, a2 ) \ - ValidateParameters2( IStream_Clone, a1, a2 ) -#define UlValidate_IStream_Clone( a1, a2 ) \ - UlValidateParameters2( IStream_Clone, a1, a2 ) -#define CheckParameters_IStream_Clone( a1, a2 ) \ - CheckParameters2( IStream_Clone, a1, a2 ) - - -/* IMAPIAdviseSink */ - -#define Validate_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \ - ValidateParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 ) -#define UlValidate_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \ - UlValidateParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 ) -#define CheckParameters_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \ - CheckParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 ) - -#if defined(_AMD64_) || defined(_ARM64_) || defined(_X86_) -STDAPI HrValidateParameters( METHODS eMethod, LPVOID FAR *ppFirstArg ); -#elif defined(DOS) || defined(_MAC) -STDAPIV HrValidateParametersV( METHODS eMethod, ... ); -STDAPIV HrValidateParametersValist( METHODS eMethod, va_list arglist ); -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _INC_VALIDATE */ - - +/* + * M A P I V A L . H + * + * Macros used to validate parameters on standard MAPI object methods. + * Used in conjunction with routines found in MAPIU.DLL. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef _INC_VALIDATE +#define _INC_VALIDATE + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef MAPIUTIL_H +#include +#endif +#include +#include + + +#define MAKE_ENUM(Method, Interface) Interface##_##Method + +typedef enum _tagMethods +{ +/* IUnknown */ + MAKE_ENUM(QueryInterface, IUnknown) = 0, + MAKE_ENUM(AddRef, IUnknown), /* For completness */ + MAKE_ENUM(Release, IUnknown), /* For completness */ + +/* IMAPIProps */ + MAKE_ENUM(GetLastError, IMAPIProp), + MAKE_ENUM(SaveChanges, IMAPIProp), + MAKE_ENUM(GetProps, IMAPIProp), + MAKE_ENUM(GetPropList, IMAPIProp), + MAKE_ENUM(OpenProperty, IMAPIProp), + MAKE_ENUM(SetProps, IMAPIProp), + MAKE_ENUM(DeleteProps, IMAPIProp), + MAKE_ENUM(CopyTo, IMAPIProp), + MAKE_ENUM(CopyProps, IMAPIProp), + MAKE_ENUM(GetNamesFromIDs, IMAPIProp), + MAKE_ENUM(GetIDsFromNames, IMAPIProp), + +/* IMAPITable */ + MAKE_ENUM(GetLastError, IMAPITable), + MAKE_ENUM(Advise, IMAPITable), + MAKE_ENUM(Unadvise, IMAPITable), + MAKE_ENUM(GetStatus, IMAPITable), + MAKE_ENUM(SetColumns, IMAPITable), + MAKE_ENUM(QueryColumns, IMAPITable), + MAKE_ENUM(GetRowCount, IMAPITable), + MAKE_ENUM(SeekRow, IMAPITable), + MAKE_ENUM(SeekRowApprox, IMAPITable), + MAKE_ENUM(QueryPosition, IMAPITable), + MAKE_ENUM(FindRow, IMAPITable), + MAKE_ENUM(Restrict, IMAPITable), + MAKE_ENUM(CreateBookmark, IMAPITable), + MAKE_ENUM(FreeBookmark, IMAPITable), + MAKE_ENUM(SortTable, IMAPITable), + MAKE_ENUM(QuerySortOrder, IMAPITable), + MAKE_ENUM(QueryRows, IMAPITable), + MAKE_ENUM(Abort, IMAPITable), + MAKE_ENUM(ExpandRow, IMAPITable), + MAKE_ENUM(CollapseRow, IMAPITable), + MAKE_ENUM(WaitForCompletion, IMAPITable), + MAKE_ENUM(GetCollapseState, IMAPITable), + MAKE_ENUM(SetCollapseState, IMAPITable), + +/* IMAPIContainer */ + MAKE_ENUM(GetContentsTable, IMAPIContainer), + MAKE_ENUM(GetHierarchyTable, IMAPIContainer), + MAKE_ENUM(OpenEntry, IMAPIContainer), + MAKE_ENUM(SetSearchCriteria, IMAPIContainer), + MAKE_ENUM(GetSearchCriteria, IMAPIContainer), + +/* IABContainer */ + MAKE_ENUM(CreateEntry, IABContainer), + MAKE_ENUM(CopyEntries, IABContainer), + MAKE_ENUM(DeleteEntries, IABContainer), + MAKE_ENUM(ResolveNames, IABContainer), + +/* IDistList */ + MAKE_ENUM(CreateEntry, IDistList), + MAKE_ENUM(CopyEntries, IDistList), + MAKE_ENUM(DeleteEntries, IDistList), + MAKE_ENUM(ResolveNames, IDistList), + +/* IMAPIFolder */ + MAKE_ENUM(CreateMessage, IMAPIFolder), + MAKE_ENUM(CopyMessages, IMAPIFolder), + MAKE_ENUM(DeleteMessages, IMAPIFolder), + MAKE_ENUM(CreateFolder, IMAPIFolder), + MAKE_ENUM(CopyFolder, IMAPIFolder), + MAKE_ENUM(DeleteFolder, IMAPIFolder), + MAKE_ENUM(SetReadFlags, IMAPIFolder), + MAKE_ENUM(GetMessageStatus, IMAPIFolder), + MAKE_ENUM(SetMessageStatus, IMAPIFolder), + MAKE_ENUM(SaveContentsSort, IMAPIFolder), + MAKE_ENUM(EmptyFolder, IMAPIFolder), + +/* IMsgStore */ + MAKE_ENUM(Advise, IMsgStore), + MAKE_ENUM(Unadvise, IMsgStore), + MAKE_ENUM(CompareEntryIDs, IMsgStore), + MAKE_ENUM(OpenEntry, IMsgStore), + MAKE_ENUM(SetReceiveFolder, IMsgStore), + MAKE_ENUM(GetReceiveFolder, IMsgStore), + MAKE_ENUM(GetReceiveFolderTable, IMsgStore), + MAKE_ENUM(StoreLogoff, IMsgStore), + MAKE_ENUM(AbortSubmit, IMsgStore), + MAKE_ENUM(GetOutgoingQueue, IMsgStore), + MAKE_ENUM(SetLockState, IMsgStore), + MAKE_ENUM(FinishedMsg, IMsgStore), + MAKE_ENUM(NotifyNewMail, IMsgStore), + +/* IMessage */ + MAKE_ENUM(GetAttachmentTable, IMessage), + MAKE_ENUM(OpenAttach, IMessage), + MAKE_ENUM(CreateAttach, IMessage), + MAKE_ENUM(DeleteAttach, IMessage), + MAKE_ENUM(GetRecipientTable, IMessage), + MAKE_ENUM(ModifyRecipients, IMessage), + MAKE_ENUM(SubmitMessage, IMessage), + MAKE_ENUM(SetReadFlag, IMessage), + + +/* IABProvider */ + MAKE_ENUM(Shutdown, IABProvider), + MAKE_ENUM(Logon, IABProvider), + +/* IABLogon */ + MAKE_ENUM(GetLastError, IABLogon), + MAKE_ENUM(Logoff, IABLogon), + MAKE_ENUM(OpenEntry, IABLogon), + MAKE_ENUM(CompareEntryIDs, IABLogon), + MAKE_ENUM(Advise, IABLogon), + MAKE_ENUM(Unadvise, IABLogon), + MAKE_ENUM(OpenStatusEntry, IABLogon), + MAKE_ENUM(OpenTemplateID, IABLogon), + MAKE_ENUM(GetOneOffTable, IABLogon), + MAKE_ENUM(PrepareRecips, IABLogon), + +/* IXPProvider */ + MAKE_ENUM(Shutdown, IXPProvider), + MAKE_ENUM(TransportLogon, IXPProvider), + +/* IXPLogon */ + MAKE_ENUM(AddressTypes, IXPLogon), + MAKE_ENUM(RegisterOptions, IXPLogon), + MAKE_ENUM(TransportNotify, IXPLogon), + MAKE_ENUM(Idle, IXPLogon), + MAKE_ENUM(TransportLogoff, IXPLogon), + MAKE_ENUM(SubmitMessage, IXPLogon), + MAKE_ENUM(EndMessage, IXPLogon), + MAKE_ENUM(Poll, IXPLogon), + MAKE_ENUM(StartMessage, IXPLogon), + MAKE_ENUM(OpenStatusEntry, IXPLogon), + MAKE_ENUM(ValidateState, IXPLogon), + MAKE_ENUM(FlushQueues, IXPLogon), + +/* IMSProvider */ + MAKE_ENUM(Shutdown, IMSProvider), + MAKE_ENUM(Logon, IMSProvider), + MAKE_ENUM(SpoolerLogon, IMSProvider), + MAKE_ENUM(CompareStoreIDs, IMSProvider), + +/* IMSLogon */ + MAKE_ENUM(GetLastError, IMSLogon), + MAKE_ENUM(Logoff, IMSLogon), + MAKE_ENUM(OpenEntry, IMSLogon), + MAKE_ENUM(CompareEntryIDs, IMSLogon), + MAKE_ENUM(Advise, IMSLogon), + MAKE_ENUM(Unadvise, IMSLogon), + MAKE_ENUM(OpenStatusEntry, IMSLogon), + +/* IMAPIControl */ + MAKE_ENUM(GetLastError, IMAPIControl), + MAKE_ENUM(Activate, IMAPIControl), + MAKE_ENUM(GetState, IMAPIControl), + +/* IMAPIStatus */ + MAKE_ENUM(ValidateState, IMAPIStatus), + MAKE_ENUM(SettingsDialog, IMAPIStatus), + MAKE_ENUM(ChangePassword, IMAPIStatus), + MAKE_ENUM(FlushQueues, IMAPIStatus), + +/* IStream */ + MAKE_ENUM(_Read, IStream), + MAKE_ENUM(_Write, IStream), + MAKE_ENUM(Seek, IStream), + MAKE_ENUM(SetSize, IStream), + MAKE_ENUM(CopyTo, IStream), + MAKE_ENUM(Commit, IStream), + MAKE_ENUM(Revert, IStream), + MAKE_ENUM(LockRegion, IStream), + MAKE_ENUM(UnlockRegion, IStream), + MAKE_ENUM(Stat, IStream), + MAKE_ENUM(Clone, IStream), + +/* IMAPIAdviseSink */ + MAKE_ENUM(OnNotify, IMAPIAdviseSink), + +} METHODS; + + +/* Macro wrappers to hide the Validate function return handling */ +#if defined(_AMD64_) || defined(_X86_) || defined(_M_ARM) || defined(_M_ARM64) +#ifdef __cplusplus + +/* C++ methods can't take the address of the This pointer, so we must + use the first parameter instead */ + +#define ValidateParameters(eMethod, First) \ + { HRESULT _hr_; \ + _hr_ = __CPPValidateParameters(eMethod, (LPVOID) &First); \ + if (HR_FAILED(_hr_)) return (_hr_); } + +#define UlValidateParameters(eMethod, First) \ + { HRESULT _hr_; \ + _hr_ = __CPPValidateParameters(eMethod, &First); \ + if (HR_FAILED(_hr_)) return (ULONG) (_hr_); } + +/* Methods called by MAPI should have correct parameters + - just assert in Debug to check */ +#define CheckParameters(eMethod, First) \ + AssertSz(HR_SUCCEEDED(__CPPValidateParameters(eMethod, &First)), "Parameter validation failed for method called by MAPI!") + + +#else /* __cplusplus */ + +/* For methods that will be called by clients + - validate always */ + +#define ValidateParameters(eMethod, ppThis) \ + { HRESULT _hr_; \ + _hr_ = __ValidateParameters(eMethod, ppThis); \ + if (HR_FAILED(_hr_)) return (_hr_); } + +#define UlValidateParameters(eMethod, ppThis) \ + { HRESULT _hr_; \ + _hr_ = __ValidateParameters(eMethod, ppThis); \ + if (HR_FAILED(_hr_)) return (ULONG) (_hr_); } + +/* Methods called by MAPI should have correct parameters + - just assert in Debug to check */ +#define CheckParameters(eMethod, ppThis) \ + AssertSz(HR_SUCCEEDED(__ValidateParameters(eMethod, ppThis)), "Parameter validation failed for method called by MAPI!") + +#endif /* __cplusplus */ +#else +#error "Unknown Platform: MAPI is currently supported on X86 and AMD64 and ARM" +#endif /* _X86_ || _AMD64_ || _M_ARM || _M_ARM64 */ + +/* Prototypes for functions used to validate complex parameters. + */ +#define FBadPropVal( lpPropVal) (FAILED(ScCountProps( 1, lpPropVal, NULL))) + +#define FBadRgPropVal( lpPropVal, cValues) \ + (FAILED(ScCountProps( cValues, lpPropVal, NULL))) + +#define FBadAdrList( lpAdrList) \ + ( AssertSz( ( offsetof( ADRLIST, cEntries) \ + == offsetof( SRowSet, cRows)) \ + && ( offsetof( ADRLIST, aEntries) \ + == offsetof( SRowSet, aRow)) \ + && ( offsetof( ADRENTRY, cValues) \ + == offsetof( SRow, cValues)) \ + && ( offsetof( ADRENTRY, rgPropVals) \ + == offsetof( SRow, lpProps)) \ + , "ADRLIST doesn't match SRowSet") \ + || FBadRowSet( (LPSRowSet) lpAdrList)) + +STDAPI_(BOOL) +FBadRglpszW(__in LPWSTR FAR *lppszW, + ULONG cStrings); + +STDAPI_(BOOL) +FBadRowSet( LPSRowSet lpRowSet); + +STDAPI_(BOOL) +FBadRglpNameID( LPMAPINAMEID FAR * lppNameId, + ULONG cNames); + +STDAPI_(BOOL) +FBadEntryList( LPENTRYLIST lpEntryList); + + +/* BAD_STANDARD_OBJ + * + * This macro insures that the object is a writable object of the correct size + * and that this method belongs to the object. + * + * NOTES ON USE! + * This depends upon using the standard method of declaring the object + * interface. + * + * prefix is the method prefix you chose when declaring the object interface. + * method is the standard method name of the calling method. + * lpVtbl is the name of the lpVtbl element of your object. + */ +#define BAD_STANDARD_OBJ( lpObj, prefix, method, lpVtbl) \ + ( IsBadWritePtr( (lpObj), sizeof(*lpObj)) \ + || IsBadReadPtr( (void *) &(lpObj->lpVtbl->method), sizeof(LPVOID)) \ + ||( ( LPVOID) (lpObj->lpVtbl->method) != (LPVOID) (prefix##method))) + + +#define FBadUnknown( lpObj ) \ + ( IsBadReadPtr( (lpObj), sizeof(LPVOID) ) \ + || IsBadReadPtr( (lpObj)->lpVtbl, 3 * sizeof(LPUNKNOWN) ) \ + || IsBadCodePtr( (FARPROC)(lpObj)->lpVtbl->QueryInterface )) + +/* + * IUnknown + */ + + +/* + * QueryInterface + */ +#define FBadQueryInterface( lpObj, riid, ppvObj) \ + ( IsBadReadPtr( riid, sizeof(IID)) \ + || IsBadWritePtr( ppvObj, sizeof(LPVOID))) + + +/* + * AddRef + * No parameter validation required. + */ +#define FBadAddRef( lpObj) FALSE + + +/* + * Release + * No parameter validation required. + */ +#define FBadRelease( lpObj) FALSE + + +/* + * GetLastError + */ +#define FBadGetLastError( lpObj, hResult, ulFlags, lppMAPIError )\ + (IsBadWritePtr( lppMAPIError, sizeof(LPMAPIERROR))) + +/* + * IMAPIProp + */ + + +/* + * SaveChanges + * No parameter validation required. + */ +#define FBadSaveChanges( lpObj, ulFlags) FALSE + + +/* + * GetProps + */ +#define FBadGetProps( lpObj, lpPTagA, lpcValues, lppPropArray) \ + ( ( lpPTagA \ + && ( IsBadReadPtr( lpPTagA, sizeof(ULONG)) \ + || IsBadReadPtr( lpPTagA, (UINT)( (lpPTagA->cValues + 1) \ + * sizeof(ULONG))))) \ + || IsBadWritePtr( lpcValues, sizeof(ULONG)) \ + || IsBadWritePtr( lppPropArray, sizeof(LPSPropValue))) + + +/* + * GetPropList + */ +#define FBadGetPropList( lpObj, lppPTagA) \ + (IsBadWritePtr( lppPTagA, sizeof(LPSPropTagArray FAR *))) + + +/* + * OpenProperty + */ +#define FBadOpenProperty( lpObj, ulPropTag, lpiid, ulInterfaceOptions, ulFlags \ + , lppUnk) \ + ( IsBadReadPtr( lpiid, sizeof(IID)) \ + || IsBadWritePtr( lppUnk, sizeof (LPUNKNOWN FAR *))) + + +/* + * SetProps + */ +#define FBadSetProps( lpObj, cValues, lpPropArray, lppProblems) \ + ( FBadRgPropVal( lpPropArray, (UINT) cValues) \ + || ( lppProblems \ + && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) + + +/* + * DeleteProps + */ +#define FBadDeleteProps( lpObj, lpPTagA, lppProblems) \ + ( ( !lpPTagA \ + || ( IsBadReadPtr( lpPTagA, sizeof(ULONG)) \ + || IsBadReadPtr( lpPTagA, (UINT)( (lpPTagA->cValues + 1) \ + * sizeof(ULONG))))) \ + || ( lppProblems \ + && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) + + +/* + * CopyTo + */ +#define FBadCopyTo( lpIPDAT, ciidExclude, rgiidExclude, lpExcludeProps \ + , ulUIParam, lpProgress, lpInterface, lpDestObj \ + , ulFlags, lppProblems) \ + ( ( ciidExclude \ + && ( IsBadReadPtr( rgiidExclude, (UINT)(ciidExclude * sizeof(IID))))) \ + || ( lpExcludeProps \ + && ( IsBadReadPtr( lpExcludeProps, sizeof(ULONG)) \ + || IsBadReadPtr( lpExcludeProps \ + , (UINT)( (lpExcludeProps->cValues + 1) \ + * sizeof(ULONG))))) \ + || (lpProgress && FBadUnknown( lpProgress )) \ + || (lpInterface && IsBadReadPtr( lpInterface, sizeof(IID))) \ + || IsBadReadPtr( lpDestObj, sizeof(LPVOID)) \ + || ( lppProblems \ + && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) + + +/* + * CopyProps + */ +#define FBadCopyProps( lpIPDAT, lpPropTagArray \ + , ulUIParam, lpProgress, lpInterface, lpDestObj \ + , ulFlags, lppProblems) \ + ( ( lpPropTagArray \ + && ( IsBadReadPtr( lpPropTagArray, sizeof(ULONG)) \ + || IsBadReadPtr( lpPropTagArray \ + , (UINT)( (lpPropTagArray->cValues + 1) \ + * sizeof(ULONG))))) \ + || (lpProgress && FBadUnknown( lpProgress )) \ + || (lpInterface && IsBadReadPtr( lpInterface, sizeof(IID))) \ + || IsBadReadPtr( lpDestObj, sizeof(LPVOID)) \ + || ( lppProblems \ + && IsBadWritePtr( lppProblems, sizeof(LPSPropProblemArray)))) + + + +/* + * GetNamesFromIDs + */ +#define FBadGetNamesFromIDs( lpIPDAT, lppPropTags, lpPropSetGuid, ulFlags, \ + lpcPropNames, lpppPropNames) \ + ( IsBadReadPtr( lppPropTags, sizeof(LPSPropTagArray)) \ + || ( lpPropSetGuid && IsBadReadPtr( lpPropSetGuid, sizeof(GUID))) \ + || ( *lppPropTags \ + && ( IsBadReadPtr( *lppPropTags, sizeof(ULONG)) \ + || IsBadReadPtr( *lppPropTags \ + , (UINT)( ( ( *lppPropTags)->cValues + 1) \ + * sizeof(ULONG))))) \ + || IsBadWritePtr( lpcPropNames, sizeof (ULONG)) \ + || IsBadWritePtr( lpppPropNames, sizeof (LPVOID FAR *))) + + + +/* + * GetNamesFromIDs + */ +#define FBadGetIDsFromNames( lpIPDAT, cPropNames, lppPropNames, ulFlags \ + , lppPropTags) \ + ( (cPropNames && FBadRglpNameID( lppPropNames, cPropNames)) \ + || IsBadWritePtr( lppPropTags, sizeof(LPULONG FAR *))) + + +STDAPI_(ULONG) +FBadRestriction( LPSRestriction lpres ); + +STDAPI_(ULONG) +FBadPropTag( ULONG ulPropTag ); + +STDAPI_(ULONG) +FBadRow( LPSRow lprow ); + +STDAPI_(ULONG) +FBadProp( LPSPropValue lpprop ); + +STDAPI_(ULONG) +FBadSortOrderSet( LPSSortOrderSet lpsos ); + +STDAPI_(ULONG) +FBadColumnSet( LPSPropTagArray lpptaCols ); + +/* Validation function + + The eMethod parameter tells us which internal validation to perform. + + The ppThis parameter tells us where the stack is, so we can access the other + parameters. + + Becuase of this *magic* we MUST obtain the pointer to the This pointer in + the method function. + +*/ + +#if defined(_WIN64) || defined(_WIN32) || defined(_M_ARM) +#define BASED_STACK +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif + +#if defined(_WIN64) || defined(_WIN32) || defined(_M_ARM) +HRESULT STDAPICALLTYPE +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif + +__CPPValidateParameters(METHODS eMethod, const LPVOID ppFirst); + +#if defined(_WIN64) || defined(_WIN32) || defined(_M_ARM) +HRESULT STDAPICALLTYPE +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif +__ValidateParameters(METHODS eMethod, LPVOID ppThis); + +/* Macro wrappers for platform independent validation */ + +#if defined(_AMD64_) || defined(_X86_) || defined (_M_ARM) || defined(_M_ARM64) + +#define ArgShiftN (1 + (sizeof(DWORD_PTR)>>2)) +#define ArgSize(T) ((sizeof(T)+sizeof(DWORD_PTR)-1)>>ArgShiftN) + +#define MakeArg1(idx, a1) memcpy(__rgArgs+idx, &a1, sizeof(a1)) +#define MakeArg2(idx, a1, a2) MakeArg1(idx, a1); MakeArg1(idx+ArgSize(a1), a2) +#define MakeArg3(idx, a1, a2, a3) MakeArg1(idx, a1); MakeArg2(idx+ArgSize(a1), a2, a3) +#define MakeArg4(idx, a1, a2, a3, a4) MakeArg1(idx, a1); MakeArg3(idx+ArgSize(a1), a2, a3, a4) +#define MakeArg5(idx, a1, a2, a3, a4, a5) MakeArg1(idx, a1); MakeArg4(idx+ArgSize(a1), a2, a3, a4, a5) +#define MakeArg6(idx, a1, a2, a3, a4, a5, a6) MakeArg1(idx, a1); MakeArg5(idx+ArgSize(a1), a2, a3, a4, a5, a6) +#define MakeArg7(idx, a1, a2, a3, a4, a5, a6, a7) MakeArg1(idx, a1); MakeArg6(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7) +#define MakeArg8(idx, a1, a2, a3, a4, a5, a6, a7, a8) MakeArg1(idx, a1); MakeArg7(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8) +#define MakeArg9(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9) MakeArg1(idx, a1); MakeArg8(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9) +#define MakeArg10(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) MakeArg1(idx, a1); MakeArg9(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10) +#define MakeArg11(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) MakeArg1(idx, a1); MakeArg10(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) +#define MakeArg12(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) MakeArg1(idx, a1); MakeArg11(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) +#define MakeArg13(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) MakeArg1(idx, a1); MakeArg12(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) +#define MakeArg14(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) MakeArg1(idx, a1); MakeArg13(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) +#define MakeArg15(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) MakeArg1(idx, a1); MakeArg14(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) +#define MakeArg16(idx, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) MakeArg1(idx, a1); MakeArg15(idx+ArgSize(a1), a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + +#define MakeArray1(a1) \ + DWORD_PTR __rgArgs[ArgSize(a1)]; \ + MakeArg1(0, a1) + +#define MakeArray2(a1, a2) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2)]; \ + MakeArg2(0, a1, a2) + +#define MakeArray3(a1, a2, a3) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3)]; \ + MakeArg3(0, a1, a2, a3) + +#define MakeArray4(a1, a2, a3, a4) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4)]; \ + MakeArg4(0, a1, a2, a3, a4) + +#define MakeArray5(a1, a2, a3, a4, a5) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5)]; \ + MakeArg5(0, a1, a2, a3, a4, a5) + +#define MakeArray6(a1, a2, a3, a4, a5, a6) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6)]; \ + MakeArg6(0, a1, a2, a3, a4, a5, a6) + +#define MakeArray7(a1, a2, a3, a4, a5, a6, a7) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7)]; \ + MakeArg7(0, a1, a2, a3, a4, a5, a6, a7) + +#define MakeArray8(a1, a2, a3, a4, a5, a6, a7, a8) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8)]; \ + MakeArg8(0, a1, a2, a3, a4, a5, a6, a7, a8) + +#define MakeArray9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9)]; \ + MakeArg9(0, a1, a2, a3, a4, a5, a6, a7, a8, a9) + +#define MakeArray10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10)]; \ + MakeArg10(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + +#define MakeArray11(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11)]; \ + MakeArg11(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) + +#define MakeArray12(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12)]; \ + MakeArg12(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) + +#define MakeArray13(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13)]; \ + MakeArg13(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) + +#define MakeArray14(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13) + ArgSize(a14)]; \ + MakeArg14(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) + +#define MakeArray15(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13) + ArgSize(a14) + ArgSize(a15)]; \ + MakeArg15(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) + +#define MakeArray16(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) \ + DWORD_PTR __rgArgs[ArgSize(a1) + ArgSize(a2) + ArgSize(a3) + ArgSize(a4) + ArgSize(a5) + ArgSize(a6) + ArgSize(a7) + ArgSize(a8) + ArgSize(a9) + ArgSize(a10) + ArgSize(a11) + ArgSize(a12) + ArgSize(a13) + ArgSize(a14) + ArgSize(a15) + ArgSize(a16)]; \ + MakeArg16(0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + + + +#define ValidateParameters1( m, a1 ) +#define ValidateParameters2( m, a1, a2 ) \ + { HRESULT _hr_; \ + MakeArray1(a2); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters3( m, a1, a2, a3 ) \ + { HRESULT _hr_; \ + MakeArray2(a2, a3); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters4( m, a1, a2, a3, a4 ) \ + { HRESULT _hr_; \ + MakeArray3(a2, a3, a4); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters5( m, a1, a2, a3, a4, a5 ) \ + { HRESULT _hr_; \ + MakeArray4(a2, a3, a4, a5); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ + { HRESULT _hr_; \ + MakeArray5(a2, a3, a4, a5, a6); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ + { HRESULT _hr_; \ + MakeArray6(a2, a3, a4, a5, a6, a7); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ + { HRESULT _hr_; \ + MakeArray7(a2, a3, a4, a5, a6, a7, a8); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + { HRESULT _hr_; \ + MakeArray8(a2, a3, a4, a5, a6, a7, a8, a9); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + { HRESULT _hr_; \ + MakeArray9(a2, a3, a4, a5, a6, a7, a8, a9, a10); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ + { HRESULT _hr_; \ + MakeArray10(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ + { HRESULT _hr_; \ + MakeArray11(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + { HRESULT _hr_; \ + MakeArray12(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ + { HRESULT _hr_; \ + MakeArray13(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ + { HRESULT _hr_; \ + MakeArray14(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } +#define ValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ + { HRESULT _hr_; \ + MakeArray15(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return (_hr_); } + +#define UlValidateParameters1( m, a1 ) +#define UlValidateParameters2( m, a1, a2 ) \ + { HRESULT _hr_; \ + MakeArray1(a2); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters3( m, a1, a2, a3 ) \ + { HRESULT _hr_; \ + MakeArray2(a2, a3); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters4( m, a1, a2, a3, a4 ) \ + { HRESULT _hr_; \ + MakeArray3(a2, a3, a4); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters5( m, a1, a2, a3, a4, a5 ) \ + { HRESULT _hr_; \ + MakeArray4(a2, a3, a4, a5); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ + { HRESULT _hr_; \ + MakeArray5(a2, a3, a4, a5, a6); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ + { HRESULT _hr_; \ + MakeArray6(a2, a3, a4, a5, a6, a7); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ + { HRESULT _hr_; \ + MakeArray7(a2, a3, a4, a5, a6, a7, a8); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + { HRESULT _hr_; \ + MakeArray8(a2, a3, a4, a5, a6, a7, a8, a9); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + { HRESULT _hr_; \ + MakeArray9(a2, a3, a4, a5, a6, a7, a8, a9, a10); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ + { HRESULT _hr_; \ + MakeArray10(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ + { HRESULT _hr_; \ + MakeArray11(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + { HRESULT _hr_; \ + MakeArray12(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ + { HRESULT _hr_; \ + MakeArray13(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ + { HRESULT _hr_; \ + MakeArray14(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } +#define UlValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ + { HRESULT _hr_; \ + MakeArray15(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); \ + _hr_ = HrValidateParameters(m, (void **)__rgArgs); if (HR_FAILED(_hr_)) return ((ULONG)_hr_); } + +#ifdef DEBUG +#define CheckParameters1( m, a1 ) +#define CheckParameters2( m, a1, a2 ) \ + { \ + MakeArray1(a2); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters3( m, a1, a2, a3 ) \ + { \ + MakeArray2(a2, a3); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters4( m, a1, a2, a3, a4 ) \ + { \ + MakeArray3(a2, a3, a4); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters5( m, a1, a2, a3, a4, a5 ) \ + { \ + MakeArray4(a2, a3, a4, a5); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) \ + { \ + MakeArray5(a2, a3, a4, a5, a6); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ + { \ + MakeArray6(a2, a3, a4, a5, a6, a7); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ + { \ + MakeArray7(a2, a3, a4, a5, a6, a7, a8); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + { \ + MakeArray8(a2, a3, a4, a5, a6, a7, a8, a9); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + { \ + MakeArray9(a2, a3, a4, a5, a6, a7, a8, a9, a10); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ + { \ + MakeArray10(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ + { \ + MakeArray11(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + { \ + MakeArray12(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ + { \ + MakeArray13(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ + { \ + MakeArray14(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ + { \ + MakeArray15(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); \ + AssertSz(HR_SUCCEEDED( HrValidateParameters(m, (void **)__rgArgs)), "Parameter validation failed for method called by MAPI!"); } +#else /* DEBUG */ +#define CheckParameters1( m, a1 ) +#define CheckParameters2( m, a1, a2 ) +#define CheckParameters3( m, a1, a2, a3 ) +#define CheckParameters4( m, a1, a2, a3, a4 ) +#define CheckParameters5( m, a1, a2, a3, a4, a5 ) +#define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) +#define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) +#define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) +#define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) +#define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) +#define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) +#define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) +#define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) +#define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) +#endif /* DEBUG */ +#else /* !_AMD64_ && !_X86_ && !_M_ARM && !_M_ARM64 */ +#define ValidateParms(x) { HRESULT _hr_ = HrValidateParametersV x; if (HR_FAILED(_hr_)) return (_hr_); } +#define UlValidateParms(x) { HRESULT _hr_ = HrValidateParametersV x; if (HR_FAILED(_hr_)) return (ULONG)(_hr_); } +#define CheckParms(x) AssertSz(HR_SUCCEEDED( HrValidateParametersV x ), "Parameter validation failed for method called by MAPI!") + +#define ValidateParameters1( m, a1 ) \ + ValidateParms( ( m, a1 ) ) +#define ValidateParameters2( m, a1, a2 ) \ + ValidateParms( ( m, a1, a2 )) +#define ValidateParameters3( m, a1, a2, a3 ) \ + ValidateParms( ( m, a1, a2, a3 )) +#define ValidateParameters4( m, a1, a2, a3, a4 ) \ + ValidateParms( ( m, a1, a2, a3, a4 )) +#define ValidateParameters5( m, a1, a2, a3, a4, a5 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5 )) +#define ValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6 )) +#define ValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7 )) +#define ValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 )) +#define ValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 )) +#define ValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )) +#define ValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 )) +#define ValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 )) +#define ValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 )) +#define ValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 )) +#define ValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 )) +#define ValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ + ValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 )) + +#define UlValidateParameters1( m, a1 ) \ + UlValidateParms( ( m, a1 ) ) +#define UlValidateParameters2( m, a1, a2 ) \ + UlValidateParms( ( m, a1, a2 )) +#define UlValidateParameters3( m, a1, a2, a3 ) \ + UlValidateParms( ( m, a1, a2, a3 )) +#define UlValidateParameters4( m, a1, a2, a3, a4 ) \ + UlValidateParms( ( m, a1, a2, a3, a4 )) +#define UlValidateParameters5( m, a1, a2, a3, a4, a5 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5 )) +#define UlValidateParameters6( m, a1, a2, a3, a4, a5, a6 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6 )) +#define UlValidateParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7 )) +#define UlValidateParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 )) +#define UlValidateParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 )) +#define UlValidateParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )) +#define UlValidateParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 )) +#define UlValidateParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 )) +#define UlValidateParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 )) +#define UlValidateParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 )) +#define UlValidateParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 )) +#define UlValidateParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ + UlValidateParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 )) + +#define CheckParameters1( m, a1 ) \ + CheckParms( ( m, a1 ) ) +#define CheckParameters2( m, a1, a2 ) \ + CheckParms( ( m, a1, a2 )) +#define CheckParameters3( m, a1, a2, a3 ) \ + CheckParms( ( m, a1, a2, a3 )) +#define CheckParameters4( m, a1, a2, a3, a4 ) \ + CheckParms( ( m, a1, a2, a3, a4 )) +#define CheckParameters5( m, a1, a2, a3, a4, a5 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5 )) +#define CheckParameters6( m, a1, a2, a3, a4, a5, a6 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6 )) +#define CheckParameters7( m, a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7 )) +#define CheckParameters8( m, a1, a2, a3, a4, a5, a6, a7, a8 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8 )) +#define CheckParameters9( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9 )) +#define CheckParameters10( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 )) +#define CheckParameters11( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 )) +#define CheckParameters12( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 )) +#define CheckParameters13( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 )) +#define CheckParameters14( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 )) +#define CheckParameters15( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 )) +#define CheckParameters16( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 ) \ + CheckParms( ( m, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16 )) + +#endif /* _AMD64_ || _X86_ */ + + +/* + * M A P I P A R A M E T E R V A L I D A T I O N M A C R O S + */ + + +/* IUnknown */ + +#define Validate_IUnknown_QueryInterface( a1, a2, a3 ) \ + ValidateParameters3( IUnknown_QueryInterface, a1, a2, a3 ) +#define UlValidate_IUnknown_QueryInterface( a1, a2, a3 ) \ + UlValidateParameters3( IUnknown_QueryInterface, a1, a2, a3 ) +#define CheckParameters_IUnknown_QueryInterface( a1, a2, a3 ) \ + CheckParameters3( IUnknown_QueryInterface, a1, a2, a3 ) + +#define Validate_IUnknown_AddRef( a1 ) \ + ValidateParameters1( IUnknown_AddRef, a1 ) +#define UlValidate_IUnknown_AddRef( a1 ) \ + UlValidateParameters1( IUnknown_AddRef, a1 ) +#define CheckParameters_IUnknown_AddRef( a1 ) \ + CheckParameters1( IUnknown_AddRef, a1 ) + +#define Validate_IUnknown_Release( a1 ) \ + ValidateParameters1( IUnknown_Release, a1 ) +#define UlValidate_IUnknown_Release( a1 ) \ + UlValidateParameters1( IUnknown_Release, a1 ) +#define CheckParameters_IUnknown_Release( a1 ) \ + CheckParameters1( IUnknown_Release, a1 ) + + +/* IMAPIProp */ + +#define Validate_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 ) +#define UlValidate_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 ) +#define CheckParameters_IMAPIProp_GetLastError( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPIProp_GetLastError, a1, a2, a3, a4 ) + +#define Validate_IMAPIProp_SaveChanges( a1, a2 ) \ + ValidateParameters2( IMAPIProp_SaveChanges, a1, a2 ) +#define UlValidate_IMAPIProp_SaveChanges( a1, a2 ) \ + UlValidateParameters2( IMAPIProp_SaveChanges, a1, a2 ) +#define CheckParameters_IMAPIProp_SaveChanges( a1, a2 ) \ + CheckParameters2( IMAPIProp_SaveChanges, a1, a2 ) + +#define Validate_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPIProp_GetProps( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPIProp_GetProps, a1, a2, a3, a4, a5 ) + +#define Validate_IMAPIProp_GetPropList( a1, a2, a3 ) \ + ValidateParameters3( IMAPIProp_GetPropList, a1, a2, a3 ) +#define UlValidate_IMAPIProp_GetPropList( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIProp_GetPropList, a1, a2, a3 ) +#define CheckParameters_IMAPIProp_GetPropList( a1, a2, a3 ) \ + CheckParameters3( IMAPIProp_GetPropList, a1, a2, a3 ) + +#define Validate_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMAPIProp_OpenProperty( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMAPIProp_OpenProperty, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMAPIProp_SetProps( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 ) +#define UlValidate_IMAPIProp_SetProps( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 ) +#define CheckParameters_IMAPIProp_SetProps( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPIProp_SetProps, a1, a2, a3, a4 ) + +#define Validate_IMAPIProp_DeleteProps( a1, a2, a3 ) \ + ValidateParameters3( IMAPIProp_DeleteProps, a1, a2, a3 ) +#define UlValidate_IMAPIProp_DeleteProps( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIProp_DeleteProps, a1, a2, a3 ) +#define CheckParameters_IMAPIProp_DeleteProps( a1, a2, a3 ) \ + CheckParameters3( IMAPIProp_DeleteProps, a1, a2, a3 ) + +#define Validate_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + ValidateParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) +#define UlValidate_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + UlValidateParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) +#define CheckParameters_IMAPIProp_CopyTo( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) \ + CheckParameters10( IMAPIProp_CopyTo, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ) + +#define Validate_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \ + ValidateParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 ) +#define UlValidate_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \ + UlValidateParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 ) +#define CheckParameters_IMAPIProp_CopyProps( a1, a2, a3, a4, a5, a6, a7, a8 ) \ + CheckParameters8( IMAPIProp_CopyProps, a1, a2, a3, a4, a5, a6, a7, a8 ) + +#define Validate_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMAPIProp_GetNamesFromIDs( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMAPIProp_GetNamesFromIDs, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPIProp_GetIDsFromNames( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPIProp_GetIDsFromNames, a1, a2, a3, a4, a5 ) + + +/* IMAPITable */ + +#define Validate_IMAPITable_GetLastError( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 ) +#define UlValidate_IMAPITable_GetLastError( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 ) +#define CheckParameters_IMAPITable_GetLastError( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPITable_GetLastError, a1, a2, a3, a4 ) + +#define Validate_IMAPITable_Advise( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPITable_Advise, a1, a2, a3, a4 ) +#define UlValidate_IMAPITable_Advise( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPITable_Advise, a1, a2, a3, a4 ) +#define CheckParameters_IMAPITable_Advise( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPITable_Advise, a1, a2, a3, a4 ) + +#define Validate_IMAPITable_Unadvise( a1, a2 ) \ + ValidateParameters2( IMAPITable_Unadvise, a1, a2 ) +#define UlValidate_IMAPITable_Unadvise( a1, a2 ) \ + UlValidateParameters2( IMAPITable_Unadvise, a1, a2 ) +#define CheckParameters_IMAPITable_Unadvise( a1, a2 ) \ + CheckParameters2( IMAPITable_Unadvise, a1, a2 ) + +#define Validate_IMAPITable_GetStatus( a1, a2, a3 ) \ + ValidateParameters3( IMAPITable_GetStatus, a1, a2, a3 ) +#define UlValidate_IMAPITable_GetStatus( a1, a2, a3 ) \ + UlValidateParameters3( IMAPITable_GetStatus, a1, a2, a3 ) +#define CheckParameters_IMAPITable_GetStatus( a1, a2, a3 ) \ + CheckParameters3( IMAPITable_GetStatus, a1, a2, a3 ) + +#define Validate_IMAPITable_SetColumns( a1, a2, a3 ) \ + ValidateParameters3( IMAPITable_SetColumns, a1, a2, a3 ) +#define UlValidate_IMAPITable_SetColumns( a1, a2, a3 ) \ + UlValidateParameters3( IMAPITable_SetColumns, a1, a2, a3 ) +#define CheckParameters_IMAPITable_SetColumns( a1, a2, a3 ) \ + CheckParameters3( IMAPITable_SetColumns, a1, a2, a3 ) + +#define Validate_IMAPITable_QueryColumns( a1, a2, a3 ) \ + ValidateParameters3( IMAPITable_QueryColumns, a1, a2, a3 ) +#define UlValidate_IMAPITable_QueryColumns( a1, a2, a3 ) \ + UlValidateParameters3( IMAPITable_QueryColumns, a1, a2, a3 ) +#define CheckParameters_IMAPITable_QueryColumns( a1, a2, a3 ) \ + CheckParameters3( IMAPITable_QueryColumns, a1, a2, a3 ) + +#define Validate_IMAPITable_GetRowCount( a1, a2, a3 ) \ + ValidateParameters3( IMAPITable_GetRowCount, a1, a2, a3 ) +#define UlValidate_IMAPITable_GetRowCount( a1, a2, a3 ) \ + UlValidateParameters3( IMAPITable_GetRowCount, a1, a2, a3 ) +#define CheckParameters_IMAPITable_GetRowCount( a1, a2, a3 ) \ + CheckParameters3( IMAPITable_GetRowCount, a1, a2, a3 ) + +#define Validate_IMAPITable_SeekRow( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 ) +#define UlValidate_IMAPITable_SeekRow( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 ) +#define CheckParameters_IMAPITable_SeekRow( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPITable_SeekRow, a1, a2, a3, a4 ) + +#define Validate_IMAPITable_SeekRowApprox( a1, a2, a3 ) \ + ValidateParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 ) +#define UlValidate_IMAPITable_SeekRowApprox( a1, a2, a3 ) \ + UlValidateParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 ) +#define CheckParameters_IMAPITable_SeekRowApprox( a1, a2, a3 ) \ + CheckParameters3( IMAPITable_SeekRowApprox, a1, a2, a3 ) + +#define Validate_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 ) +#define UlValidate_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 ) +#define CheckParameters_IMAPITable_QueryPosition( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPITable_QueryPosition, a1, a2, a3, a4 ) + +#define Validate_IMAPITable_FindRow( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPITable_FindRow, a1, a2, a3, a4 ) +#define UlValidate_IMAPITable_FindRow( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPITable_FindRow, a1, a2, a3, a4 ) +#define CheckParameters_IMAPITable_FindRow( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPITable_FindRow, a1, a2, a3, a4 ) + +#define Validate_IMAPITable_Restrict( a1, a2, a3 ) \ + ValidateParameters3( IMAPITable_Restrict, a1, a2, a3 ) +#define UlValidate_IMAPITable_Restrict( a1, a2, a3 ) \ + UlValidateParameters3( IMAPITable_Restrict, a1, a2, a3 ) +#define CheckParameters_IMAPITable_Restrict( a1, a2, a3 ) \ + CheckParameters3( IMAPITable_Restrict, a1, a2, a3 ) + +#define Validate_IMAPITable_CreateBookmark( a1, a2 ) \ + ValidateParameters2( IMAPITable_CreateBookmark, a1, a2 ) +#define UlValidate_IMAPITable_CreateBookmark( a1, a2 ) \ + UlValidateParameters2( IMAPITable_CreateBookmark, a1, a2 ) +#define CheckParameters_IMAPITable_CreateBookmark( a1, a2 ) \ + CheckParameters2( IMAPITable_CreateBookmark, a1, a2 ) + +#define Validate_IMAPITable_FreeBookmark( a1, a2 ) \ + ValidateParameters2( IMAPITable_FreeBookmark, a1, a2 ) +#define UlValidate_IMAPITable_FreeBookmark( a1, a2 ) \ + UlValidateParameters2( IMAPITable_FreeBookmark, a1, a2 ) +#define CheckParameters_IMAPITable_FreeBookmark( a1, a2 ) \ + CheckParameters2( IMAPITable_FreeBookmark, a1, a2 ) + +#define Validate_IMAPITable_SortTable( a1, a2, a3 ) \ + ValidateParameters3( IMAPITable_SortTable, a1, a2, a3 ) +#define UlValidate_IMAPITable_SortTable( a1, a2, a3 ) \ + UlValidateParameters3( IMAPITable_SortTable, a1, a2, a3 ) +#define CheckParameters_IMAPITable_SortTable( a1, a2, a3 ) \ + CheckParameters3( IMAPITable_SortTable, a1, a2, a3 ) + +#define Validate_IMAPITable_QuerySortOrder( a1, a2 ) \ + ValidateParameters2( IMAPITable_QuerySortOrder, a1, a2 ) +#define UlValidate_IMAPITable_QuerySortOrder( a1, a2 ) \ + UlValidateParameters2( IMAPITable_QuerySortOrder, a1, a2 ) +#define CheckParameters_IMAPITable_QuerySortOrder( a1, a2 ) \ + CheckParameters2( IMAPITable_QuerySortOrder, a1, a2 ) + +#define Validate_IMAPITable_QueryRows( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 ) +#define UlValidate_IMAPITable_QueryRows( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 ) +#define CheckParameters_IMAPITable_QueryRows( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPITable_QueryRows, a1, a2, a3, a4 ) + +#define Validate_IMAPITable_Abort( a1 ) \ + ValidateParameters1( IMAPITable_Abort, a1 ) +#define UlValidate_IMAPITable_Abort( a1 ) \ + UlValidateParameters1( IMAPITable_Abort, a1 ) +#define CheckParameters_IMAPITable_Abort( a1 ) \ + CheckParameters1( IMAPITable_Abort, a1 ) + +#define Validate_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMAPITable_ExpandRow( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMAPITable_ExpandRow, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPITable_CollapseRow( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPITable_CollapseRow, a1, a2, a3, a4, a5 ) + +#define Validate_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 ) +#define UlValidate_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 ) +#define CheckParameters_IMAPITable_WaitForCompletion( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPITable_WaitForCompletion, a1, a2, a3, a4 ) + +#define Validate_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMAPITable_GetCollapseState( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMAPITable_GetCollapseState, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPITable_SetCollapseState( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPITable_SetCollapseState, a1, a2, a3, a4, a5 ) + + +/* IMAPIContainer */ + +#define Validate_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \ + ValidateParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 ) +#define UlValidate_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 ) +#define CheckParameters_IMAPIContainer_GetContentsTable( a1, a2, a3 ) \ + CheckParameters3( IMAPIContainer_GetContentsTable, a1, a2, a3 ) + +#define Validate_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \ + ValidateParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 ) +#define UlValidate_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 ) +#define CheckParameters_IMAPIContainer_GetHierarchyTable( a1, a2, a3 ) \ + CheckParameters3( IMAPIContainer_GetHierarchyTable, a1, a2, a3 ) + +#define Validate_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMAPIContainer_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMAPIContainer_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 ) +#define UlValidate_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 ) +#define CheckParameters_IMAPIContainer_SetSearchCriteria( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPIContainer_SetSearchCriteria, a1, a2, a3, a4 ) + +#define Validate_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPIContainer_GetSearchCriteria( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPIContainer_GetSearchCriteria, a1, a2, a3, a4, a5 ) + + +/* IABContainer */ + +#define Validate_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 ) +#define UlValidate_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 ) +#define CheckParameters_IABContainer_CreateEntry( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IABContainer_CreateEntry, a1, a2, a3, a4, a5 ) + +#define Validate_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 ) +#define UlValidate_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 ) +#define CheckParameters_IABContainer_CopyEntries( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IABContainer_CopyEntries, a1, a2, a3, a4, a5 ) + +#define Validate_IABContainer_DeleteEntries( a1, a2, a3 ) \ + ValidateParameters3( IABContainer_DeleteEntries, a1, a2, a3 ) +#define UlValidate_IABContainer_DeleteEntries( a1, a2, a3 ) \ + UlValidateParameters3( IABContainer_DeleteEntries, a1, a2, a3 ) +#define CheckParameters_IABContainer_DeleteEntries( a1, a2, a3 ) \ + CheckParameters3( IABContainer_DeleteEntries, a1, a2, a3 ) + +#define Validate_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 ) +#define UlValidate_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 ) +#define CheckParameters_IABContainer_ResolveNames( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IABContainer_ResolveNames, a1, a2, a3, a4, a5 ) + + +/* IDistList */ + +#define Validate_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 ) +#define UlValidate_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 ) +#define CheckParameters_IDistList_CreateEntry( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IDistList_CreateEntry, a1, a2, a3, a4, a5 ) + +#define Validate_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 ) +#define UlValidate_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 ) +#define CheckParameters_IDistList_CopyEntries( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IDistList_CopyEntries, a1, a2, a3, a4, a5 ) + +#define Validate_IDistList_DeleteEntries( a1, a2, a3 ) \ + ValidateParameters3( IDistList_DeleteEntries, a1, a2, a3 ) +#define UlValidate_IDistList_DeleteEntries( a1, a2, a3 ) \ + UlValidateParameters3( IDistList_DeleteEntries, a1, a2, a3 ) +#define CheckParameters_IDistList_DeleteEntries( a1, a2, a3 ) \ + CheckParameters3( IDistList_DeleteEntries, a1, a2, a3 ) + +#define Validate_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 ) +#define UlValidate_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 ) +#define CheckParameters_IDistList_ResolveNames( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IDistList_ResolveNames, a1, a2, a3, a4, a5 ) + + +/* IMAPIFolder */ + +#define Validate_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 ) +#define UlValidate_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 ) +#define CheckParameters_IMAPIFolder_CreateMessage( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPIFolder_CreateMessage, a1, a2, a3, a4 ) + +#define Validate_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMAPIFolder_CopyMessages( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMAPIFolder_CopyMessages, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPIFolder_DeleteMessages( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPIFolder_DeleteMessages, a1, a2, a3, a4, a5 ) + +#define Validate_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMAPIFolder_CreateFolder( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMAPIFolder_CreateFolder, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + ValidateParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) +#define UlValidate_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + UlValidateParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) +#define CheckParameters_IMAPIFolder_CopyFolder( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + CheckParameters9( IMAPIFolder_CopyFolder, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) + +#define Validate_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMAPIFolder_DeleteFolder( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMAPIFolder_DeleteFolder, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPIFolder_SetReadFlags( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPIFolder_SetReadFlags, a1, a2, a3, a4, a5 ) + +#define Validate_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPIFolder_GetMessageStatus( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPIFolder_GetMessageStatus, a1, a2, a3, a4, a5 ) + +#define Validate_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMAPIFolder_SetMessageStatus( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMAPIFolder_SetMessageStatus, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \ + ValidateParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 ) +#define UlValidate_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 ) +#define CheckParameters_IMAPIFolder_SaveContentsSort( a1, a2, a3 ) \ + CheckParameters3( IMAPIFolder_SaveContentsSort, a1, a2, a3 ) + +#define Validate_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 ) +#define UlValidate_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 ) +#define CheckParameters_IMAPIFolder_EmptyFolder( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPIFolder_EmptyFolder, a1, a2, a3, a4 ) + + +/* IMsgStore */ + +#define Validate_IMsgStore_Advise( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMsgStore_Advise, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMsgStore_Advise( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMsgStore_Advise, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMsgStore_Advise( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMsgStore_Advise, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMsgStore_Unadvise( a1, a2 ) \ + ValidateParameters2( IMsgStore_Unadvise, a1, a2 ) +#define UlValidate_IMsgStore_Unadvise( a1, a2 ) \ + UlValidateParameters2( IMsgStore_Unadvise, a1, a2 ) +#define CheckParameters_IMsgStore_Unadvise( a1, a2 ) \ + CheckParameters2( IMsgStore_Unadvise, a1, a2 ) + +#define Validate_IMsgStore_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMsgStore_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMsgStore_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMsgStore_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMsgStore_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMsgStore_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMsgStore_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMsgStore_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMsgStore_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMsgStore_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMsgStore_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMsgStore_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMsgStore_SetReceiveFolder( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMsgStore_SetReceiveFolder, a1, a2, a3, a4, a5 ) +#define UlValidate_IMsgStore_SetReceiveFolder( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMsgStore_SetReceiveFolder, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMsgStore_SetReceiveFolder( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMsgStore_SetReceiveFolder, a1, a2, a3, a4, a5 ) + +#define Validate_IMsgStore_GetReceiveFolder( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMsgStore_GetReceiveFolder, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMsgStore_GetReceiveFolder( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMsgStore_GetReceiveFolder, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMsgStore_GetReceiveFolder( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMsgStore_GetReceiveFolder, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMsgStore_GetReceiveFolderTable( a1, a2, a3 ) \ + ValidateParameters3( IMsgStore_GetReceiveFolderTable, a1, a2, a3 ) +#define UlValidate_IMsgStore_GetReceiveFolderTable( a1, a2, a3 ) \ + UlValidateParameters3( IMsgStore_GetReceiveFolderTable, a1, a2, a3 ) +#define CheckParameters_IMsgStore_GetReceiveFolderTable( a1, a2, a3 ) \ + CheckParameters3( IMsgStore_GetReceiveFolderTable, a1, a2, a3 ) + +#define Validate_IMsgStore_StoreLogoff( a1, a2 ) \ + ValidateParameters2( IMsgStore_StoreLogoff, a1, a2 ) +#define UlValidate_IMsgStore_StoreLogoff( a1, a2 ) \ + UlValidateParameters2( IMsgStore_StoreLogoff, a1, a2 ) +#define CheckParameters_IMsgStore_StoreLogoff( a1, a2 ) \ + CheckParameters2( IMsgStore_StoreLogoff, a1, a2 ) + +#define Validate_IMsgStore_AbortSubmit( a1, a2, a3, a4 ) \ + ValidateParameters4( IMsgStore_AbortSubmit, a1, a2, a3, a4 ) +#define UlValidate_IMsgStore_AbortSubmit( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMsgStore_AbortSubmit, a1, a2, a3, a4 ) +#define CheckParameters_IMsgStore_AbortSubmit( a1, a2, a3, a4 ) \ + CheckParameters4( IMsgStore_AbortSubmit, a1, a2, a3, a4 ) + +#define Validate_IMsgStore_GetOutgoingQueue( a1, a2, a3 ) \ + ValidateParameters3( IMsgStore_GetOutgoingQueue, a1, a2, a3 ) +#define UlValidate_IMsgStore_GetOutgoingQueue( a1, a2, a3 ) \ + UlValidateParameters3( IMsgStore_GetOutgoingQueue, a1, a2, a3 ) +#define CheckParameters_IMsgStore_GetOutgoingQueue( a1, a2, a3 ) \ + CheckParameters3( IMsgStore_GetOutgoingQueue, a1, a2, a3 ) + +#define Validate_IMsgStore_SetLockState( a1, a2, a3 ) \ + ValidateParameters3( IMsgStore_SetLockState, a1, a2, a3 ) +#define UlValidate_IMsgStore_SetLockState( a1, a2, a3 ) \ + UlValidateParameters3( IMsgStore_SetLockState, a1, a2, a3 ) +#define CheckParameters_IMsgStore_SetLockState( a1, a2, a3 ) \ + CheckParameters3( IMsgStore_SetLockState, a1, a2, a3 ) + +#define Validate_IMsgStore_FinishedMsg( a1, a2, a3, a4 ) \ + ValidateParameters4( IMsgStore_FinishedMsg, a1, a2, a3, a4 ) +#define UlValidate_IMsgStore_FinishedMsg( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMsgStore_FinishedMsg, a1, a2, a3, a4 ) +#define CheckParameters_IMsgStore_FinishedMsg( a1, a2, a3, a4 ) \ + CheckParameters4( IMsgStore_FinishedMsg, a1, a2, a3, a4 ) + +#define Validate_IMsgStore_NotifyNewMail( a1, a2 ) \ + ValidateParameters2( IMsgStore_NotifyNewMail, a1, a2 ) +#define UlValidate_IMsgStore_NotifyNewMail( a1, a2 ) \ + UlValidateParameters2( IMsgStore_NotifyNewMail, a1, a2 ) +#define CheckParameters_IMsgStore_NotifyNewMail( a1, a2 ) \ + CheckParameters2( IMsgStore_NotifyNewMail, a1, a2 ) + + +/* IMessage */ + +#define Validate_IMessage_GetAttachmentTable( a1, a2, a3 ) \ + ValidateParameters3( IMessage_GetAttachmentTable, a1, a2, a3 ) +#define UlValidate_IMessage_GetAttachmentTable( a1, a2, a3 ) \ + UlValidateParameters3( IMessage_GetAttachmentTable, a1, a2, a3 ) +#define CheckParameters_IMessage_GetAttachmentTable( a1, a2, a3 ) \ + CheckParameters3( IMessage_GetAttachmentTable, a1, a2, a3 ) + +#define Validate_IMessage_OpenAttach( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMessage_OpenAttach, a1, a2, a3, a4, a5 ) +#define UlValidate_IMessage_OpenAttach( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMessage_OpenAttach, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMessage_OpenAttach( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMessage_OpenAttach, a1, a2, a3, a4, a5 ) + +#define Validate_IMessage_CreateAttach( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMessage_CreateAttach, a1, a2, a3, a4, a5 ) +#define UlValidate_IMessage_CreateAttach( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMessage_CreateAttach, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMessage_CreateAttach( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMessage_CreateAttach, a1, a2, a3, a4, a5 ) + +#define Validate_IMessage_DeleteAttach( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMessage_DeleteAttach, a1, a2, a3, a4, a5 ) +#define UlValidate_IMessage_DeleteAttach( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMessage_DeleteAttach, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMessage_DeleteAttach( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMessage_DeleteAttach, a1, a2, a3, a4, a5 ) + +#define Validate_IMessage_GetRecipientTable( a1, a2, a3 ) \ + ValidateParameters3( IMessage_GetRecipientTable, a1, a2, a3 ) +#define UlValidate_IMessage_GetRecipientTable( a1, a2, a3 ) \ + UlValidateParameters3( IMessage_GetRecipientTable, a1, a2, a3 ) +#define CheckParameters_IMessage_GetRecipientTable( a1, a2, a3 ) \ + CheckParameters3( IMessage_GetRecipientTable, a1, a2, a3 ) + +#define Validate_IMessage_ModifyRecipients( a1, a2, a3 ) \ + ValidateParameters3( IMessage_ModifyRecipients, a1, a2, a3 ) +#define UlValidate_IMessage_ModifyRecipients( a1, a2, a3 ) \ + UlValidateParameters3( IMessage_ModifyRecipients, a1, a2, a3 ) +#define CheckParameters_IMessage_ModifyRecipients( a1, a2, a3 ) \ + CheckParameters3( IMessage_ModifyRecipients, a1, a2, a3 ) + +#define Validate_IMessage_SubmitMessage( a1, a2 ) \ + ValidateParameters2( IMessage_SubmitMessage, a1, a2 ) +#define UlValidate_IMessage_SubmitMessage( a1, a2 ) \ + UlValidateParameters2( IMessage_SubmitMessage, a1, a2 ) +#define CheckParameters_IMessage_SubmitMessage( a1, a2 ) \ + CheckParameters2( IMessage_SubmitMessage, a1, a2 ) + +#define Validate_IMessage_SetReadFlag( a1, a2 ) \ + ValidateParameters2( IMessage_SetReadFlag, a1, a2 ) +#define UlValidate_IMessage_SetReadFlag( a1, a2 ) \ + UlValidateParameters2( IMessage_SetReadFlag, a1, a2 ) +#define CheckParameters_IMessage_SetReadFlag( a1, a2 ) \ + CheckParameters2( IMessage_SetReadFlag, a1, a2 ) + + +/* IABProvider */ + +#define Validate_IABProvider_Shutdown( a1, a2 ) \ + ValidateParameters2( IABProvider_Shutdown, a1, a2 ) +#define UlValidate_IABProvider_Shutdown( a1, a2 ) \ + UlValidateParameters2( IABProvider_Shutdown, a1, a2 ) +#define CheckParameters_IABProvider_Shutdown( a1, a2 ) \ + CheckParameters2( IABProvider_Shutdown, a1, a2 ) + +#define Validate_IABProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + ValidateParameters9( IABProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) +#define UlValidate_IABProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + UlValidateParameters9( IABProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) +#define CheckParameters_IABProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) \ + CheckParameters9( IABProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) + + +/* IABLogon */ + +#define Validate_IABLogon_GetLastError( a1, a2, a3, a4 ) \ + ValidateParameters4( IABLogon_GetLastError, a1, a2, a3, a4 ) +#define UlValidate_IABLogon_GetLastError( a1, a2, a3, a4 ) \ + UlValidateParameters4( IABLogon_GetLastError, a1, a2, a3, a4 ) +#define CheckParameters_IABLogon_GetLastError( a1, a2, a3, a4 ) \ + CheckParameters4( IABLogon_GetLastError, a1, a2, a3, a4 ) + +#define Validate_IABLogon_Logoff( a1, a2 ) \ + ValidateParameters2( IABLogon_Logoff, a1, a2 ) +#define UlValidate_IABLogon_Logoff( a1, a2 ) \ + UlValidateParameters2( IABLogon_Logoff, a1, a2 ) +#define CheckParameters_IABLogon_Logoff( a1, a2 ) \ + CheckParameters2( IABLogon_Logoff, a1, a2 ) + +#define Validate_IABLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IABLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IABLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IABLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IABLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IABLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IABLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IABLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IABLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IABLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IABLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IABLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IABLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IABLogon_Advise, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IABLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IABLogon_Advise, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IABLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IABLogon_Advise, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IABLogon_Unadvise( a1, a2 ) \ + ValidateParameters2( IABLogon_Unadvise, a1, a2 ) +#define UlValidate_IABLogon_Unadvise( a1, a2 ) \ + UlValidateParameters2( IABLogon_Unadvise, a1, a2 ) +#define CheckParameters_IABLogon_Unadvise( a1, a2 ) \ + CheckParameters2( IABLogon_Unadvise, a1, a2 ) + +#define Validate_IABLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IABLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) +#define UlValidate_IABLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IABLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) +#define CheckParameters_IABLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IABLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) + +#define Validate_IABLogon_OpenTemplateID( a1, a2, a3, a4, a5, a6, a7, a8 ) \ + ValidateParameters8( IABLogon_OpenTemplateID, a1, a2, a3, a4, a5, a6, a7, a8 ) +#define UlValidate_IABLogon_OpenTemplateID( a1, a2, a3, a4, a5, a6, a7, a8 ) \ + UlValidateParameters8( IABLogon_OpenTemplateID, a1, a2, a3, a4, a5, a6, a7, a8 ) +#define CheckParameters_IABLogon_OpenTemplateID( a1, a2, a3, a4, a5, a6, a7, a8 ) \ + CheckParameters8( IABLogon_OpenTemplateID, a1, a2, a3, a4, a5, a6, a7, a8 ) + +#define Validate_IABLogon_GetOneOffTable( a1, a2, a3 ) \ + ValidateParameters3( IABLogon_GetOneOffTable, a1, a2, a3 ) +#define UlValidate_IABLogon_GetOneOffTable( a1, a2, a3 ) \ + UlValidateParameters3( IABLogon_GetOneOffTable, a1, a2, a3 ) +#define CheckParameters_IABLogon_GetOneOffTable( a1, a2, a3 ) \ + CheckParameters3( IABLogon_GetOneOffTable, a1, a2, a3 ) + +#define Validate_IABLogon_PrepareRecips( a1, a2, a3, a4 ) \ + ValidateParameters4( IABLogon_PrepareRecips, a1, a2, a3, a4 ) +#define UlValidate_IABLogon_PrepareRecips( a1, a2, a3, a4 ) \ + UlValidateParameters4( IABLogon_PrepareRecips, a1, a2, a3, a4 ) +#define CheckParameters_IABLogon_PrepareRecips( a1, a2, a3, a4 ) \ + CheckParameters4( IABLogon_PrepareRecips, a1, a2, a3, a4 ) + + +/* IXPProvider */ + +#define Validate_IXPProvider_Shutdown( a1, a2 ) \ + ValidateParameters2( IXPProvider_Shutdown, a1, a2 ) +#define UlValidate_IXPProvider_Shutdown( a1, a2 ) \ + UlValidateParameters2( IXPProvider_Shutdown, a1, a2 ) +#define CheckParameters_IXPProvider_Shutdown( a1, a2 ) \ + CheckParameters2( IXPProvider_Shutdown, a1, a2 ) + +#define Validate_IXPProvider_TransportLogon( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IXPProvider_TransportLogon, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IXPProvider_TransportLogon( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IXPProvider_TransportLogon, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IXPProvider_TransportLogon( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IXPProvider_TransportLogon, a1, a2, a3, a4, a5, a6, a7 ) + + +/* IXPLogon */ + +#define Validate_IXPLogon_AddressTypes( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IXPLogon_AddressTypes, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IXPLogon_AddressTypes( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IXPLogon_AddressTypes, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IXPLogon_AddressTypes( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IXPLogon_AddressTypes, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IXPLogon_RegisterOptions( a1, a2, a3, a4 ) \ + ValidateParameters4( IXPLogon_RegisterOptions, a1, a2, a3, a4 ) +#define UlValidate_IXPLogon_RegisterOptions( a1, a2, a3, a4 ) \ + UlValidateParameters4( IXPLogon_RegisterOptions, a1, a2, a3, a4 ) +#define CheckParameters_IXPLogon_RegisterOptions( a1, a2, a3, a4 ) \ + CheckParameters4( IXPLogon_RegisterOptions, a1, a2, a3, a4 ) + +#define Validate_IXPLogon_TransportNotify( a1, a2, a3 ) \ + ValidateParameters3( IXPLogon_TransportNotify, a1, a2, a3 ) +#define UlValidate_IXPLogon_TransportNotify( a1, a2, a3 ) \ + UlValidateParameters3( IXPLogon_TransportNotify, a1, a2, a3 ) +#define CheckParameters_IXPLogon_TransportNotify( a1, a2, a3 ) \ + CheckParameters3( IXPLogon_TransportNotify, a1, a2, a3 ) + +#define Validate_IXPLogon_Idle( a1, a2 ) \ + ValidateParameters2( IXPLogon_Idle, a1, a2 ) +#define UlValidate_IXPLogon_Idle( a1, a2 ) \ + UlValidateParameters2( IXPLogon_Idle, a1, a2 ) +#define CheckParameters_IXPLogon_Idle( a1, a2 ) \ + CheckParameters2( IXPLogon_Idle, a1, a2 ) + +#define Validate_IXPLogon_TransportLogoff( a1, a2 ) \ + ValidateParameters2( IXPLogon_TransportLogoff, a1, a2 ) +#define UlValidate_IXPLogon_TransportLogoff( a1, a2 ) \ + UlValidateParameters2( IXPLogon_TransportLogoff, a1, a2 ) +#define CheckParameters_IXPLogon_TransportLogoff( a1, a2 ) \ + CheckParameters2( IXPLogon_TransportLogoff, a1, a2 ) + +#define Validate_IXPLogon_SubmitMessage( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IXPLogon_SubmitMessage, a1, a2, a3, a4, a5 ) +#define UlValidate_IXPLogon_SubmitMessage( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IXPLogon_SubmitMessage, a1, a2, a3, a4, a5 ) +#define CheckParameters_IXPLogon_SubmitMessage( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IXPLogon_SubmitMessage, a1, a2, a3, a4, a5 ) + +#define Validate_IXPLogon_EndMessage( a1, a2, a3 ) \ + ValidateParameters3( IXPLogon_EndMessage, a1, a2, a3 ) +#define UlValidate_IXPLogon_EndMessage( a1, a2, a3 ) \ + UlValidateParameters3( IXPLogon_EndMessage, a1, a2, a3 ) +#define CheckParameters_IXPLogon_EndMessage( a1, a2, a3 ) \ + CheckParameters3( IXPLogon_EndMessage, a1, a2, a3 ) + +#define Validate_IXPLogon_Poll( a1, a2 ) \ + ValidateParameters2( IXPLogon_Poll, a1, a2 ) +#define UlValidate_IXPLogon_Poll( a1, a2 ) \ + UlValidateParameters2( IXPLogon_Poll, a1, a2 ) +#define CheckParameters_IXPLogon_Poll( a1, a2 ) \ + CheckParameters2( IXPLogon_Poll, a1, a2 ) + +#define Validate_IXPLogon_StartMessage( a1, a2, a3, a4 ) \ + ValidateParameters4( IXPLogon_StartMessage, a1, a2, a3, a4 ) +#define UlValidate_IXPLogon_StartMessage( a1, a2, a3, a4 ) \ + UlValidateParameters4( IXPLogon_StartMessage, a1, a2, a3, a4 ) +#define CheckParameters_IXPLogon_StartMessage( a1, a2, a3, a4 ) \ + CheckParameters4( IXPLogon_StartMessage, a1, a2, a3, a4 ) + +#define Validate_IXPLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IXPLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) +#define UlValidate_IXPLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IXPLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) +#define CheckParameters_IXPLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IXPLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) + +#define Validate_IXPLogon_ValidateState( a1, a2, a3 ) \ + ValidateParameters3( IXPLogon_ValidateState, a1, a2, a3 ) +#define UlValidate_IXPLogon_ValidateState( a1, a2, a3 ) \ + UlValidateParameters3( IXPLogon_ValidateState, a1, a2, a3 ) +#define CheckParameters_IXPLogon_ValidateState( a1, a2, a3 ) \ + CheckParameters3( IXPLogon_ValidateState, a1, a2, a3 ) + +#define Validate_IXPLogon_FlushQueues( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IXPLogon_FlushQueues, a1, a2, a3, a4, a5 ) +#define UlValidate_IXPLogon_FlushQueues( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IXPLogon_FlushQueues, a1, a2, a3, a4, a5 ) +#define CheckParameters_IXPLogon_FlushQueues( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IXPLogon_FlushQueues, a1, a2, a3, a4, a5 ) + + +/* IMSProvider */ + +#define Validate_IMSProvider_Shutdown( a1, a2 ) \ + ValidateParameters2( IMSProvider_Shutdown, a1, a2 ) +#define UlValidate_IMSProvider_Shutdown( a1, a2 ) \ + UlValidateParameters2( IMSProvider_Shutdown, a1, a2 ) +#define CheckParameters_IMSProvider_Shutdown( a1, a2 ) \ + CheckParameters2( IMSProvider_Shutdown, a1, a2 ) + +#define Validate_IMSProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + ValidateParameters13( IMSProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) +#define UlValidate_IMSProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + UlValidateParameters13( IMSProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) +#define CheckParameters_IMSProvider_Logon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + CheckParameters13( IMSProvider_Logon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) + +#define Validate_IMSProvider_SpoolerLogon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + ValidateParameters13( IMSProvider_SpoolerLogon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) +#define UlValidate_IMSProvider_SpoolerLogon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + UlValidateParameters13( IMSProvider_SpoolerLogon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) +#define CheckParameters_IMSProvider_SpoolerLogon( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) \ + CheckParameters13( IMSProvider_SpoolerLogon, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 ) + +#define Validate_IMSProvider_CompareStoreIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMSProvider_CompareStoreIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMSProvider_CompareStoreIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMSProvider_CompareStoreIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMSProvider_CompareStoreIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMSProvider_CompareStoreIDs, a1, a2, a3, a4, a5, a6, a7 ) + + +/* IMSLogon */ + +#define Validate_IMSLogon_GetLastError( a1, a2, a3, a4 ) \ + ValidateParameters4( IMSLogon_GetLastError, a1, a2, a3, a4 ) +#define UlValidate_IMSLogon_GetLastError( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMSLogon_GetLastError, a1, a2, a3, a4 ) +#define CheckParameters_IMSLogon_GetLastError( a1, a2, a3, a4 ) \ + CheckParameters4( IMSLogon_GetLastError, a1, a2, a3, a4 ) + +#define Validate_IMSLogon_Logoff( a1, a2 ) \ + ValidateParameters2( IMSLogon_Logoff, a1, a2 ) +#define UlValidate_IMSLogon_Logoff( a1, a2 ) \ + UlValidateParameters2( IMSLogon_Logoff, a1, a2 ) +#define CheckParameters_IMSLogon_Logoff( a1, a2 ) \ + CheckParameters2( IMSLogon_Logoff, a1, a2 ) + +#define Validate_IMSLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMSLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMSLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMSLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMSLogon_OpenEntry( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMSLogon_OpenEntry, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMSLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + ValidateParameters7( IMSLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define UlValidate_IMSLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + UlValidateParameters7( IMSLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) +#define CheckParameters_IMSLogon_CompareEntryIDs( a1, a2, a3, a4, a5, a6, a7 ) \ + CheckParameters7( IMSLogon_CompareEntryIDs, a1, a2, a3, a4, a5, a6, a7 ) + +#define Validate_IMSLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ + ValidateParameters6( IMSLogon_Advise, a1, a2, a3, a4, a5, a6 ) +#define UlValidate_IMSLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ + UlValidateParameters6( IMSLogon_Advise, a1, a2, a3, a4, a5, a6 ) +#define CheckParameters_IMSLogon_Advise( a1, a2, a3, a4, a5, a6 ) \ + CheckParameters6( IMSLogon_Advise, a1, a2, a3, a4, a5, a6 ) + +#define Validate_IMSLogon_Unadvise( a1, a2 ) \ + ValidateParameters2( IMSLogon_Unadvise, a1, a2 ) +#define UlValidate_IMSLogon_Unadvise( a1, a2 ) \ + UlValidateParameters2( IMSLogon_Unadvise, a1, a2 ) +#define CheckParameters_IMSLogon_Unadvise( a1, a2 ) \ + CheckParameters2( IMSLogon_Unadvise, a1, a2 ) + +#define Validate_IMSLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMSLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) +#define UlValidate_IMSLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMSLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMSLogon_OpenStatusEntry( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMSLogon_OpenStatusEntry, a1, a2, a3, a4, a5 ) + + +/* IMAPIControl */ + +#define Validate_IMAPIControl_GetLastError( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPIControl_GetLastError, a1, a2, a3, a4 ) +#define UlValidate_IMAPIControl_GetLastError( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPIControl_GetLastError, a1, a2, a3, a4 ) +#define CheckParameters_IMAPIControl_GetLastError( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPIControl_GetLastError, a1, a2, a3, a4 ) + +#define Validate_IMAPIControl_Activate( a1, a2, a3 ) \ + ValidateParameters3( IMAPIControl_Activate, a1, a2, a3 ) +#define UlValidate_IMAPIControl_Activate( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIControl_Activate, a1, a2, a3 ) +#define CheckParameters_IMAPIControl_Activate( a1, a2, a3 ) \ + CheckParameters3( IMAPIControl_Activate, a1, a2, a3 ) + +#define Validate_IMAPIControl_GetState( a1, a2, a3 ) \ + ValidateParameters3( IMAPIControl_GetState, a1, a2, a3 ) +#define UlValidate_IMAPIControl_GetState( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIControl_GetState, a1, a2, a3 ) +#define CheckParameters_IMAPIControl_GetState( a1, a2, a3 ) \ + CheckParameters3( IMAPIControl_GetState, a1, a2, a3 ) + + +/* IMAPIStatus */ + +#define Validate_IMAPIStatus_ValidateState( a1, a2, a3 ) \ + ValidateParameters3( IMAPIStatus_ValidateState, a1, a2, a3 ) +#define UlValidate_IMAPIStatus_ValidateState( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIStatus_ValidateState, a1, a2, a3 ) +#define CheckParameters_IMAPIStatus_ValidateState( a1, a2, a3 ) \ + CheckParameters3( IMAPIStatus_ValidateState, a1, a2, a3 ) + +#define Validate_IMAPIStatus_SettingsDialog( a1, a2, a3 ) \ + ValidateParameters3( IMAPIStatus_SettingsDialog, a1, a2, a3 ) +#define UlValidate_IMAPIStatus_SettingsDialog( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIStatus_SettingsDialog, a1, a2, a3 ) +#define CheckParameters_IMAPIStatus_SettingsDialog( a1, a2, a3 ) \ + CheckParameters3( IMAPIStatus_SettingsDialog, a1, a2, a3 ) + +#define Validate_IMAPIStatus_ChangePassword( a1, a2, a3, a4 ) \ + ValidateParameters4( IMAPIStatus_ChangePassword, a1, a2, a3, a4 ) +#define UlValidate_IMAPIStatus_ChangePassword( a1, a2, a3, a4 ) \ + UlValidateParameters4( IMAPIStatus_ChangePassword, a1, a2, a3, a4 ) +#define CheckParameters_IMAPIStatus_ChangePassword( a1, a2, a3, a4 ) \ + CheckParameters4( IMAPIStatus_ChangePassword, a1, a2, a3, a4 ) + +#define Validate_IMAPIStatus_FlushQueues( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IMAPIStatus_FlushQueues, a1, a2, a3, a4, a5 ) +#define UlValidate_IMAPIStatus_FlushQueues( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IMAPIStatus_FlushQueues, a1, a2, a3, a4, a5 ) +#define CheckParameters_IMAPIStatus_FlushQueues( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IMAPIStatus_FlushQueues, a1, a2, a3, a4, a5 ) + + +/* IStream */ + +#define Validate_IStream_Read( a1, a2, a3, a4 ) \ + ValidateParameters4( IStream__Read, a1, a2, a3, a4 ) +#define UlValidate_IStream_Read( a1, a2, a3, a4 ) \ + UlValidateParameters4( IStream__Read, a1, a2, a3, a4 ) +#define CheckParameters_IStream_Read( a1, a2, a3, a4 ) \ + CheckParameters4( IStream__Read, a1, a2, a3, a4 ) + +#define Validate_IStream_Write( a1, a2, a3, a4 ) \ + ValidateParameters4( IStream__Write, a1, a2, a3, a4 ) +#define UlValidate_IStream_Write( a1, a2, a3, a4 ) \ + UlValidateParameters4( IStream__Write, a1, a2, a3, a4 ) +#define CheckParameters_IStream_Write( a1, a2, a3, a4 ) \ + CheckParameters4( IStream__Write, a1, a2, a3, a4 ) + +#define Validate_IStream_Seek( a1, a2, a3, a4 ) \ + ValidateParameters4( IStream_Seek, a1, a2, a3, a4 ) +#define UlValidate_IStream_Seek( a1, a2, a3, a4 ) \ + UlValidateParameters4( IStream_Seek, a1, a2, a3, a4 ) +#define CheckParameters_IStream_Seek( a1, a2, a3, a4 ) \ + CheckParameters4( IStream_Seek, a1, a2, a3, a4 ) + +#define Validate_IStream_SetSize( a1, a2 ) \ + ValidateParameters2( IStream_SetSize, a1, a2 ) +#define UlValidate_IStream_SetSize( a1, a2 ) \ + UlValidateParameters2( IStream_SetSize, a1, a2 ) +#define CheckParameters_IStream_SetSize( a1, a2 ) \ + CheckParameters2( IStream_SetSize, a1, a2 ) + +#define Validate_IStream_CopyTo( a1, a2, a3, a4, a5 ) \ + ValidateParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 ) +#define UlValidate_IStream_CopyTo( a1, a2, a3, a4, a5 ) \ + UlValidateParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 ) +#define CheckParameters_IStream_CopyTo( a1, a2, a3, a4, a5 ) \ + CheckParameters5( IStream_CopyTo, a1, a2, a3, a4, a5 ) + +#define Validate_IStream_Commit( a1, a2 ) \ + ValidateParameters2( IStream_Commit, a1, a2 ) +#define UlValidate_IStream_Commit( a1, a2 ) \ + UlValidateParameters2( IStream_Commit, a1, a2 ) +#define CheckParameters_IStream_Commit( a1, a2 ) \ + CheckParameters2( IStream_Commit, a1, a2 ) + +#define Validate_IStream_Revert( a1 ) \ + ValidateParameters1( IStream_Revert, a1 ) +#define UlValidate_IStream_Revert( a1 ) \ + UlValidateParameters1( IStream_Revert, a1 ) +#define CheckParameters_IStream_Revert( a1 ) \ + CheckParameters1( IStream_Revert, a1 ) + +#define Validate_IStream_LockRegion( a1, a2, a3, a4 ) \ + ValidateParameters4( IStream_LockRegion, a1, a2, a3, a4 ) +#define UlValidate_IStream_LockRegion( a1, a2, a3, a4 ) \ + UlValidateParameters4( IStream_LockRegion, a1, a2, a3, a4 ) +#define CheckParameters_IStream_LockRegion( a1, a2, a3, a4 ) \ + CheckParameters4( IStream_LockRegion, a1, a2, a3, a4 ) + +#define Validate_IStream_UnlockRegion( a1, a2, a3, a4 ) \ + ValidateParameters4( IStream_UnlockRegion, a1, a2, a3, a4 ) +#define UlValidate_IStream_UnlockRegion( a1, a2, a3, a4 ) \ + UlValidateParameters4( IStream_UnlockRegion, a1, a2, a3, a4 ) +#define CheckParameters_IStream_UnlockRegion( a1, a2, a3, a4 ) \ + CheckParameters4( IStream_UnlockRegion, a1, a2, a3, a4 ) + +#define Validate_IStream_Stat( a1, a2, a3 ) \ + ValidateParameters3( IStream_Stat, a1, a2, a3 ) +#define UlValidate_IStream_Stat( a1, a2, a3 ) \ + UlValidateParameters3( IStream_Stat, a1, a2, a3 ) +#define CheckParameters_IStream_Stat( a1, a2, a3 ) \ + CheckParameters3( IStream_Stat, a1, a2, a3 ) + +#define Validate_IStream_Clone( a1, a2 ) \ + ValidateParameters2( IStream_Clone, a1, a2 ) +#define UlValidate_IStream_Clone( a1, a2 ) \ + UlValidateParameters2( IStream_Clone, a1, a2 ) +#define CheckParameters_IStream_Clone( a1, a2 ) \ + CheckParameters2( IStream_Clone, a1, a2 ) + + +/* IMAPIAdviseSink */ + +#define Validate_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \ + ValidateParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 ) +#define UlValidate_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \ + UlValidateParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 ) +#define CheckParameters_IMAPIAdviseSink_OnNotify( a1, a2, a3 ) \ + CheckParameters3( IMAPIAdviseSink_OnNotify, a1, a2, a3 ) + +#if defined (_AMD64_) || defined(_X86_) || defined (_M_ARM) || defined(_M_ARM64) +STDAPI HrValidateParameters( METHODS eMethod, LPVOID FAR *ppFirstArg ); +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_VALIDATE */ + + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIWin.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIWin.h similarity index 95% rename from com/win32comext/mapi/src/mapi_headers/MAPIWin.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIWin.h index cc9ef1433..cbf9c936a 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIWin.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIWin.h @@ -1,276 +1,276 @@ -/* - * M A P I W I N . H - * - * Definitions used by the MAPI Development Team to aid in - * developing single-source service providers that run on - * both WIN32 and WIN16 platforms. - * There are three sections. - * - * The first section defines how to call something that - * is available by different methods in WIN16 vs. WIN32. - * As such, they are totally new mechanisms. - * - * The second section establishes things that are available - * AS-IS in one environment but we have to define for the - * other environment. - * - * The third section simply defines a few conventions - * (simplifications) for common operations. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -/* - * Routines are included in the first section to manage per-instance - * global variables for DLLs. They assume that all of the DLL's - * per-instance global variables live in a single block of memory. - * Functions are provided to install and retrieve the correct block of - * memory for the current instance. - * - * There are only two functions: - * - * PvGetInstanceGlobals Call this to get the address of the - * per-instance globals structure. - * ScSetinstanceGlobals Call this to install the - * per-instance globals structure. It - * may fail if the number of instances - * exceeds a certain limit. - * - * The caller is free to choose the name, size, and allocation - * method of the per-instance global variables structure. - * - * The WIN32 implementation uses a pointer in the DLL's data - * segment. This assumes that the DLL gets a separate instance - * of the default data segment per calling process. - * - * The WIN16 implementation uses a fixed array of pointers and a - * matching fixed array of keys unique to the calling process. - */ - -/* - * The second section consists largely of Win32 file I/O functions - * that are not supported under Win16. These functions are - * implemented in mapiwin.c, using DOS calls. Most have limitations - * relative to their Win32 counterparts, which are spelled out in - * the comments to the source code. - */ - -#ifndef __MAPIWIN_H__ -#define __MAPIWIN_H__ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#if defined (WIN32) && !defined (_WIN32) -#define _WIN32 -#endif - -#include "mapinls.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -#if defined(_MAC) - -#define MULDIV(x,y,z) MulDiv(x,y,z) - -LPVOID FAR PASCAL PvGetInstanceGlobals(WORD wDataSet); -LONG FAR PASCAL ScSetInstanceGlobals(LPVOID pv, WORD wDataSet); -LONG FAR PASCAL ScSetVerifyInstanceGlobals(LPVOID pv, DWORD dwPid, - WORD wDataSet); -LPVOID FAR PASCAL PvGetVerifyInstanceGlobals(DWORD dwPid, DWORD wDataSet); -LPVOID FAR PASCAL PvSlowGetInstanceGlobals(DWORD dwPid, DWORD wDataSet); -BOOL FAR PASCAL FCleanupInstanceGlobals(WORD, DWORD); - -#elif defined(_WIN64) || defined(_WIN32) - -#define MULDIV(x,y,z) MulDiv(x,y,z) - -extern LPVOID pinstX; -#define PvGetInstanceGlobals() pinstX -#define ScSetInstanceGlobals(_pv) (pinstX = _pv, 0) -#define PvGetVerifyInstanceGlobals(_pid) pinstX -#define ScSetVerifyInstanceGlobals(_pv,_pid) (pinstX = _pv, 0) -#define PvSlowGetInstanceGlobals(_pid) pinstX - -#else -#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" -#endif - -#if (defined(_WIN64) || defined(_WIN32)) && !defined(_MAC) -#define szMAPIDLLSuffix "32" -#elif defined(DOS) -#define szMAPIDLLSuffix "" -#elif defined(_MAC) -#define szMAPIDLLSuffix "M" -#else -#error "Don't know the suffix for DLLs on this platform" -#endif - -/********************************/ -/* Things missing from one */ -/* system-provided environment */ -/* or the other. */ -/********************************/ - -#if !defined(_WIN64) && !defined(_WIN32) -#define ZeroMemory(pb,cb) memset((pb),0,(cb)) -#define FillMemory(pb,cb,b) memset((pb),(b),(cb)) -#define CopyMemory(pbDst,pbSrc,cb) do \ - { \ - size_t _cb = (size_t)(cb); \ - if (_cb) \ - memcpy(pbDst,pbSrc,_cb);\ - } while (FALSE) -#define MoveMemory(pbDst,pbSrc,cb) memmove((pbDst),(pbSrc),(cb)) - -#define UNALIGNED - -#endif - -#if defined(_MAC) - -typedef int INT; -typedef unsigned long ULONG; -typedef short SHORT; -typedef unsigned short USHORT; -typedef double LONGLONG; -typedef double DWORDLONG; -typedef unsigned char UCHAR; -typedef unsigned char FAR* PUCHAR; -typedef int BOOL; - - -/* Synchronization */ -#define InterlockedIncrement(plong) (++(*(plong))) -#define InterlockedDecrement(plong) (--(*(plong))) - -#ifndef CreateMutex -#define CreateMutexA CreateMutex -#define CreateMutexW CreateMutex -#define CreateMutex(pv, bool, sz) (INVALID_HANDLE_VALUE) -#endif - -#define WaitForSingleObject(hObj, dw) ((void)0) -#define ReleaseMutex(hObj) ((BOOL)1) -#define CloseMutexHandle(hObj) TRUE - -#define CRITICAL_SECTION ULONG -#define InitializeCriticalSection(_pcs) ((void)0) -#define DeleteCriticalSection(_pcs) ((void)0) -#define EnterCriticalSection(_pcs) ((void)0) -#define LeaveCriticalSection(_pcs) ((void)0) - -#define MAX_PATH 260 - -#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000 - -#define CREATE_NEW 1 -#define CREATE_ALWAYS 2 -#define OPEN_EXISTING 3 -#define OPEN_ALWAYS 4 -#define TRUNCATE_EXISTING 5 - -#define FILE_ATTRIBUTE_READONLY 0x00000001 -#define FILE_ATTRIBUTE_HIDDEN 0x00000002 -#define FILE_ATTRIBUTE_SYSTEM 0x00000004 -#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 -#define FILE_ATTRIBUTE_ARCHIVE 0x00000020 -#define FILE_ATTRIBUTE_NORMAL 0x00000080 -#define FILE_ATTRIBUTE_TEMPORARY 0x00000100 - -#define FILE_FLAG_WRITE_THROUGH 0x80000000 -#define FILE_FLAG_RANDOM_ACCESS 0x10000000 - -#define TIME_ZONE_ID_UNKNOWN 0 -#define TIME_ZONE_ID_STANDARD 1 -#define TIME_ZONE_ID_DAYLIGHT 2 - - - -DWORD WINAPI GetLastError(void); -DWORD WINAPI GetFileAttributes(LPCSTR lpFileName); -DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh); -BOOL WINAPI GetFileTime(HANDLE hFile, FILETIME FAR *lpftCreation, - FILETIME FAR *lpftLastAccess, FILETIME FAR *lpftLastWrite); -BOOL WINAPI SetFileTime(HANDLE hFile, const FILETIME FAR *lpftCreation, - const FILETIME FAR *lpftLastAccess, - const FILETIME FAR *lpftLastWrite); -DWORD WINAPI SetFilePointer(HANDLE hFile, LONG lDistanceToMove, - LONG FAR *lpDistanceToMoveHigh, DWORD dwMoveMethod); -BOOL WINAPI SetEndOfFile(HANDLE hFile); -BOOL WINAPI CloseHandle(HANDLE hObject); -DWORD WINAPI GetTempPath(DWORD nBufferLength, LPSTR lpBuffer); -UINT WINAPI GetTempFileName32 (LPCSTR lpPathName, LPCSTR lpPrefixString, - UINT uUnique, LPSTR lpTempFileName); -BOOL WINAPI DeleteFile(LPCSTR lpFileName); -BOOL WINAPI RemoveDirectory(LPCSTR lpPathName); -BOOL WINAPI CopyFile(LPCSTR szSrc, LPCSTR szDst, BOOL fFailIfExists); -BOOL WINAPI MoveFile(LPCSTR lpExistingFileName, LPCSTR lpNewFileName); -HANDLE WINAPI FindFirstFile(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData); -BOOL WINAPI FindNextFile(HANDLE hFindFile, LPWIN32_FIND_DATA lpFindFileData); -BOOL WINAPI FindClose(HANDLE hFindFile); -DWORD WINAPI GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, - LPSTR lpBuffer, LPSTR *lpFilePart); -void WINAPI Sleep(DWORD dwMilliseconds); -LONG WINAPI CompareFileTime(const FILETIME FAR *, const FILETIME FAR *); -BOOL WINAPI LocalFileTimeToFileTime(const FILETIME FAR *, FILETIME FAR *); -BOOL WINAPI FileTimeToLocalFileTime(const FILETIME FAR *, FILETIME FAR *); -BOOL WINAPI FileTimeToSystemTime(const FILETIME FAR *, SYSTEMTIME FAR *); -BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME FAR *, FILETIME FAR *); -void WINAPI GetSystemTime(SYSTEMTIME FAR *); -void WINAPI GetLocalTime(SYSTEMTIME FAR *); -BOOL WINAPI FileTimeToDosDateTime(const FILETIME FAR * lpFileTime, - WORD FAR *lpFatDate, WORD FAR *lpFatTime); -BOOL WINAPI DosDateTimeToFileTime(WORD wFatDate, WORD wFatTime, - FILETIME FAR * lpFileTime); -DWORD WINAPI GetTimeZoneInformation( - LPTIME_ZONE_INFORMATION lpTimeZoneInformation); -BOOL WINAPI SetTimeZoneInformation( - const TIME_ZONE_INFORMATION FAR *lpTimeZoneInformation); - -DWORD WINAPI GetCurrentProcessId(void); -long WINAPI MulDiv32(long, long, long); - -#else /* _MAC */ - -/* Remaps GetTempFileName32() to the real 32bit version */ - -#define GetTempFileName32(_szPath,_szPfx,_n,_lpbuf) GetTempFileName(_szPath,_szPfx,_n,_lpbuf) - -#define CloseMutexHandle CloseHandle - -#endif /* _MAC */ - - -#ifdef _MAC -#define CRITICAL_SECTION ULONG -#define InitializeCriticalSection(_pcs) ((void)0) -#define DeleteCriticalSection(_pcs) ((void)0) -#define EnterCriticalSection(_pcs) ((void)0) -#define LeaveCriticalSection(_pcs) ((void)0) -#endif - -/********************************/ -/* Our private conventions */ -/* (common to WIN32/WIN64) */ -/********************************/ - -#define Cbtszsize(_a) ((lstrlen(_a)+1)*sizeof(TCHAR)) -#define CbtszsizeA(_a) ((lstrlenA(_a) + 1)) -#define CbtszsizeW(_a) ((lstrlenW(_a) + 1) * sizeof(WCHAR)) -#define HexCchOf(_s) (sizeof(_s)*2+1) -#define HexSizeOf(_s) (HexCchOf(_s)*sizeof(TCHAR)) - -BOOL WINAPI IsBadBoundedStringPtr(const void FAR* lpsz, UINT cchMax); - -#ifdef __cplusplus -} -#endif - -#endif /* __MAPIWIN_H__ */ - - +/* + * M A P I W I N . H + * + * Definitions used by the MAPI Development Team to aid in + * developing single-source service providers that run on + * both WIN32 and WIN16 platforms. + * There are three sections. + * + * The first section defines how to call something that + * is available by different methods in WIN16 vs. WIN32. + * As such, they are totally new mechanisms. + * + * The second section establishes things that are available + * AS-IS in one environment but we have to define for the + * other environment. + * + * The third section simply defines a few conventions + * (simplifications) for common operations. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +/* + * Routines are included in the first section to manage per-instance + * global variables for DLLs. They assume that all of the DLL's + * per-instance global variables live in a single block of memory. + * Functions are provided to install and retrieve the correct block of + * memory for the current instance. + * + * There are only two functions: + * + * PvGetInstanceGlobals Call this to get the address of the + * per-instance globals structure. + * ScSetinstanceGlobals Call this to install the + * per-instance globals structure. It + * may fail if the number of instances + * exceeds a certain limit. + * + * The caller is free to choose the name, size, and allocation + * method of the per-instance global variables structure. + * + * The WIN32 implementation uses a pointer in the DLL's data + * segment. This assumes that the DLL gets a separate instance + * of the default data segment per calling process. + * + * The WIN16 implementation uses a fixed array of pointers and a + * matching fixed array of keys unique to the calling process. + */ + +/* + * The second section consists largely of Win32 file I/O functions + * that are not supported under Win16. These functions are + * implemented in mapiwin.c, using DOS calls. Most have limitations + * relative to their Win32 counterparts, which are spelled out in + * the comments to the source code. + */ + +#ifndef __MAPIWIN_H__ +#define __MAPIWIN_H__ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#if defined (WIN32) && !defined (_WIN32) +#define _WIN32 +#endif + +#include "mapinls.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +#if defined(_MAC) + +#define MULDIV(x,y,z) MulDiv(x,y,z) + +LPVOID FAR PASCAL PvGetInstanceGlobals(WORD wDataSet); +LONG FAR PASCAL ScSetInstanceGlobals(LPVOID pv, WORD wDataSet); +LONG FAR PASCAL ScSetVerifyInstanceGlobals(LPVOID pv, DWORD dwPid, + WORD wDataSet); +LPVOID FAR PASCAL PvGetVerifyInstanceGlobals(DWORD dwPid, DWORD wDataSet); +LPVOID FAR PASCAL PvSlowGetInstanceGlobals(DWORD dwPid, DWORD wDataSet); +BOOL FAR PASCAL FCleanupInstanceGlobals(WORD, DWORD); + +#elif defined(_WIN64) || defined(_WIN32) || defined(_M_ARM) + +#define MULDIV(x,y,z) MulDiv(x,y,z) + +extern LPVOID pinstX; +#define PvGetInstanceGlobals() pinstX +#define ScSetInstanceGlobals(_pv) (pinstX = _pv, 0) +#define PvGetVerifyInstanceGlobals(_pid) pinstX +#define ScSetVerifyInstanceGlobals(_pv,_pid) (pinstX = _pv, 0) +#define PvSlowGetInstanceGlobals(_pid) pinstX + +#else +#error "Unknown Platform: MAPI is currently supported on Win32 and Win64" +#endif + +#if (defined(_WIN64) || defined(_WIN32)) && !defined(_MAC) || defined(_M_ARM) +#define szMAPIDLLSuffix "32" +#elif defined(DOS) +#define szMAPIDLLSuffix "" +#elif defined(_MAC) +#define szMAPIDLLSuffix "M" +#else +#error "Don't know the suffix for DLLs on this platform" +#endif + +/********************************/ +/* Things missing from one */ +/* system-provided environment */ +/* or the other. */ +/********************************/ + +#if !defined(_WIN64) && !defined(_WIN32) && !defined(_M_ARM) +#define ZeroMemory(pb,cb) memset((pb),0,(cb)) +#define FillMemory(pb,cb,b) memset((pb),(b),(cb)) +#define CopyMemory(pbDst,pbSrc,cb) do \ + { \ + size_t _cb = (size_t)(cb); \ + if (_cb) \ + memcpy(pbDst,pbSrc,_cb);\ + } while (FALSE) +#define MoveMemory(pbDst,pbSrc,cb) memmove((pbDst),(pbSrc),(cb)) + +#define UNALIGNED + +#endif + +#if defined(_MAC) + +typedef int INT; +typedef unsigned long ULONG; +typedef short SHORT; +typedef unsigned short USHORT; +typedef double LONGLONG; +typedef double DWORDLONG; +typedef unsigned char UCHAR; +typedef unsigned char FAR* PUCHAR; +typedef int BOOL; + + +/* Synchronization */ +#define InterlockedIncrement(plong) (++(*(plong))) +#define InterlockedDecrement(plong) (--(*(plong))) + +#ifndef CreateMutex +#define CreateMutexA CreateMutex +#define CreateMutexW CreateMutex +#define CreateMutex(pv, bool, sz) (INVALID_HANDLE_VALUE) +#endif + +#define WaitForSingleObject(hObj, dw) ((void)0) +#define ReleaseMutex(hObj) ((BOOL)1) +#define CloseMutexHandle(hObj) TRUE + +#define CRITICAL_SECTION ULONG +#define InitializeCriticalSection(_pcs) ((void)0) +#define DeleteCriticalSection(_pcs) ((void)0) +#define EnterCriticalSection(_pcs) ((void)0) +#define LeaveCriticalSection(_pcs) ((void)0) + +#define MAX_PATH 260 + +#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000 + +#define CREATE_NEW 1 +#define CREATE_ALWAYS 2 +#define OPEN_EXISTING 3 +#define OPEN_ALWAYS 4 +#define TRUNCATE_EXISTING 5 + +#define FILE_ATTRIBUTE_READONLY 0x00000001 +#define FILE_ATTRIBUTE_HIDDEN 0x00000002 +#define FILE_ATTRIBUTE_SYSTEM 0x00000004 +#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 +#define FILE_ATTRIBUTE_ARCHIVE 0x00000020 +#define FILE_ATTRIBUTE_NORMAL 0x00000080 +#define FILE_ATTRIBUTE_TEMPORARY 0x00000100 + +#define FILE_FLAG_WRITE_THROUGH 0x80000000 +#define FILE_FLAG_RANDOM_ACCESS 0x10000000 + +#define TIME_ZONE_ID_UNKNOWN 0 +#define TIME_ZONE_ID_STANDARD 1 +#define TIME_ZONE_ID_DAYLIGHT 2 + + + +DWORD WINAPI GetLastError(void); +DWORD WINAPI GetFileAttributes(LPCSTR lpFileName); +DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh); +BOOL WINAPI GetFileTime(HANDLE hFile, FILETIME FAR *lpftCreation, + FILETIME FAR *lpftLastAccess, FILETIME FAR *lpftLastWrite); +BOOL WINAPI SetFileTime(HANDLE hFile, const FILETIME FAR *lpftCreation, + const FILETIME FAR *lpftLastAccess, + const FILETIME FAR *lpftLastWrite); +DWORD WINAPI SetFilePointer(HANDLE hFile, LONG lDistanceToMove, + LONG FAR *lpDistanceToMoveHigh, DWORD dwMoveMethod); +BOOL WINAPI SetEndOfFile(HANDLE hFile); +BOOL WINAPI CloseHandle(HANDLE hObject); +DWORD WINAPI GetTempPath(DWORD nBufferLength, LPSTR lpBuffer); +UINT WINAPI GetTempFileName32 (LPCSTR lpPathName, LPCSTR lpPrefixString, + UINT uUnique, LPSTR lpTempFileName); +BOOL WINAPI DeleteFile(LPCSTR lpFileName); +BOOL WINAPI RemoveDirectory(LPCSTR lpPathName); +BOOL WINAPI CopyFile(LPCSTR szSrc, LPCSTR szDst, BOOL fFailIfExists); +BOOL WINAPI MoveFile(LPCSTR lpExistingFileName, LPCSTR lpNewFileName); +HANDLE WINAPI FindFirstFile(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData); +BOOL WINAPI FindNextFile(HANDLE hFindFile, LPWIN32_FIND_DATA lpFindFileData); +BOOL WINAPI FindClose(HANDLE hFindFile); +DWORD WINAPI GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, + LPSTR lpBuffer, LPSTR *lpFilePart); +void WINAPI Sleep(DWORD dwMilliseconds); +LONG WINAPI CompareFileTime(const FILETIME FAR *, const FILETIME FAR *); +BOOL WINAPI LocalFileTimeToFileTime(const FILETIME FAR *, FILETIME FAR *); +BOOL WINAPI FileTimeToLocalFileTime(const FILETIME FAR *, FILETIME FAR *); +BOOL WINAPI FileTimeToSystemTime(const FILETIME FAR *, SYSTEMTIME FAR *); +BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME FAR *, FILETIME FAR *); +void WINAPI GetSystemTime(SYSTEMTIME FAR *); +void WINAPI GetLocalTime(SYSTEMTIME FAR *); +BOOL WINAPI FileTimeToDosDateTime(const FILETIME FAR * lpFileTime, + WORD FAR *lpFatDate, WORD FAR *lpFatTime); +BOOL WINAPI DosDateTimeToFileTime(WORD wFatDate, WORD wFatTime, + FILETIME FAR * lpFileTime); +DWORD WINAPI GetTimeZoneInformation( + LPTIME_ZONE_INFORMATION lpTimeZoneInformation); +BOOL WINAPI SetTimeZoneInformation( + const TIME_ZONE_INFORMATION FAR *lpTimeZoneInformation); + +DWORD WINAPI GetCurrentProcessId(void); +long WINAPI MulDiv32(long, long, long); + +#else /* _MAC */ + +/* Remaps GetTempFileName32() to the real 32bit version */ + +#define GetTempFileName32(_szPath,_szPfx,_n,_lpbuf) GetTempFileName(_szPath,_szPfx,_n,_lpbuf) + +#define CloseMutexHandle CloseHandle + +#endif /* _MAC */ + + +#ifdef _MAC +#define CRITICAL_SECTION ULONG +#define InitializeCriticalSection(_pcs) ((void)0) +#define DeleteCriticalSection(_pcs) ((void)0) +#define EnterCriticalSection(_pcs) ((void)0) +#define LeaveCriticalSection(_pcs) ((void)0) +#endif + +/********************************/ +/* Our private conventions */ +/* (common to WIN32/WIN64) */ +/********************************/ + +#define Cbtszsize(_a) ((lstrlen(_a)+1)*sizeof(TCHAR)) +#define CbtszsizeA(_a) ((lstrlenA(_a) + 1)) +#define CbtszsizeW(_a) ((lstrlenW(_a) + 1) * sizeof(WCHAR)) +#define HexCchOf(_s) (sizeof(_s)*2+1) +#define HexSizeOf(_s) (HexCchOf(_s)*sizeof(TCHAR)) + +BOOL WINAPI IsBadBoundedStringPtr(const void FAR* lpsz, UINT cchMax); + +#ifdef __cplusplus +} +#endif + +#endif /* __MAPIWIN_H__ */ + + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIWz.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIWz.h similarity index 96% rename from com/win32comext/mapi/src/mapi_headers/MAPIWz.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIWz.h index 407653c42..0ebe69fcb 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIWz.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIWz.h @@ -1,73 +1,73 @@ -/* - * M A P I W Z . H - * - * Definitions for the Profile Wizard. Includes all prototypes - * and constants required by the provider-wizard code consumers. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef _MAPIWZ_H -#define _MAPIWZ_H - -#if _MSC_VER > 1000 -#pragma once -#endif - -#define WIZ_QUERYNUMPAGES (WM_USER +10) -#define WIZ_NEXT (WM_USER +11) -#define WIZ_PREV (WM_USER +12) -/* - * NOTE: Provider-Wizards should not use ids ranging between - * (WM_USER + 1) and (WM_USER +20) as these have been reserved for - * future releases. - */ - -/* Flags for LaunchWizard API */ - -#define MAPI_PW_FIRST_PROFILE 0x00000001 -#define MAPI_PW_LAUNCHED_BY_CONFIG 0x00000002 -#define MAPI_PW_ADD_SERVICE_ONLY 0x00000004 -#define MAPI_PW_PROVIDER_UI_ONLY 0x00000008 -#define MAPI_PW_HIDE_SERVICES_LIST 0x00000010 - -/* - * Provider should set this property to TRUE if it does not - * want the Profile Wizard to display the PST setup page. - */ -#define PR_WIZARD_NO_PST_PAGE PROP_TAG(PT_BOOLEAN, 0x6700) -#define PR_WIZARD_NO_PAB_PAGE PROP_TAG(PT_BOOLEAN, 0x6701) - -typedef HRESULT (STDAPICALLTYPE LAUNCHWIZARDENTRY) -( - HWND hParentWnd, - ULONG ulFlags, - LPCTSTR FAR * lppszServiceNameToAdd, - ULONG cbBufferMax, - LPTSTR lpszNewProfileName -); -typedef LAUNCHWIZARDENTRY FAR * LPLAUNCHWIZARDENTRY; - -typedef BOOL (STDAPICALLTYPE SERVICEWIZARDDLGPROC) -( - HWND hDlg, - UINT wMsgID, - WPARAM wParam, - LPARAM lParam -); -typedef SERVICEWIZARDDLGPROC FAR * LPSERVICEWIZARDDLGPROC; - -typedef ULONG (STDAPICALLTYPE WIZARDENTRY) -( - HINSTANCE hProviderDLLInstance, - LPTSTR FAR * lppcsResourceName, - DLGPROC FAR * lppDlgProc, - LPMAPIPROP lpMapiProp, - LPVOID lpMapiSupportObject -); -typedef WIZARDENTRY FAR * LPWIZARDENTRY; - -#define LAUNCHWIZARDENTRYNAME "LAUNCHWIZARD" - -#endif /* _MAPIWZ_H */ - +/* + * M A P I W Z . H + * + * Definitions for the Profile Wizard. Includes all prototypes + * and constants required by the provider-wizard code consumers. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef _MAPIWZ_H +#define _MAPIWZ_H + +#if _MSC_VER > 1000 +#pragma once +#endif + +#define WIZ_QUERYNUMPAGES (WM_USER +10) +#define WIZ_NEXT (WM_USER +11) +#define WIZ_PREV (WM_USER +12) +/* + * NOTE: Provider-Wizards should not use ids ranging between + * (WM_USER + 1) and (WM_USER +20) as these have been reserved for + * future releases. + */ + +/* Flags for LaunchWizard API */ + +#define MAPI_PW_FIRST_PROFILE 0x00000001 +#define MAPI_PW_LAUNCHED_BY_CONFIG 0x00000002 +#define MAPI_PW_ADD_SERVICE_ONLY 0x00000004 +#define MAPI_PW_PROVIDER_UI_ONLY 0x00000008 +#define MAPI_PW_HIDE_SERVICES_LIST 0x00000010 + +/* + * Provider should set this property to TRUE if it does not + * want the Profile Wizard to display the PST setup page. + */ +#define PR_WIZARD_NO_PST_PAGE PROP_TAG(PT_BOOLEAN, 0x6700) +#define PR_WIZARD_NO_PAB_PAGE PROP_TAG(PT_BOOLEAN, 0x6701) + +typedef HRESULT (STDAPICALLTYPE LAUNCHWIZARDENTRY) +( + HWND hParentWnd, + ULONG ulFlags, + LPCTSTR FAR * lppszServiceNameToAdd, + ULONG cbBufferMax, + LPTSTR lpszNewProfileName +); +typedef LAUNCHWIZARDENTRY FAR * LPLAUNCHWIZARDENTRY; + +typedef BOOL (STDAPICALLTYPE SERVICEWIZARDDLGPROC) +( + HWND hDlg, + UINT wMsgID, + WPARAM wParam, + LPARAM lParam +); +typedef SERVICEWIZARDDLGPROC FAR * LPSERVICEWIZARDDLGPROC; + +typedef ULONG (STDAPICALLTYPE WIZARDENTRY) +( + HINSTANCE hProviderDLLInstance, + LPTSTR FAR * lppcsResourceName, + DLGPROC FAR * lppDlgProc, + LPMAPIPROP lpMapiProp, + LPVOID lpMapiSupportObject +); +typedef WIZARDENTRY FAR * LPWIZARDENTRY; + +#define LAUNCHWIZARDENTRYNAME "LAUNCHWIZARD" + +#endif /* _MAPIWZ_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MAPIX.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIX.h similarity index 97% rename from com/win32comext/mapi/src/mapi_headers/MAPIX.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIX.h index 0e1645503..6fc2d5802 100644 --- a/com/win32comext/mapi/src/mapi_headers/MAPIX.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MAPIX.h @@ -1,546 +1,546 @@ -/* - * M A P I X . H - * - * Definitions of objects/flags, etc used by Extended MAPI. - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef MAPIX_H -#define MAPIX_H - -#if _MSC_VER > 1000 -#pragma once -#endif - -/* Include common MAPI header files if they haven't been already. */ -#ifndef MAPIDEFS_H -#include -#endif -#ifndef MAPICODE_H -#include -#endif -#ifndef MAPIGUID_H -#include -#endif -#ifndef MAPITAGS_H -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef BEGIN_INTERFACE -#define BEGIN_INTERFACE -#endif - -/* Forward interface declarations */ - -DECLARE_MAPI_INTERFACE_PTR(IProfAdmin, LPPROFADMIN); -DECLARE_MAPI_INTERFACE_PTR(IMsgServiceAdmin, LPSERVICEADMIN); -DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION); - -/* ------------------------------------------------------ */ -/* shared with simple mapi */ - -typedef ULONG FLAGS; - -/* MAPILogon() flags. */ - -#define MAPI_LOGON_UI 0x00000001 /* Display logon UI */ -#define MAPI_NEW_SESSION 0x00000002 /* Don't use shared session */ -#define MAPI_ALLOW_OTHERS 0x00000008 /* Make this a shared session */ -#define MAPI_EXPLICIT_PROFILE 0x00000010 /* Don't use default profile */ -#define MAPI_EXTENDED 0x00000020 /* Extended MAPI Logon */ -#define MAPI_FORCE_DOWNLOAD 0x00001000 /* Get new mail before return */ -#define MAPI_SERVICE_UI_ALWAYS 0x00002000 /* Do logon UI in all providers */ -#define MAPI_NO_MAIL 0x00008000 /* Do not activate transports */ -/* #define MAPI_NT_SERVICE 0x00010000 Allow logon from an NT service */ -#ifndef MAPI_PASSWORD_UI -#define MAPI_PASSWORD_UI 0x00020000 /* Display password UI only */ -#endif -#define MAPI_TIMEOUT_SHORT 0x00100000 /* Minimal wait for logon resources */ - -#define MAPI_SIMPLE_DEFAULT (MAPI_LOGON_UI | MAPI_FORCE_DOWNLOAD | MAPI_ALLOW_OTHERS) -#define MAPI_SIMPLE_EXPLICIT (MAPI_NEW_SESSION | MAPI_FORCE_DOWNLOAD | MAPI_EXPLICIT_PROFILE) - -/* Structure passed to MAPIInitialize(), and its ulFlags values */ - -typedef struct -{ - ULONG ulVersion; - ULONG ulFlags; -} MAPIINIT_0, FAR *LPMAPIINIT_0; - -typedef MAPIINIT_0 MAPIINIT; -typedef MAPIINIT FAR *LPMAPIINIT; - -#define MAPI_INIT_VERSION 0 - -#define MAPI_MULTITHREAD_NOTIFICATIONS 0x00000001 -/* Reserved for MAPI 0x40000000 */ -/* #define MAPI_NT_SERVICE 0x00010000 Use from NT service */ - -/* MAPI base functions */ - -typedef HRESULT (STDAPICALLTYPE MAPIINITIALIZE)( - LPVOID lpMapiInit -); -typedef MAPIINITIALIZE FAR *LPMAPIINITIALIZE; - -typedef void (STDAPICALLTYPE MAPIUNINITIALIZE)(void); -typedef MAPIUNINITIALIZE FAR *LPMAPIUNINITIALIZE; - -MAPIINITIALIZE MAPIInitialize; -MAPIUNINITIALIZE MAPIUninitialize; - - -/* Extended MAPI Logon function */ - - -typedef HRESULT (STDMETHODCALLTYPE MAPILOGONEX)( - ULONG_PTR ulUIParam, - /*OFFICEDEV add _opt*/ __in_opt LPTSTR lpszProfileName, - /*OFFICEDEV add _opt*/ __in_opt LPTSTR lpszPassword, - ULONG ulFlags, /* ulFlags takes all that SimpleMAPI does + MAPI_UNICODE */ - LPMAPISESSION FAR * lppSession -); -typedef MAPILOGONEX FAR *LPMAPILOGONEX; - -MAPILOGONEX MAPILogonEx; - - -typedef SCODE (STDMETHODCALLTYPE MAPIALLOCATEBUFFER)( - ULONG cbSize, - LPVOID FAR * lppBuffer -); - -typedef SCODE (STDMETHODCALLTYPE MAPIALLOCATEMORE)( - ULONG cbSize, - LPVOID lpObject, - LPVOID FAR * lppBuffer -); - -typedef ULONG (STDAPICALLTYPE MAPIFREEBUFFER)( - LPVOID lpBuffer -); - -typedef MAPIALLOCATEBUFFER FAR *LPMAPIALLOCATEBUFFER; -typedef MAPIALLOCATEMORE FAR *LPMAPIALLOCATEMORE; -typedef MAPIFREEBUFFER FAR *LPMAPIFREEBUFFER; - -MAPIALLOCATEBUFFER MAPIAllocateBuffer; -MAPIALLOCATEMORE MAPIAllocateMore; -MAPIFREEBUFFER MAPIFreeBuffer; - -typedef HRESULT (STDMETHODCALLTYPE MAPIADMINPROFILES)( - ULONG ulFlags, - LPPROFADMIN FAR *lppProfAdmin -); - -typedef MAPIADMINPROFILES FAR *LPMAPIADMINPROFILES; - -MAPIADMINPROFILES MAPIAdminProfiles; - -/* IMAPISession Interface -------------------------------------------------- */ - -/* Flags for OpenEntry and others */ - -/*#define MAPI_MODIFY ((ULONG) 0x00000001) */ - -/* Flags for Logoff */ - -#define MAPI_LOGOFF_SHARED 0x00000001 /* Close all shared sessions */ -#define MAPI_LOGOFF_UI 0x00000002 /* It's OK to present UI */ - -/* Flags for SetDefaultStore. They are mutually exclusive. */ - -#define MAPI_DEFAULT_STORE 0x00000001 /* for incoming messages */ -#define MAPI_SIMPLE_STORE_TEMPORARY 0x00000002 /* for simple MAPI and CMC */ -#define MAPI_SIMPLE_STORE_PERMANENT 0x00000003 /* for simple MAPI and CMC */ -#define MAPI_PRIMARY_STORE 0x00000004 /* Used by some clients */ -#define MAPI_SECONDARY_STORE 0x00000005 /* Used by some clients */ - -/* Flags for ShowForm. */ - -#define MAPI_POST_MESSAGE 0x00000001 /* Selects post/send semantics */ -#define MAPI_NEW_MESSAGE 0x00000002 /* Governs copying during submission */ - -/* MessageOptions */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -/* QueryDefaultMessageOpt */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -#define MAPI_IMAPISESSION_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetMsgStoresTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(OpenMsgStore) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPMDB FAR * lppMDB) IPURE; \ - MAPIMETHOD(OpenAddressBook) \ - (THIS_ ULONG_PTR ulUIParam, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPADRBOOK FAR * lppAdrBook) IPURE; \ - MAPIMETHOD(OpenProfileSection) \ - (THIS_ LPMAPIUID lpUID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPPROFSECT FAR * lppProfSect) IPURE; \ - MAPIMETHOD(GetStatusTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(OpenEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(CompareEntryIDs) \ - (THIS_ ULONG cbEntryID1, \ - LPENTRYID lpEntryID1, \ - ULONG cbEntryID2, \ - LPENTRYID lpEntryID2, \ - ULONG ulFlags, \ - ULONG FAR * lpulResult) IPURE; \ - MAPIMETHOD(Advise) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulEventMask, \ - LPMAPIADVISESINK lpAdviseSink, \ - ULONG_PTR FAR * lpulConnection) IPURE; \ - MAPIMETHOD(Unadvise) \ - (THIS_ ULONG_PTR ulConnection) IPURE; \ - MAPIMETHOD(MessageOptions) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - LPTSTR lpszAdrType, \ - LPMESSAGE lpMessage) IPURE; \ - MAPIMETHOD(QueryDefaultMessageOpt) \ - (THIS_ LPTSTR lpszAdrType, \ - ULONG ulFlags, \ - ULONG FAR * lpcValues, \ - LPSPropValue FAR * lppOptions) IPURE; \ - MAPIMETHOD(EnumAdrTypes) \ - (THIS_ ULONG ulFlags, \ - ULONG FAR * lpcAdrTypes, \ - LPTSTR FAR * FAR * lpppszAdrTypes) IPURE; \ - MAPIMETHOD(QueryIdentity) \ - (THIS_ ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(Logoff) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - ULONG ulReserved) IPURE; \ - MAPIMETHOD(SetDefaultStore) \ - (THIS_ ULONG ulFlags, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID) IPURE; \ - MAPIMETHOD(AdminServices) \ - (THIS_ ULONG ulFlags, \ - LPSERVICEADMIN FAR * lppServiceAdmin) IPURE; \ - MAPIMETHOD(ShowForm) \ - (THIS_ ULONG_PTR ulUIParam, \ - LPMDB lpMsgStore, \ - LPMAPIFOLDER lpParentFolder, \ - LPCIID lpInterface, \ - ULONG_PTR ulMessageToken, \ - LPMESSAGE lpMessageSent, \ - ULONG ulFlags, \ - ULONG ulMessageStatus, \ - ULONG ulMessageFlags, \ - ULONG ulAccess, \ - LPSTR lpszMessageClass) IPURE; \ - MAPIMETHOD(PrepareForm) \ - (THIS_ LPCIID lpInterface, \ - LPMESSAGE lpMessage, \ - ULONG_PTR FAR * lpulMessageToken) IPURE; \ - - -#undef INTERFACE -#define INTERFACE IMAPISession -DECLARE_MAPI_INTERFACE_(IMAPISession, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPISESSION_METHODS(PURE) -}; - -/*DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION);*/ - -/* IAddrBook Interface ----------------------------------------------------- */ - -/* CreateOneOff */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ -/****** MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) */ - -/* RecipOptions */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -/* QueryDefaultRecipOpt */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -/* GetSearchPath */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - - -#define MAPI_IADDRBOOK_METHODS(IPURE) \ - MAPIMETHOD(OpenEntry) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - ULONG FAR * lpulObjType, \ - LPUNKNOWN FAR * lppUnk) IPURE; \ - MAPIMETHOD(CompareEntryIDs) \ - (THIS_ ULONG cbEntryID1, \ - LPENTRYID lpEntryID1, \ - ULONG cbEntryID2, \ - LPENTRYID lpEntryID2, \ - ULONG ulFlags, \ - ULONG FAR * lpulResult) IPURE; \ - MAPIMETHOD(Advise) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG ulEventMask, \ - LPMAPIADVISESINK lpAdviseSink, \ - ULONG_PTR FAR * lpulConnection) IPURE; \ - MAPIMETHOD(Unadvise) \ - (THIS_ ULONG_PTR ulConnection) IPURE; \ - MAPIMETHOD(CreateOneOff) \ - (THIS_ LPTSTR lpszName, \ - LPTSTR lpszAdrType, \ - LPTSTR lpszAddress, \ - ULONG ulFlags, \ - ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(NewEntry) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - ULONG cbEIDContainer, \ - LPENTRYID lpEIDContainer, \ - ULONG cbEIDNewEntryTpl, \ - LPENTRYID lpEIDNewEntryTpl, \ - ULONG FAR * lpcbEIDNewEntry, \ - LPENTRYID FAR * lppEIDNewEntry) IPURE; \ - MAPIMETHOD(ResolveName) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - LPTSTR lpszNewEntryTitle, \ - LPADRLIST lpAdrList) IPURE; \ - MAPIMETHOD(Address) \ - (THIS_ ULONG_PTR FAR * lpulUIParam, \ - LPADRPARM lpAdrParms, \ - LPADRLIST FAR * lppAdrList) IPURE; \ - MAPIMETHOD(Details) \ - (THIS_ ULONG_PTR FAR * lpulUIParam, \ - LPFNDISMISS lpfnDismiss, \ - LPVOID lpvDismissContext, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - LPFNBUTTON lpfButtonCallback, \ - LPVOID lpvButtonContext, \ - LPTSTR lpszButtonText, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(RecipOptions) \ - (THIS_ ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - LPADRENTRY lpRecip) IPURE; \ - MAPIMETHOD(QueryDefaultRecipOpt) \ - (THIS_ LPTSTR lpszAdrType, \ - ULONG ulFlags, \ - ULONG FAR * lpcValues, \ - LPSPropValue FAR * lppOptions) IPURE; \ - MAPIMETHOD(GetPAB) \ - (THIS_ ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(SetPAB) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID) IPURE; \ - MAPIMETHOD(GetDefaultDir) \ - (THIS_ ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(SetDefaultDir) \ - (THIS_ ULONG cbEntryID, \ - LPENTRYID lpEntryID) IPURE; \ - MAPIMETHOD(GetSearchPath) \ - (THIS_ ULONG ulFlags, \ - LPSRowSet FAR * lppSearchPath) IPURE; \ - MAPIMETHOD(SetSearchPath) \ - (THIS_ ULONG ulFlags, \ - LPSRowSet lpSearchPath) IPURE; \ - MAPIMETHOD(PrepareRecips) \ - (THIS_ ULONG ulFlags, \ - LPSPropTagArray lpPropTagArray, \ - LPADRLIST lpRecipList) IPURE; \ - -#undef INTERFACE -#define INTERFACE IAddrBook -DECLARE_MAPI_INTERFACE_(IAddrBook, IMAPIProp) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMAPIPROP_METHODS(PURE) - MAPI_IADDRBOOK_METHODS(PURE) -}; - -DECLARE_MAPI_INTERFACE_PTR(IAddrBook, LPADRBOOK); - -/* IProfAdmin Interface ---------------------------------------------------- */ - -/* Flags for CreateProfile */ -#define MAPI_DEFAULT_SERVICES 0x00000001 - -/* GetProfileTable */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -#define MAPI_IPROFADMIN_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetProfileTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(CreateProfile) \ - (THIS_ LPTSTR lpszProfileName, \ - LPTSTR lpszPassword, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(DeleteProfile) \ - (THIS_ LPTSTR lpszProfileName, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(ChangeProfilePassword) \ - (THIS_ LPTSTR lpszProfileName, \ - LPTSTR lpszOldPassword, \ - LPTSTR lpszNewPassword, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(CopyProfile) \ - (THIS_ LPTSTR lpszOldProfileName, \ - LPTSTR lpszOldPassword, \ - LPTSTR lpszNewProfileName, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(RenameProfile) \ - (THIS_ LPTSTR lpszOldProfileName, \ - LPTSTR lpszOldPassword, \ - LPTSTR lpszNewProfileName, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(SetDefaultProfile) \ - (THIS_ LPTSTR lpszProfileName, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(AdminServices) \ - (THIS_ LPTSTR lpszProfileName, \ - LPTSTR lpszPassword, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - LPSERVICEADMIN FAR * lppServiceAdmin) IPURE; \ - - -#undef INTERFACE -#define INTERFACE IProfAdmin -DECLARE_MAPI_INTERFACE_(IProfAdmin, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IPROFADMIN_METHODS(PURE) -}; - -/* IMsgServiceAdmin Interface ---------------------------------------------- */ - -/* Values for PR_RESOURCE_FLAGS in message service table */ - -#define SERVICE_DEFAULT_STORE 0x00000001 -#define SERVICE_SINGLE_COPY 0x00000002 -#define SERVICE_CREATE_WITH_STORE 0x00000004 -#define SERVICE_PRIMARY_IDENTITY 0x00000008 -#define SERVICE_NO_PRIMARY_IDENTITY 0x00000020 - -/* GetMsgServiceTable */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -/* GetProviderTable */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) */ - -#define MAPI_IMSGSERVICEADMIN_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetMsgServiceTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(CreateMsgService) \ - (THIS_ LPTSTR lpszService, \ - LPTSTR lpszDisplayName, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(DeleteMsgService) \ - (THIS_ LPMAPIUID lpUID) IPURE; \ - MAPIMETHOD(CopyMsgService) \ - (THIS_ LPMAPIUID lpUID, \ - LPTSTR lpszDisplayName, \ - LPCIID lpInterfaceToCopy, \ - LPCIID lpInterfaceDst, \ - LPVOID lpObjectDst, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(RenameMsgService) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG ulFlags, \ - LPTSTR lpszDisplayName) IPURE; \ - MAPIMETHOD(ConfigureMsgService) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG_PTR ulUIParam, \ - ULONG ulFlags, \ - ULONG cValues, \ - LPSPropValue lpProps) IPURE; \ - MAPIMETHOD(OpenProfileSection) \ - (THIS_ LPMAPIUID lpUID, \ - LPCIID lpInterface, \ - ULONG ulFlags, \ - LPPROFSECT FAR * lppProfSect) IPURE; \ - MAPIMETHOD(MsgServiceTransportOrder) \ - (THIS_ ULONG cUID, \ - LPMAPIUID lpUIDList, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(AdminProviders) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG ulFlags, \ - LPPROVIDERADMIN FAR * lppProviderAdmin) IPURE; \ - MAPIMETHOD(SetPrimaryIdentity) \ - (THIS_ LPMAPIUID lpUID, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetProviderTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - - -#undef INTERFACE -#define INTERFACE IMsgServiceAdmin -DECLARE_MAPI_INTERFACE_(IMsgServiceAdmin, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - MAPI_IMSGSERVICEADMIN_METHODS(PURE) -}; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* MAPIX_H */ - +/* + * M A P I X . H + * + * Definitions of objects/flags, etc used by Extended MAPI. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPIX_H +#define MAPIX_H + +#if _MSC_VER > 1000 +#pragma once +#endif + +/* Include common MAPI header files if they haven't been already. */ +#ifndef MAPIDEFS_H +#include +#endif +#ifndef MAPICODE_H +#include +#endif +#ifndef MAPIGUID_H +#include +#endif +#ifndef MAPITAGS_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +/* Forward interface declarations */ + +DECLARE_MAPI_INTERFACE_PTR(IProfAdmin, LPPROFADMIN); +DECLARE_MAPI_INTERFACE_PTR(IMsgServiceAdmin, LPSERVICEADMIN); +DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION); + +/* ------------------------------------------------------ */ +/* shared with simple mapi */ + +typedef ULONG FLAGS; + +/* MAPILogon() flags. */ + +#define MAPI_LOGON_UI 0x00000001 /* Display logon UI */ +#define MAPI_NEW_SESSION 0x00000002 /* Don't use shared session */ +#define MAPI_ALLOW_OTHERS 0x00000008 /* Make this a shared session */ +#define MAPI_EXPLICIT_PROFILE 0x00000010 /* Don't use default profile */ +#define MAPI_EXTENDED 0x00000020 /* Extended MAPI Logon */ +#define MAPI_FORCE_DOWNLOAD 0x00001000 /* Get new mail before return */ +#define MAPI_SERVICE_UI_ALWAYS 0x00002000 /* Do logon UI in all providers */ +#define MAPI_NO_MAIL 0x00008000 /* Do not activate transports */ +/* #define MAPI_NT_SERVICE 0x00010000 Allow logon from an NT service */ +#ifndef MAPI_PASSWORD_UI +#define MAPI_PASSWORD_UI 0x00020000 /* Display password UI only */ +#endif +#define MAPI_TIMEOUT_SHORT 0x00100000 /* Minimal wait for logon resources */ + +#define MAPI_SIMPLE_DEFAULT (MAPI_LOGON_UI | MAPI_FORCE_DOWNLOAD | MAPI_ALLOW_OTHERS) +#define MAPI_SIMPLE_EXPLICIT (MAPI_NEW_SESSION | MAPI_FORCE_DOWNLOAD | MAPI_EXPLICIT_PROFILE) + +/* Structure passed to MAPIInitialize(), and its ulFlags values */ + +typedef struct +{ + ULONG ulVersion; + ULONG ulFlags; +} MAPIINIT_0, FAR *LPMAPIINIT_0; + +typedef MAPIINIT_0 MAPIINIT; +typedef MAPIINIT FAR *LPMAPIINIT; + +#define MAPI_INIT_VERSION 0 + +#define MAPI_MULTITHREAD_NOTIFICATIONS 0x00000001 +/* Reserved for MAPI 0x40000000 */ +/* #define MAPI_NT_SERVICE 0x00010000 Use from NT service */ + +/* MAPI base functions */ + +typedef HRESULT (STDAPICALLTYPE MAPIINITIALIZE)( + LPVOID lpMapiInit +); +typedef MAPIINITIALIZE FAR *LPMAPIINITIALIZE; + +typedef void (STDAPICALLTYPE MAPIUNINITIALIZE)(void); +typedef MAPIUNINITIALIZE FAR *LPMAPIUNINITIALIZE; + +MAPIINITIALIZE MAPIInitialize; +MAPIUNINITIALIZE MAPIUninitialize; + + +/* Extended MAPI Logon function */ + + +typedef HRESULT (STDMETHODCALLTYPE MAPILOGONEX)( + ULONG_PTR ulUIParam, + /*OFFICEDEV add _opt*/ __in_opt LPTSTR lpszProfileName, + /*OFFICEDEV add _opt*/ __in_opt LPTSTR lpszPassword, + ULONG ulFlags, /* ulFlags takes all that SimpleMAPI does + MAPI_UNICODE */ + LPMAPISESSION FAR * lppSession +); +typedef MAPILOGONEX FAR *LPMAPILOGONEX; + +MAPILOGONEX MAPILogonEx; + + +typedef SCODE (STDMETHODCALLTYPE MAPIALLOCATEBUFFER)( + ULONG cbSize, + LPVOID FAR * lppBuffer +); + +typedef SCODE (STDMETHODCALLTYPE MAPIALLOCATEMORE)( + ULONG cbSize, + LPVOID lpObject, + LPVOID FAR * lppBuffer +); + +typedef ULONG (STDAPICALLTYPE MAPIFREEBUFFER)( + LPVOID lpBuffer +); + +typedef MAPIALLOCATEBUFFER FAR *LPMAPIALLOCATEBUFFER; +typedef MAPIALLOCATEMORE FAR *LPMAPIALLOCATEMORE; +typedef MAPIFREEBUFFER FAR *LPMAPIFREEBUFFER; + +MAPIALLOCATEBUFFER MAPIAllocateBuffer; +MAPIALLOCATEMORE MAPIAllocateMore; +MAPIFREEBUFFER MAPIFreeBuffer; + +typedef HRESULT (STDMETHODCALLTYPE MAPIADMINPROFILES)( + ULONG ulFlags, + LPPROFADMIN FAR *lppProfAdmin +); + +typedef MAPIADMINPROFILES FAR *LPMAPIADMINPROFILES; + +MAPIADMINPROFILES MAPIAdminProfiles; + +/* IMAPISession Interface -------------------------------------------------- */ + +/* Flags for OpenEntry and others */ + +/*#define MAPI_MODIFY ((ULONG) 0x00000001) */ + +/* Flags for Logoff */ + +#define MAPI_LOGOFF_SHARED 0x00000001 /* Close all shared sessions */ +#define MAPI_LOGOFF_UI 0x00000002 /* It's OK to present UI */ + +/* Flags for SetDefaultStore. They are mutually exclusive. */ + +#define MAPI_DEFAULT_STORE 0x00000001 /* for incoming messages */ +#define MAPI_SIMPLE_STORE_TEMPORARY 0x00000002 /* for simple MAPI and CMC */ +#define MAPI_SIMPLE_STORE_PERMANENT 0x00000003 /* for simple MAPI and CMC */ +#define MAPI_PRIMARY_STORE 0x00000004 /* Used by some clients */ +#define MAPI_SECONDARY_STORE 0x00000005 /* Used by some clients */ + +/* Flags for ShowForm. */ + +#define MAPI_POST_MESSAGE 0x00000001 /* Selects post/send semantics */ +#define MAPI_NEW_MESSAGE 0x00000002 /* Governs copying during submission */ + +/* MessageOptions */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +/* QueryDefaultMessageOpt */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +#define MAPI_IMAPISESSION_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetMsgStoresTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(OpenMsgStore) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPMDB FAR * lppMDB) IPURE; \ + MAPIMETHOD(OpenAddressBook) \ + (THIS_ ULONG_PTR ulUIParam, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPADRBOOK FAR * lppAdrBook) IPURE; \ + MAPIMETHOD(OpenProfileSection) \ + (THIS_ LPMAPIUID lpUID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPPROFSECT FAR * lppProfSect) IPURE; \ + MAPIMETHOD(GetStatusTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(OpenEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(CompareEntryIDs) \ + (THIS_ ULONG cbEntryID1, \ + LPENTRYID lpEntryID1, \ + ULONG cbEntryID2, \ + LPENTRYID lpEntryID2, \ + ULONG ulFlags, \ + ULONG FAR * lpulResult) IPURE; \ + MAPIMETHOD(Advise) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulEventMask, \ + LPMAPIADVISESINK lpAdviseSink, \ + ULONG_PTR FAR * lpulConnection) IPURE; \ + MAPIMETHOD(Unadvise) \ + (THIS_ ULONG_PTR ulConnection) IPURE; \ + MAPIMETHOD(MessageOptions) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + LPTSTR lpszAdrType, \ + LPMESSAGE lpMessage) IPURE; \ + MAPIMETHOD(QueryDefaultMessageOpt) \ + (THIS_ LPTSTR lpszAdrType, \ + ULONG ulFlags, \ + ULONG FAR * lpcValues, \ + LPSPropValue FAR * lppOptions) IPURE; \ + MAPIMETHOD(EnumAdrTypes) \ + (THIS_ ULONG ulFlags, \ + ULONG FAR * lpcAdrTypes, \ + LPTSTR FAR * FAR * lpppszAdrTypes) IPURE; \ + MAPIMETHOD(QueryIdentity) \ + (THIS_ ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(Logoff) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + ULONG ulReserved) IPURE; \ + MAPIMETHOD(SetDefaultStore) \ + (THIS_ ULONG ulFlags, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID) IPURE; \ + MAPIMETHOD(AdminServices) \ + (THIS_ ULONG ulFlags, \ + LPSERVICEADMIN FAR * lppServiceAdmin) IPURE; \ + MAPIMETHOD(ShowForm) \ + (THIS_ ULONG_PTR ulUIParam, \ + LPMDB lpMsgStore, \ + LPMAPIFOLDER lpParentFolder, \ + LPCIID lpInterface, \ + ULONG_PTR ulMessageToken, \ + LPMESSAGE lpMessageSent, \ + ULONG ulFlags, \ + ULONG ulMessageStatus, \ + ULONG ulMessageFlags, \ + ULONG ulAccess, \ + LPSTR lpszMessageClass) IPURE; \ + MAPIMETHOD(PrepareForm) \ + (THIS_ LPCIID lpInterface, \ + LPMESSAGE lpMessage, \ + ULONG_PTR FAR * lpulMessageToken) IPURE; \ + + +#undef INTERFACE +#define INTERFACE IMAPISession +DECLARE_MAPI_INTERFACE_(IMAPISession, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPISESSION_METHODS(PURE) +}; + +/*DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION);*/ + +/* IAddrBook Interface ----------------------------------------------------- */ + +/* CreateOneOff */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ +/****** MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) */ + +/* RecipOptions */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +/* QueryDefaultRecipOpt */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +/* GetSearchPath */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + + +#define MAPI_IADDRBOOK_METHODS(IPURE) \ + MAPIMETHOD(OpenEntry) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + ULONG FAR * lpulObjType, \ + LPUNKNOWN FAR * lppUnk) IPURE; \ + MAPIMETHOD(CompareEntryIDs) \ + (THIS_ ULONG cbEntryID1, \ + LPENTRYID lpEntryID1, \ + ULONG cbEntryID2, \ + LPENTRYID lpEntryID2, \ + ULONG ulFlags, \ + ULONG FAR * lpulResult) IPURE; \ + MAPIMETHOD(Advise) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + ULONG ulEventMask, \ + LPMAPIADVISESINK lpAdviseSink, \ + ULONG_PTR FAR * lpulConnection) IPURE; \ + MAPIMETHOD(Unadvise) \ + (THIS_ ULONG_PTR ulConnection) IPURE; \ + MAPIMETHOD(CreateOneOff) \ + (THIS_ LPTSTR lpszName, \ + LPTSTR lpszAdrType, \ + LPTSTR lpszAddress, \ + ULONG ulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(NewEntry) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + ULONG cbEIDContainer, \ + LPENTRYID lpEIDContainer, \ + ULONG cbEIDNewEntryTpl, \ + LPENTRYID lpEIDNewEntryTpl, \ + ULONG FAR * lpcbEIDNewEntry, \ + LPENTRYID FAR * lppEIDNewEntry) IPURE; \ + MAPIMETHOD(ResolveName) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + LPTSTR lpszNewEntryTitle, \ + LPADRLIST lpAdrList) IPURE; \ + MAPIMETHOD(Address) \ + (THIS_ ULONG_PTR FAR * lpulUIParam, \ + LPADRPARM lpAdrParms, \ + LPADRLIST FAR * lppAdrList) IPURE; \ + MAPIMETHOD(Details) \ + (THIS_ ULONG_PTR FAR * lpulUIParam, \ + LPFNDISMISS lpfnDismiss, \ + LPVOID lpvDismissContext, \ + ULONG cbEntryID, \ + LPENTRYID lpEntryID, \ + LPFNBUTTON lpfButtonCallback, \ + LPVOID lpvButtonContext, \ + LPTSTR lpszButtonText, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(RecipOptions) \ + (THIS_ ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + LPADRENTRY lpRecip) IPURE; \ + MAPIMETHOD(QueryDefaultRecipOpt) \ + (THIS_ LPTSTR lpszAdrType, \ + ULONG ulFlags, \ + ULONG FAR * lpcValues, \ + LPSPropValue FAR * lppOptions) IPURE; \ + MAPIMETHOD(GetPAB) \ + (THIS_ ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(SetPAB) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID) IPURE; \ + MAPIMETHOD(GetDefaultDir) \ + (THIS_ ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(SetDefaultDir) \ + (THIS_ ULONG cbEntryID, \ + LPENTRYID lpEntryID) IPURE; \ + MAPIMETHOD(GetSearchPath) \ + (THIS_ ULONG ulFlags, \ + LPSRowSet FAR * lppSearchPath) IPURE; \ + MAPIMETHOD(SetSearchPath) \ + (THIS_ ULONG ulFlags, \ + LPSRowSet lpSearchPath) IPURE; \ + MAPIMETHOD(PrepareRecips) \ + (THIS_ ULONG ulFlags, \ + LPSPropTagArray lpPropTagArray, \ + LPADRLIST lpRecipList) IPURE; \ + +#undef INTERFACE +#define INTERFACE IAddrBook +DECLARE_MAPI_INTERFACE_(IAddrBook, IMAPIProp) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMAPIPROP_METHODS(PURE) + MAPI_IADDRBOOK_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(IAddrBook, LPADRBOOK); + +/* IProfAdmin Interface ---------------------------------------------------- */ + +/* Flags for CreateProfile */ +#define MAPI_DEFAULT_SERVICES 0x00000001 + +/* GetProfileTable */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +#define MAPI_IPROFADMIN_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetProfileTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(CreateProfile) \ + (THIS_ LPTSTR lpszProfileName, \ + LPTSTR lpszPassword, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(DeleteProfile) \ + (THIS_ LPTSTR lpszProfileName, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(ChangeProfilePassword) \ + (THIS_ LPTSTR lpszProfileName, \ + LPTSTR lpszOldPassword, \ + LPTSTR lpszNewPassword, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(CopyProfile) \ + (THIS_ LPTSTR lpszOldProfileName, \ + LPTSTR lpszOldPassword, \ + LPTSTR lpszNewProfileName, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(RenameProfile) \ + (THIS_ LPTSTR lpszOldProfileName, \ + LPTSTR lpszOldPassword, \ + LPTSTR lpszNewProfileName, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(SetDefaultProfile) \ + (THIS_ LPTSTR lpszProfileName, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(AdminServices) \ + (THIS_ LPTSTR lpszProfileName, \ + LPTSTR lpszPassword, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + LPSERVICEADMIN FAR * lppServiceAdmin) IPURE; \ + + +#undef INTERFACE +#define INTERFACE IProfAdmin +DECLARE_MAPI_INTERFACE_(IProfAdmin, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IPROFADMIN_METHODS(PURE) +}; + +/* IMsgServiceAdmin Interface ---------------------------------------------- */ + +/* Values for PR_RESOURCE_FLAGS in message service table */ + +#define SERVICE_DEFAULT_STORE 0x00000001 +#define SERVICE_SINGLE_COPY 0x00000002 +#define SERVICE_CREATE_WITH_STORE 0x00000004 +#define SERVICE_PRIMARY_IDENTITY 0x00000008 +#define SERVICE_NO_PRIMARY_IDENTITY 0x00000020 + +/* GetMsgServiceTable */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +/* GetProviderTable */ +/****** MAPI_UNICODE ((ULONG) 0x80000000) */ + +#define MAPI_IMSGSERVICEADMIN_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, \ + ULONG ulFlags, \ + LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetMsgServiceTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(CreateMsgService) \ + (THIS_ LPTSTR lpszService, \ + LPTSTR lpszDisplayName, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(DeleteMsgService) \ + (THIS_ LPMAPIUID lpUID) IPURE; \ + MAPIMETHOD(CopyMsgService) \ + (THIS_ LPMAPIUID lpUID, \ + LPTSTR lpszDisplayName, \ + LPCIID lpInterfaceToCopy, \ + LPCIID lpInterfaceDst, \ + LPVOID lpObjectDst, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(RenameMsgService) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG ulFlags, \ + LPTSTR lpszDisplayName) IPURE; \ + MAPIMETHOD(ConfigureMsgService) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG_PTR ulUIParam, \ + ULONG ulFlags, \ + ULONG cValues, \ + LPSPropValue lpProps) IPURE; \ + MAPIMETHOD(OpenProfileSection) \ + (THIS_ LPMAPIUID lpUID, \ + LPCIID lpInterface, \ + ULONG ulFlags, \ + LPPROFSECT FAR * lppProfSect) IPURE; \ + MAPIMETHOD(MsgServiceTransportOrder) \ + (THIS_ ULONG cUID, \ + LPMAPIUID lpUIDList, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(AdminProviders) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG ulFlags, \ + LPPROVIDERADMIN FAR * lppProviderAdmin) IPURE; \ + MAPIMETHOD(SetPrimaryIdentity) \ + (THIS_ LPMAPIUID lpUID, \ + ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetProviderTable) \ + (THIS_ ULONG ulFlags, \ + LPMAPITABLE FAR * lppTable) IPURE; \ + + +#undef INTERFACE +#define INTERFACE IMsgServiceAdmin +DECLARE_MAPI_INTERFACE_(IMsgServiceAdmin, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_IMSGSERVICEADMIN_METHODS(PURE) +}; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* MAPIX_H */ + diff --git a/com/win32comext/mapi/src/mapi_headers/MSPST.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/MSPST.h similarity index 97% rename from com/win32comext/mapi/src/mapi_headers/MSPST.h rename to com/win32comext/mapi/src/MAPIStubLibrary/include/MSPST.h index dae5b3183..d063e25c5 100644 --- a/com/win32comext/mapi/src/mapi_headers/MSPST.h +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/MSPST.h @@ -1,101 +1,99 @@ -/* - * M S P S T . H - * - * This file lists internal properties of the Microsoft Personal - * Information Store - * - * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. - */ - -#ifndef _MSPST_H_ -#define _MSPST_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - - -/* The following is a list of properties that may be passed in - as the properties in the array of SPropValue structure on the - MsgServiceConfigure function. - - Creating a PST profile section through CreateMsgService. - The creation of the actual PST file is a two step process. First the - client should call CreateMsgService to setup the profile section and then - ConfigureMsgService to create the PST file. - The CreateMsgService call will setup the PR_DISPLAY_NAME property in the - profile section to be used on the PST when it is created. - - Configuring an PST file through ConfigureMsgService. - The configuration of an PST can take two forms, either configuring an - existing PST or creating a new PST. The Microsoft Personal Information - Store provider will try to find the necessary properties by first looking - in the array of SPropValue structures provided by the client and then in the - profile section, except for PR_PST_PW_SZ_OLD for which it will only look - in the array of properties. - - The Microsoft PST provider will try to open the file specified by the - PR_PST_PATH property, using the password given in the PR_PST_PW_SZ_OLD - property. If it finds a file and it recognizes it as a PST - file, it will start the configuration routine. Otherwise it will start the - creation routine. - - The configuration routine will look for the PR_DISPLAY_NAME_A and - PR_COMMENT_A properties and set them in the message store object. Then it - will look for the PR_PST_REMEMBER_PW property to decide if it should - remember the password in the profile. (If not found then it will defaut to - the current status of the profile password.) Then if it is supposed to - use UI, it will display the configuration property sheet to the user. After - all has succeeded, it will update the profile. - - The creation routine will follow one of two paths to get the PR_PST_PATH - property. If it is supposed to use UI it will always display the file open - dialog to confirm the path passed in or allow the user to change it. If - the user chooses an existing file and it recognizes it as an PST it will - drop back to the configuration routine. If the user chooses an existing - file and it is not recognized as an PST file, the user will be given the - option of choosing another file or creating a new PST in its place, in - which case is will continue with the create routine. If the user chooses - a new file it will continue with the create routine. If the routine is not - allowed to use UI, then the routine will create a file at the given path - even if another file exists there. - - Once it decides to continue with the creation process it will get the - PR_DISPLAY_NAME, PR_COMMENT, PR_PST_ENCRYPTION, and PR_PST_SZ_PW_NEW - properties. If it is supposed to use UI, it will use these to initialize - the creation dialog and get any changes the user want. Then it will create - a new file and update the profile. - - PR_DISPLAY_NAME_A display name for the PST service - PR_COMMENT_A comment to the place on the PST store object - PR_PST_PATH location the store to create or configure - PR_PST_REMEMBER_PW whether or not the remember the password in the profile - PR_PST_ENCRYPTION encryption level at which to create the file - PR_PST_PW_SZ_OLD password of the PST being configured - PR_PST_PW_SZ_NEW password to use for future access to the PST -*/ - -#define PST_EXTERN_PROPID_BASE (0x6700) -#define PR_PST_PATH PROP_TAG(PT_STRING8, PST_EXTERN_PROPID_BASE + 0) -#define PR_PST_REMEMBER_PW PROP_TAG(PT_BOOLEAN, PST_EXTERN_PROPID_BASE + 1) -#define PR_PST_ENCRYPTION PROP_TAG(PT_LONG, PST_EXTERN_PROPID_BASE + 2) -#define PR_PST_PW_SZ_OLD PROP_TAG(PT_STRING8, PST_EXTERN_PROPID_BASE + 3) -#define PR_PST_PW_SZ_NEW PROP_TAG(PT_STRING8, PST_EXTERN_PROPID_BASE + 4) - -#define PSTF_NO_ENCRYPTION ((DWORD)0x80000000) -#define PSTF_COMPRESSABLE_ENCRYPTION ((DWORD)0x40000000) -#define PSTF_BEST_ENCRYPTION ((DWORD)0x20000000) - -/* - * PR_MDB_PROVIDER is the GUID that represent the Microsoft Personal - * Information Store. This guid is available as a property in the stores - * table and on the message store and status objects. - */ -#define MSPST_UID_PROVIDER { 0x4e, 0x49, 0x54, 0x41, \ - 0xf9, 0xbf, 0xb8, 0x01, \ - 0x00, 0xaa, 0x00, 0x37, \ - 0xd9, 0x6e, 0x00, 0x00 } - -#endif /* _MSPST_H_ */ - - +/* + * M S P S T . H + * + * This file lists internal properties of the Microsoft Personal + * Information Store + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef _MSPST_H_ +#define _MSPST_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + + +/* The following is a list of properties that may be passed in + as the properties in the array of SPropValue structure on the + MsgServiceConfigure function. + + Creating a PST profile section through CreateMsgService. + The creation of the actual PST file is a two step process. First the + client should call CreateMsgService to setup the profile section and then + ConfigureMsgService to create the PST file. + The CreateMsgService call will setup the PR_DISPLAY_NAME property in the + profile section to be used on the PST when it is created. + + Configuring an PST file through ConfigureMsgService. + The configuration of an PST can take two forms, either configuring an + existing PST or creating a new PST. The Microsoft Personal Information + Store provider will try to find the necessary properties by first looking + in the array of SPropValue structures provided by the client and then in the + profile section, except for PR_PST_PW_SZ_OLD for which it will only look + in the array of properties. + + The Microsoft PST provider will try to open the file specified by the + PR_PST_PATH property, using the password given in the PR_PST_PW_SZ_OLD + property. If it finds a file and it recognizes it as a PST + file, it will start the configuration routine. Otherwise it will start the + creation routine. + + The configuration routine will look for the PR_DISPLAY_NAME_A and + PR_COMMENT_A properties and set them in the message store object. Then it + will look for the PR_PST_REMEMBER_PW property to decide if it should + remember the password in the profile. (If not found then it will defaut to + the current status of the profile password.) Then if it is supposed to + use UI, it will display the configuration property sheet to the user. After + all has succeeded, it will update the profile. + + The creation routine will follow one of two paths to get the PR_PST_PATH + property. If it is supposed to use UI it will always display the file open + dialog to confirm the path passed in or allow the user to change it. If + the user chooses an existing file and it recognizes it as an PST it will + drop back to the configuration routine. If the user chooses an existing + file and it is not recognized as an PST file, the user will be given the + option of choosing another file or creating a new PST in its place, in + which case is will continue with the create routine. If the user chooses + a new file it will continue with the create routine. If the routine is not + allowed to use UI, then the routine will create a file at the given path + even if another file exists there. + + Once it decides to continue with the creation process it will get the + PR_DISPLAY_NAME, PR_COMMENT, PR_PST_ENCRYPTION, and PR_PST_SZ_PW_NEW + properties. If it is supposed to use UI, it will use these to initialize + the creation dialog and get any changes the user want. Then it will create + a new file and update the profile. + + PR_DISPLAY_NAME_A display name for the PST service + PR_COMMENT_A comment to the place on the PST store object + PR_PST_PATH location the store to create or configure + PR_PST_REMEMBER_PW whether or not the remember the password in the profile + PR_PST_ENCRYPTION encryption level at which to create the file + PR_PST_PW_SZ_OLD password of the PST being configured + PR_PST_PW_SZ_NEW password to use for future access to the PST +*/ + +#define PST_EXTERN_PROPID_BASE (0x6700) +#define PR_PST_PATH PROP_TAG(PT_STRING8, PST_EXTERN_PROPID_BASE + 0) +#define PR_PST_REMEMBER_PW PROP_TAG(PT_BOOLEAN, PST_EXTERN_PROPID_BASE + 1) +#define PR_PST_ENCRYPTION PROP_TAG(PT_LONG, PST_EXTERN_PROPID_BASE + 2) +#define PR_PST_PW_SZ_OLD PROP_TAG(PT_STRING8, PST_EXTERN_PROPID_BASE + 3) +#define PR_PST_PW_SZ_NEW PROP_TAG(PT_STRING8, PST_EXTERN_PROPID_BASE + 4) + +#define PSTF_NO_ENCRYPTION ((DWORD)0x80000000) +#define PSTF_COMPRESSABLE_ENCRYPTION ((DWORD)0x40000000) +#define PSTF_BEST_ENCRYPTION ((DWORD)0x20000000) + +/* + * PR_MDB_PROVIDER is the GUID that represent the Microsoft Personal + * Information Store. This guid is available as a property in the stores + * table and on the message store and status objects. + */ +#define MSPST_UID_PROVIDER { 0x4e, 0x49, 0x54, 0x41, \ + 0xf9, 0xbf, 0xb8, 0x01, \ + 0x00, 0xaa, 0x00, 0x37, \ + 0xd9, 0x6e, 0x00, 0x00 } + +#endif /* _MSPST_H_ */ diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/abhelp.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/abhelp.h new file mode 100644 index 000000000..6ca00f14b --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/abhelp.h @@ -0,0 +1,116 @@ +#pragma once + +// system headers +#include +#include + +// Include MAPI +#include +#include + +extern "C" { + STDAPI_(HRESULT) HrOpenABEntryWithExchangeContext( + LPMAPISESSION pmsess, + const MAPIUID * pEmsmdbUID, + LPADRBOOK pAddrBook, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPCIID lpInterface, + ULONG ulFlags, + ULONG FAR * lpulObjType, + LPUNKNOWN FAR * lppUnk); + + STDAPI_(HRESULT) HrDoABDetailsWithExchangeContext( + LPMAPISESSION pmsess, + const MAPIUID * pEmsmdbUID, + LPADRBOOK pAddrBook, + ULONG_PTR FAR * lpulUIParam, + LPFNDISMISS lpfnDismiss, + LPVOID lpvDismissContext, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPFNBUTTON lpfButtonCallback, + LPVOID lpvButtonContext, + LPTSTR lpszButtonText, + ULONG ulFlags); + + STDAPI_(HRESULT) HrDoABDetailsWithProviderUID( + const MAPIUID *pEmsabpUID, + LPADRBOOK pAddrBook, + ULONG_PTR FAR * lpulUIParam, + LPFNDISMISS lpfnDismiss, + LPVOID lpvDismissContext, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPFNBUTTON lpfButtonCallback, + LPVOID lpvButtonContext, + LPTSTR lpszButtonText, + ULONG ulFlags); + + STDAPI_(HRESULT) HrOpenABEntryUsingDefaultContext( + LPMAPISESSION pmsess, + LPADRBOOK pAddrBook, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPCIID lpInterface, + ULONG ulFlags, + ULONG FAR * lpulObjType, + LPUNKNOWN FAR * lppUnk); + + STDAPI_(HRESULT) HrOpenABEntryWithProviderUID( + const MAPIUID * pEmsabpUID, + LPADRBOOK pAddrBook, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPCIID lpInterface, + ULONG ulFlags, + ULONG FAR * lpulObjType, + LPUNKNOWN FAR * lppUnk); + + STDAPI_(HRESULT) HrOpenABEntryWithProviderUIDSupport( + const MAPIUID * pEmsabpUID, + LPMAPISUP lpSup, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPCIID lpInterface, + ULONG ulFlags, + ULONG FAR * lpulObjType, + LPUNKNOWN FAR * lppUnk); + + STDAPI_(HRESULT) HrOpenABEntryWithResolvedRow( + LPSRow prwResolved, + LPADRBOOK pAddrBook, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPCIID lpInterface, + ULONG ulFlags, + ULONG FAR * lpulObjType, + LPUNKNOWN FAR * lppUnk); + + STDAPI_(HRESULT) HrCompareABEntryIDsWithExchangeContext( + LPMAPISESSION pmsess, + const MAPIUID *pEmsmdbUID, + LPADRBOOK pAddrBook, + ULONG cbEntryID1, + LPENTRYID lpEntryID1, + ULONG cbEntryID2, + LPENTRYID lpEntryID2, + ULONG ulFlags, + ULONG * lpulResult); + + STDAPI_(HRESULT) HrOpenABEntryWithSupport( + LPMAPISUP lpSup, + ULONG cbEntryID, + LPENTRYID lpEntryID, + LPCIID lpInterface, + ULONG ulFlags, + ULONG FAR * lpulObjType, + LPUNKNOWN FAR * lppUnk); + + STDAPI_(HRESULT) HrGetGALFromEmsmdbUID( + LPMAPISESSION pSess, + LPADRBOOK lpAdrBook, + const MAPIUID * pEmsmdbUID, + ULONG * lpcbeid, + LPENTRYID * lppeid); +} \ No newline at end of file diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/actMgmt.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/actMgmt.h new file mode 100644 index 000000000..22661219c --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/actMgmt.h @@ -0,0 +1,321 @@ +//Class Identifiers +//Use the DEFINE_GUID macro defined in the Platform SDK header file guiddef.h to associate the GUID symbolic name with its value. + +//{ed475410-b0d6-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(CLSID_OlkAccountManager, 0xed475410, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{ed475411-b0d6-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(CLSID_OlkPOP3Account, 0xed475411, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{ed475412-b0d6-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(CLSID_OlkIMAP4Account, 0xed475412, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{ed475414-b0d6-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(CLSID_OlkMAPIAccount, 0xed475414, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{ed475418-b0d6-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(CLSID_OlkMail, 0xed475418, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{ed475419-b0d6-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(CLSID_OlkAddressBook, 0xed475419, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{ed475420-b0d6-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(CLSID_OlkStore, 0xed475420, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{4db5cbf0-3b77-4852-bc8e-bb81908861f3} + +DEFINE_GUID(CLSID_OlkHotmailAccount, 0x4db5cbf0, 0x3b77, 0x4852, 0xbc, 0x8e, 0xbb, 0x81, 0x90, 0x88, 0x61, 0xf3); + +//{4db5cbf2-3b77-4852-bc8e-bb81908861f3} + +DEFINE_GUID(CLSID_OlkLDAPAccount, 0x4db5cbf2, 0x3b77, 0x4852, 0xbc, 0x8e, 0xbb, 0x81, 0x90, 0x88, 0x61, 0xf3); + +//Interface Identifiers +//Use the DEFINE_GUID macro defined in the Platform SDK header file guiddef.h to associate the GUID symbolic name with its value. + +//{9240A6C0-AF41-11d2-8C3B-00104B2A6676} + +DEFINE_GUID(IID_IOlkErrorUnknown, 0x9240a6c0, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{9240A6C1-AF41-11d2-8C3B-00104B2A6676 } + +DEFINE_GUID(IID_IOlkEnum, 0x9240a6c0, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{9240a6c3-af41-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(IID_IOlkAccountNotify, 0x9240a6c3, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{9240a6cb-af41-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(IID_IOlkAccountHelper, 0x9240a6cb, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{9240a6cd-af41-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(IID_IOlkAccountManager, 0x9240a6cd, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +//{9240a6d2-af41-11d2-8c3b-00104b2a6676} + +DEFINE_GUID(IID_IOlkAccount, 0x9240a6d2, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76); + +#ifndef ACTMGMT_INCLUDED +#define ACTMGMT_INCLUDED + +#define ACCT_INIT_NOSYNCH_MAPI_ACCTS 0x00000001 + +#define E_ACCT_NOT_FOUND 0x800C8101 +#define E_ACCT_WRONG_SORT_ORDER 0x800C8105 +#define E_OLK_ALREADY_INITIALIZED 0x800C8002 +#define E_OLK_NOT_INITIALIZED 0x800C8005 +#define E_OLK_PARAM_NOT_SUPPORTED 0x800C8003 +#define E_OLK_PROP_READ_ONLY 0x800C800D +#define E_OLK_REGISTRY 0x800C8002 + +#define NOTIFY_ACCT_CHANGED 1 +#define NOTIFY_ACCT_CREATED 2 +#define NOTIFY_ACCT_DELETED 3 +#define NOTIFY_ACCT_ORDER_CHANGED 4 +#define NOTIFY_ACCT_PREDELETED 5 + +#define OLK_ACCOUNT_NO_FLAGS 0 + +typedef struct +{ + DWORD cb; + BYTE* pb; +} ACCT_BIN; + +typedef struct +{ + DWORD dwType; + union { + DWORD dw; + WCHAR* pwsz; + ACCT_BIN bin; + } Val; +} ACCT_VARIANT; + +#define PR_PRIMARY_SEND_ACCT PROP_TAG(PT_UNICODE, 0x0e28) +#define PR_NEXT_SEND_ACCT PROP_TAG(PT_UNICODE, 0x0e29) + +// Common Properties - 0x0001 : 0x00FF +// =================================== +#define PROP_ACCT_ID PROP_TAG(PT_LONG, 0x0001) +#define PROP_ACCT_NAME PROP_TAG(PT_UNICODE, 0x0002) +#define PROP_ACCT_MINI_UID PROP_TAG(PT_LONG, 0x0003) +#define PROP_ACCT_USER_DISPLAY_NAME PROP_TAG(PT_UNICODE, 0x000B) +#define PROP_ACCT_USER_EMAIL_ADDR PROP_TAG(PT_UNICODE, 0x000C) +#define PROP_ACCT_STAMP PROP_TAG(PT_UNICODE, 0x000D) +#define PROP_ACCT_SEND_STAMP PROP_TAG(PT_UNICODE, 0x000E) +#define PROP_ACCT_IS_EXCH PROP_TAG(PT_LONG, 0x0014) +#define PROP_ACCT_DELIVERY_STORE PROP_TAG(PT_BINARY, 0x0018) +#define PROP_ACCT_DELIVERY_FOLDER PROP_TAG(PT_BINARY, 0x0019) +#define PROP_ACCT_SENTITEMS_EID PROP_TAG(PT_BINARY, 0x0020) +#define PROP_ACCT_PREFERENCES_UID PROP_TAG(PT_BINARY, 0x0022) + +// General Internet Mail Properties - 0x0100 : 0x01FF +// ================================================== +#define PROP_INET_SERVER PROP_TAG(PT_UNICODE, 0x0100) +#define PROP_INET_USER PROP_TAG(PT_UNICODE, 0x0101) +#define PROP_INET_PASSWORD PROP_TAG(PT_UNICODE, 0x0102) +#define PROP_INET_PORT PROP_TAG(PT_LONG, 0x0104) +#define PROP_INET_SSL PROP_TAG(PT_LONG, 0x0105) +#define PROP_INET_USE_SPA PROP_TAG(PT_LONG, 0x0108) + +// Specific SMTP Properties - 0x0200 : 0x02FF +// ========================================== +#define PROP_SMTP_SERVER PROP_TAG(PT_UNICODE, 0x0200) +#define PROP_SMTP_PORT PROP_TAG(PT_LONG, 0x0201) +#define PROP_SMTP_SSL PROP_TAG(PT_LONG, 0x0202) +#define PROP_SMTP_USE_AUTH PROP_TAG(PT_LONG, 0x0203) +#define PROP_SMTP_USER PROP_TAG(PT_UNICODE, 0x0204) +#define PROP_SMTP_PASSWORD PROP_TAG(PT_UNICODE, 0x0205) +#define PROP_SMTP_USE_SPA PROP_TAG(PT_LONG, 0x0207) +#define PROP_SMTP_AUTH_METHOD PROP_TAG(PT_LONG, 0x0208) +#define PROP_SMTP_SECURE_CONNECTION PROP_TAG(PT_LONG, 0x020A) + +// Specific POP Properties - 0x1000 : 0x10FF +// ========================================= +#define PROP_POP_LEAVE_ON_SERVER PROP_TAG(PT_LONG, 0x1000) + +// Specific MAPI Properties - 0x2000 : 0x20FF +// ========================================== +#define PROP_MAPI_IDENTITY_ENTRYID PROP_TAG(PT_BINARY, 0x2002) +#define PROP_MAPI_EMSMDB_UID PROP_TAG(PT_BINARY, 0x2009) +#define PROP_MAPI_TRANSPORT_FLAGS PROP_TAG(PT_BINARY, 0x2010) + +#define ACCTUI_NO_WARNING 0x0100 +#define ACCTUI_SHOW_DATA_TAB 0x0200 +#define ACCTUI_SHOW_ACCTWIZARD 0x0400 + +interface IOlkErrorUnknown : IUnknown +{ + //GetLastError Gets a message string for the specified error. + virtual STDMETHODIMP GetLastError(HRESULT hr, LPWSTR * ppwszError); +}; + +typedef IOlkErrorUnknown FAR* LPOLKERRORUNKNOWN; + +interface IOlkAccount : IOlkErrorUnknown +{ +public: + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder1(); + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder2(); + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder3(); + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder4(); + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder5(); + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder6(); + + //GetAccountInfo Gets the type and categories of the specified account. + virtual STDMETHODIMP GetAccountInfo(CLSID * pclsidType, DWORD * pcCategories, CLSID * *prgclsidCategory); + //GetProp Gets the value of the specified account property. See the Properties table below. + virtual STDMETHODIMP GetProp(DWORD dwProp, ACCT_VARIANT * pVar); + //SetProp Sets the value of the specified account property. See the Properties table below. + virtual STDMETHODIMP SetProp(DWORD dwProp, ACCT_VARIANT * pVar); + + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder7(); + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder8(); + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder9(); + + //FreeMemory Frees memory allocated by the IOlkAccount interface. + virtual STDMETHODIMP FreeMemory(BYTE * pv); + + //Placeholder member Not supported or documented. + virtual STDMETHODIMP PlaceHolder10(); + + //SaveChanges Saves changes to the specified account. + virtual STDMETHODIMP SaveChanges(DWORD dwFlags); +}; + +typedef IOlkAccount FAR* LPOLKACCOUNT; + +interface IOlkAccountHelper : IUnknown +{ +public: + //Placeholder1 This member is a placeholder and is not supported. + virtual STDMETHODIMP PlaceHolder1(LPVOID) = 0; + + //GetIdentity Gets the profile name of an account. + virtual STDMETHODIMP GetIdentity(LPWSTR pwszIdentity, DWORD * pcch) = 0; + //GetMapiSession Gets the current MAPI session. + virtual STDMETHODIMP GetMapiSession(LPUNKNOWN * ppmsess) = 0; + //HandsOffSession Releases the current MAPI session that has been created by + //IOlkAccountHelper::GetMapiSession. + virtual STDMETHODIMP HandsOffSession() = 0; +}; + +typedef IOlkAccountHelper FAR* LPOLKACCOUNTHELPER; + +interface IOlkAccountNotify : IOlkErrorUnknown +{ +public: + //Notify Notifies the client of changes to the specified account. + STDMETHODIMP Notify(DWORD dwNotify, DWORD dwAcctID, DWORD dwFlags); +}; + +typedef IOlkAccountNotify FAR* LPOLKACCOUNTNOTIFY; + +interface IOlkEnum : IUnknown +{ +public: + //GetCount Gets the number of accounts in the enumerator. + virtual STDMETHODIMP GetCount(DWORD * pulCount); + //Reset Resets the enumerator to the beginning. + virtual STDMETHODIMP Reset(); + //GetNext Gets the next account in the enumerator. + virtual STDMETHODIMP GetNext(LPUNKNOWN * ppunk); + //Skip Skips a specified number of accounts in the enumerator. + virtual STDMETHODIMP Skip(DWORD cSkip); +}; + +typedef IOlkEnum FAR* LPOLKENUM; + +interface IOlkAccountManager : IOlkErrorUnknown +{ +public: + //Init Initializes the account manager for use. + virtual STDMETHODIMP Init(IOlkAccountHelper * pAcctHelper, DWORD dwFlags); + + //DisplayAccountList Displays the account list wizard + virtual STDMETHODIMP DisplayAccountList( + HWND hwnd, + DWORD dwFlags, + LPCWSTR wszTitle, // Not used + DWORD cCategories, // Not used + const CLSID* rgclsidCategories, // Not used + const CLSID* pclsidType); // Not used + + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder1(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder2(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder3(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder4(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder5(); + + //FindAccount Finds an account by property value. + virtual STDMETHODIMP FindAccount(DWORD dwProp, ACCT_VARIANT * pVar, IOlkAccount * *ppAccount); + + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder6(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder7(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder8(); + + //DeleteAccount Deletes the specified account. + virtual STDMETHODIMP DeleteAccount(DWORD dwAcctID); + + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder9(); + + //SaveChanges Saves changes to the specified account. + virtual STDMETHODIMP SaveChanges(DWORD dwAcctID, DWORD dwFlags); + //GetOrder Gets the ordering of the specified category of accounts. + virtual STDMETHODIMP GetOrder(const CLSID* pclsidCategory, DWORD* pcAccts, DWORD* prgAccts[]); + //SetOrder Modifies the ordering of the specified category of accounts. + virtual STDMETHODIMP SetOrder(const CLSID* pclsidCategory, DWORD* pcAccts, DWORD* prgAccts[]); + //EnumerateAccounts Gets an enumerator for the accounts of the specific category and type. + virtual STDMETHODIMP EnumerateAccounts( + const CLSID* pclsidCategory, const CLSID* pclsidType, DWORD dwFlags, IOlkEnum** ppEnum); + + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder10(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder11(); + + //FreeMemory Frees memory allocated by the IOlkAccountManager interface. + virtual STDMETHODIMP FreeMemory(BYTE * pv); + //Advise Registers an account for notifications sent by the account manager. + virtual STDMETHODIMP Advise(IOlkAccountNotify * pNotify, DWORD * pdwCookie); + //Unadvise Unregisters an account for notifications sent by the account manager. + virtual STDMETHODIMP Unadvise(DWORD * pdwCookie); + + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder12(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder13(); + //Placeholder member Not supported or documented + virtual STDMETHODIMP PlaceHolder14(); +}; + +typedef IOlkAccountManager FAR* LPOLKACCOUNTMANAGER; +#endif // ACTMGMT_INCLUDED \ No newline at end of file diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/include/mimeole.h b/com/win32comext/mapi/src/MAPIStubLibrary/include/mimeole.h new file mode 100644 index 000000000..ac411c4c6 --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/include/mimeole.h @@ -0,0 +1,9637 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0352 */ +/* Compiler settings for mimeole.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __mimeole_h__ +#define __mimeole_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IMimeInternational_FWD_DEFINED__ +#define __IMimeInternational_FWD_DEFINED__ +typedef interface IMimeInternational IMimeInternational; +#endif /* __IMimeInternational_FWD_DEFINED__ */ + + +#ifndef __IMimeSecurity_FWD_DEFINED__ +#define __IMimeSecurity_FWD_DEFINED__ +typedef interface IMimeSecurity IMimeSecurity; +#endif /* __IMimeSecurity_FWD_DEFINED__ */ + + +#ifndef __IMimeHeaderTable_FWD_DEFINED__ +#define __IMimeHeaderTable_FWD_DEFINED__ +typedef interface IMimeHeaderTable IMimeHeaderTable; +#endif /* __IMimeHeaderTable_FWD_DEFINED__ */ + + +#ifndef __IMimePropertySchema_FWD_DEFINED__ +#define __IMimePropertySchema_FWD_DEFINED__ +typedef interface IMimePropertySchema IMimePropertySchema; +#endif /* __IMimePropertySchema_FWD_DEFINED__ */ + + +#ifndef __IMimePropertySet_FWD_DEFINED__ +#define __IMimePropertySet_FWD_DEFINED__ +typedef interface IMimePropertySet IMimePropertySet; +#endif /* __IMimePropertySet_FWD_DEFINED__ */ + + +#ifndef __IMimeAddressTable_FWD_DEFINED__ +#define __IMimeAddressTable_FWD_DEFINED__ +typedef interface IMimeAddressTable IMimeAddressTable; +#endif /* __IMimeAddressTable_FWD_DEFINED__ */ + + +#ifndef __IMimeWebDocument_FWD_DEFINED__ +#define __IMimeWebDocument_FWD_DEFINED__ +typedef interface IMimeWebDocument IMimeWebDocument; +#endif /* __IMimeWebDocument_FWD_DEFINED__ */ + + +#ifndef __IMimeBody_FWD_DEFINED__ +#define __IMimeBody_FWD_DEFINED__ +typedef interface IMimeBody IMimeBody; +#endif /* __IMimeBody_FWD_DEFINED__ */ + + +#ifndef __IMimeMessageTree_FWD_DEFINED__ +#define __IMimeMessageTree_FWD_DEFINED__ +typedef interface IMimeMessageTree IMimeMessageTree; +#endif /* __IMimeMessageTree_FWD_DEFINED__ */ + + +#ifndef __IMimeMessage_FWD_DEFINED__ +#define __IMimeMessage_FWD_DEFINED__ +typedef interface IMimeMessage IMimeMessage; +#endif /* __IMimeMessage_FWD_DEFINED__ */ + + +#ifndef __IMimeMessageCallback_FWD_DEFINED__ +#define __IMimeMessageCallback_FWD_DEFINED__ +typedef interface IMimeMessageCallback IMimeMessageCallback; +#endif /* __IMimeMessageCallback_FWD_DEFINED__ */ + + +#ifndef __IPersistMime_FWD_DEFINED__ +#define __IPersistMime_FWD_DEFINED__ +typedef interface IPersistMime IPersistMime; +#endif /* __IPersistMime_FWD_DEFINED__ */ + + +#ifndef __IMimeMessageParts_FWD_DEFINED__ +#define __IMimeMessageParts_FWD_DEFINED__ +typedef interface IMimeMessageParts IMimeMessageParts; +#endif /* __IMimeMessageParts_FWD_DEFINED__ */ + + +#ifndef __IMimeEnumHeaderRows_FWD_DEFINED__ +#define __IMimeEnumHeaderRows_FWD_DEFINED__ +typedef interface IMimeEnumHeaderRows IMimeEnumHeaderRows; +#endif /* __IMimeEnumHeaderRows_FWD_DEFINED__ */ + + +#ifndef __IMimeEnumProperties_FWD_DEFINED__ +#define __IMimeEnumProperties_FWD_DEFINED__ +typedef interface IMimeEnumProperties IMimeEnumProperties; +#endif /* __IMimeEnumProperties_FWD_DEFINED__ */ + + +#ifndef __IMimeEnumAddressTypes_FWD_DEFINED__ +#define __IMimeEnumAddressTypes_FWD_DEFINED__ +typedef interface IMimeEnumAddressTypes IMimeEnumAddressTypes; +#endif /* __IMimeEnumAddressTypes_FWD_DEFINED__ */ + + +#ifndef __IMimeEnumMessageParts_FWD_DEFINED__ +#define __IMimeEnumMessageParts_FWD_DEFINED__ +typedef interface IMimeEnumMessageParts IMimeEnumMessageParts; +#endif /* __IMimeEnumMessageParts_FWD_DEFINED__ */ + + +#ifndef __IHashTable_FWD_DEFINED__ +#define __IHashTable_FWD_DEFINED__ +typedef interface IHashTable IHashTable; +#endif /* __IHashTable_FWD_DEFINED__ */ + + +#ifndef __IMimeAllocator_FWD_DEFINED__ +#define __IMimeAllocator_FWD_DEFINED__ +typedef interface IMimeAllocator IMimeAllocator; +#endif /* __IMimeAllocator_FWD_DEFINED__ */ + + +#ifndef __IMimeObjResolver_FWD_DEFINED__ +#define __IMimeObjResolver_FWD_DEFINED__ +typedef interface IMimeObjResolver IMimeObjResolver; +#endif /* __IMimeObjResolver_FWD_DEFINED__ */ + + +#ifndef __IFontCache_FWD_DEFINED__ +#define __IFontCache_FWD_DEFINED__ +typedef interface IFontCache IFontCache; +#endif /* __IFontCache_FWD_DEFINED__ */ + + +#ifndef __IFontCacheNotify_FWD_DEFINED__ +#define __IFontCacheNotify_FWD_DEFINED__ +typedef interface IFontCacheNotify IFontCacheNotify; +#endif /* __IFontCacheNotify_FWD_DEFINED__ */ + + +#ifndef __IMimeEditTag_FWD_DEFINED__ +#define __IMimeEditTag_FWD_DEFINED__ +typedef interface IMimeEditTag IMimeEditTag; +#endif /* __IMimeEditTag_FWD_DEFINED__ */ + + +#ifndef __IMimeEditTagCollection_FWD_DEFINED__ +#define __IMimeEditTagCollection_FWD_DEFINED__ +typedef interface IMimeEditTagCollection IMimeEditTagCollection; +#endif /* __IMimeEditTagCollection_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "ocidl.h" +#include "propidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +#if _SAL_VERSION >= 20 +_Must_inspect_result_ +_Ret_maybenull_ _Post_writable_byte_size_(size) +void * __RPC_USER MIDL_user_allocate(size_t size); +void __RPC_USER MIDL_user_free( _Pre_maybenull_ _Post_invalid_ void * ); +#else +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); +#endif +/* interface __MIDL_itf_mimeole_0000 */ +/* [local] */ + + + + + + + + + + + + + +#if (_WIN32_OE >= 0x0500) + +#endif //_WIN32_OE +//-------------------------------------------------------------------------------- +// MIMEOLE.H +//-------------------------------------------------------------------------------- +// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved. +// +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//-------------------------------------------------------------------------------- + +#pragma comment(lib,"uuid.lib") + +// -------------------------------------------------------------------------------- +// GUIDS +// -------------------------------------------------------------------------------- +// {E4B28371-83B0-11d0-8259-00C04FD85AB4} +DEFINE_GUID(LIBID_MIMEOLE, 0xe4b28371, 0x83b0, 0x11d0, 0x82, 0x59, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {05300401-BCBC-11d0-85E3-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeHtmlProtocol, 0x5300401, 0xbcbc, 0x11d0, 0x85, 0xe3, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {C5588354-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeEnumAddressTypes, 0xc5588354, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {EE519F11-851A-11d0-825C-00C04FD85AB4} +DEFINE_GUID(IID_IMimeWebDocument, 0xee519f11, 0x851a, 0x11d0, 0x82, 0x5c, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CEF-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IUnicodeStream, 0xfd853cef, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {C558834A-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeAddressTable, 0xc558834a, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {C558834B-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeAddressInfo, 0xc558834b, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {C558834D-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeEnumHeaderRows, 0xc558834d, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {C558834E-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeInlineSupport, 0xc558834e, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {C5588350-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeEnumMessageParts, 0xc5588350, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CD9-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeInternational, 0xfd853cd9, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {C5588349-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeInternational, 0xc5588349, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CDB-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeBody, 0xfd853cdb, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {C558834C-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeBody, 0xc558834c, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CDC-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeMessageParts, 0xfd853cdc, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {C558834F-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeMessageParts, 0xc558834f, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CDD-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeAllocator, 0xfd853cdd, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {C5588351-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeAllocator, 0xc5588351, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CDE-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeSecurity, 0xfd853cde, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {C5588353-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeSecurity, 0xc5588353, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CDF-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IVirtualStream, 0xfd853cdf, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {C5588359-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IVirtualStream, 0xc5588359, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CE0-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeHeaderTable, 0xfd853ce0, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {FD853CD1-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeHeaderTable, 0xfd853cd1, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CE1-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimePropertySet, 0xfd853ce1, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {FD853CD3-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimePropertySet, 0xfd853cd3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CE2-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeMessageTree, 0xfd853ce2, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {FD853CD4-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeMessageTree, 0xfd853cd4, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CE3-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {FD853CD5-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeMessage, 0xfd853cd5, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CED-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(CLSID_IMimePropertySchema, 0xfd853ced, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); +// {FD853CEC-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimePropertySchema, 0xfd853cec, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {FD853CEE-7F86-11d0-8252-00C04FD85AB4} +DEFINE_GUID(IID_IMimeEnumProperties, 0xfd853cee, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4); + +// {DE4AD8DA-555F-11d1-8DD0-00C04FB951F9} +DEFINE_GUID(IID_IPersistMime, 0xde4ad8da, 0x555f, 0x11d1, 0x8d, 0xd0, 0x00, 0xc0, 0x4f, 0xb9, 0x51, 0xf9); + +// {761AA641-7BDA-11d1-8AA9-00C04FB951F3} +DEFINE_GUID(IID_IMimeMessageCallback, 0x761aa641, 0x7bda, 0x11d1, 0x8a, 0xa9, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf3); + +#if (_WIN32_OE >= 0x0500) + +// {1C82EAD9-508E-11d1-8DCF-00C04FB951F9} +DEFINE_GUID(CLSID_MimeEdit, 0x1c82ead9, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9); + +// {1C82EADA-508E-11d1-8DCF-00C04FB951F9} +DEFINE_GUID(CMDSETID_MimeEdit, 0x1c82eada, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9); + +// {1C82EADB-508E-11d1-8DCF-00C04FB951F9} +DEFINE_GUID(CMDSETID_MimeEditHost, 0x1c82eadb, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9); + +// {64577981-86D7-11d1-BDFC-00C04FA31009} +DEFINE_GUID(IID_IHashTable, 0x64577981, 0x86d7, 0x11d1, 0xbd, 0xfc, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9); + +// {64577982-86D7-11d1-BDFC-00C04FA31009} +DEFINE_GUID(CLSID_IHashTable, 0x64577982, 0x86d7, 0x11d1, 0xbd, 0xfc, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9); + +// {B0D17FC2-7BC4-11d1-BDFA-00C04FA31009} +DEFINE_GUID(CLSID_IFontCache, 0xb0d17fc2, 0x7bc4, 0x11d1, 0xbd, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9); + +// {B0D17FC4-7BC4-11d1-BDFA-00C04FA31009} +DEFINE_GUID(IID_IFontCache, 0xb0d17fc4, 0x7bc4, 0x11d1, 0xbd, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9); + +// {B0D17FC5-7BC4-11d1-BDFA-00C04FA31009} +DEFINE_GUID(IID_IFontCacheNotify, 0xb0d17fc5, 0x7bc4, 0x11d1, 0xbd, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9); + +// {35461E30-C488-11d1-960E-00C04FBD7C09} +DEFINE_GUID(CLSID_IMimeObjResolver, 0x35461e30, 0xc488, 0x11d1, 0x96, 0xe, 0x0, 0xc0, 0x4f, 0xbd, 0x7c, 0x9); + +// {FECEAFFD-C441-11d1-960E-00C04FBD7C09} +DEFINE_GUID(IID_IMimeObjResolver, 0xfeceaffd, 0xc441, 0x11d1, 0x96, 0xe, 0x0, 0xc0, 0x4f, 0xbd, 0x7c, 0x9); + +// {70183210-7b36-11d2-8c12-00c04fa31009} +DEFINE_GUID(IID_IMimeEditTag, 0x70183210, 0x7b36, 0x11d2, 0x8c, 0x12, 0x00, 0xc0, 0x4f, 0xa3, 0x10, 0x09); + +// {d09ee528-7b38-11d2-8c12-00c04fa31009} +DEFINE_GUID(IID_IMimeEditTagCollection, 0xd09ee528, 0x7b38, 0x11d2, 0x8c, 0x12, 0x00, 0xc0, 0x4f, 0xa3, 0x10, 0x09); + +#endif //_WIN32_OE + +// -------------------------------------------------------------------------------- +// Errors +// -------------------------------------------------------------------------------- +#ifndef FACILITY_INTERNET +#define FACILITY_INTERNET 12 +#endif +#ifndef HR_E +#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n) +#endif +#ifndef HR_S +#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n) +#endif +#ifndef HR_CODE +#define HR_CODE(hr) (INT)(hr & 0xffff) +#endif + +// -------------------------------------------------------------------------------- +// MIMEOLE Failure Return Values +// -------------------------------------------------------------------------------- +#define MIME_E_REG_CREATE_KEY HR_E(0xCE01) +#define MIME_E_REG_QUERY_INFO HR_E(0xCE02) +#define MIME_E_INVALID_ENCTYPE HR_E(0xCE03) +#define MIME_E_BOUNDARY_MISMATCH HR_E(0xCE04) +#define MIME_E_NOT_FOUND HR_E(0xCE05) +#define MIME_E_NO_DATA HR_E(0xCE05) +#define MIME_E_BUFFER_TOO_SMALL HR_E(0xCE06) +#define MIME_E_INVALID_ITEM_FLAGS HR_E(0xCE07) +#define MIME_E_ONE_LINE_ITEM HR_E(0xCE08) +#define MIME_E_INVALID_HANDLE HR_E(0xCE09) +#define MIME_E_CHARSET_TRANSLATE HR_E(0xCE0A) +#define MIME_E_NOT_INITIALIZED HR_E(0xCE0B) +#define MIME_E_NO_MORE_ROWS HR_E(0xCE0C) +#define MIME_E_ALREADY_BOUND HR_E(0xCE0D) +#define MIME_E_CANT_RESET_ROOT HR_E(0xCE0E) +#define MIME_E_INSERT_NOT_ALLOWED HR_E(0xCE0F) +#define MIME_E_BAD_BODY_LOCATION HR_E(0xCE10) +#define MIME_E_NOT_MULTIPART HR_E(0xCE11) +#define MIME_E_NO_MULTIPART_BOUNDARY HR_E(0xCE12) +#define MIME_E_CONVERT_NOT_NEEDED HR_E(0xCE13) +#define MIME_E_CANT_MOVE_BODY HR_E(0xCE14) +#define MIME_E_UNKNOWN_BODYTREE_VERSION HR_E(0xCE15) +#define MIME_E_NOTHING_TO_SAVE HR_E(0xCE16) +#define MIME_E_NEED_SAVE_MESSAGE HR_E(0xCE17) +#define MIME_E_NOTHING_TO_REVERT HR_E(0xCE18) +#define MIME_E_MSG_SIZE_DIFF HR_E(0xCE19) +#define MIME_E_CANT_RESET_PARENT HR_E(0xCE1A) +#define MIME_E_CORRUPT_CACHE_TREE HR_E(0xCE1B) +#define MIME_E_BODYTREE_OUT_OF_SYNC HR_E(0xCE1C) +#define MIME_E_INVALID_ENCODINGTYPE HR_E(0xCE1D) +#define MIME_E_MULTIPART_NO_DATA HR_E(0xCE1E) +#define MIME_E_INVALID_OPTION_VALUE HR_E(0xCE1F) +#define MIME_E_INVALID_OPTION_ID HR_E(0xCE20) +#define MIME_E_INVALID_HEADER_NAME HR_E(0xCE21) +#define MIME_E_NOT_BOUND HR_E(0xCE22) +#define MIME_E_MAX_SIZE_TOO_SMALL HR_E(0xCE23) +#define MIME_E_MULTIPART_HAS_CHILDREN HR_E(0xCE25) +#define MIME_E_INVALID_PROP_FLAGS HR_E(0xCE26) +#define MIME_E_INVALID_ADDRESS_TYPE HR_E(0xCE27) +#define MIME_E_INVALID_OBJECT_IID HR_E(0xCE28) +#define MIME_E_MLANG_DLL_NOT_FOUND HR_E(0xCE29) +#define MIME_E_ROOT_NOT_EMPTY HR_E(0xCE2A) +#define MIME_E_MLANG_BAD_DLL HR_E(0xCE2B) +#define MIME_E_REG_OPEN_KEY HR_E(0xCE2C) +#define MIME_E_INVALID_INET_DATE HR_E(0xCE2D) +#define MIME_E_INVALID_BODYTYPE HR_E(0xCE2E) +#define MIME_E_INVALID_DELETE_TYPE HR_E(0xCE2F) +#define MIME_E_OPTION_HAS_NO_VALUE HR_E(0xCE30) +#define MIME_E_INVALID_CHARSET_TYPE HR_E(0xCE31) +#define MIME_E_VARTYPE_NO_CONVERT HR_E(0xCE32) +#define MIME_E_INVALID_VARTYPE HR_E(0xCE33) +#define MIME_E_NO_MORE_ADDRESS_TYPES HR_E(0xCE34) +#define MIME_E_INVALID_ENCODING_TYPE HR_E(0xCE35) +#define MIME_S_ILLEGAL_LINES_FOUND HR_S(0xCE36) +#define MIME_S_MIME_VERSION HR_S(0xCE37) +#define MIME_E_INVALID_TEXT_TYPE HR_E(0xCE38) +#define MIME_E_READ_ONLY HR_E(0xCE39) +#define MIME_S_INVALID_MESSAGE HR_S(0xCE3A) +#define MIME_S_CHARSET_CONFLICT HR_S(0xCE3B) +#define MIME_E_UNSUPPORTED_VARTYPE HR_E(0xCE3C) +#define MIME_S_NO_CHARSET_CONVERT HR_S(0xCE3D) +#define MIME_E_URL_NOTFOUND HR_E(0xCE3E) +#define MIME_E_BAD_TEXT_DATA HR_E(0xCE3F) +#define MIME_E_NO_SIGNER HR_S(0xCE40) + +// --------------------------------------------------------------------------- +// MIMEOLE Security Error Return Values +// --------------------------------------------------------------------------- +#define MIME_E_SECURITY_NOTINIT HR_E(0xCEA0) +#define MIME_E_SECURITY_LOADCRYPT32 HR_E(0xCEA1) +#define MIME_E_SECURITY_BADPROCADDR HR_E(0xCEA2) +#define MIME_E_SECURITY_NODEFAULT HR_E(0xCEB0) +#define MIME_E_SECURITY_NOOP HR_E(0xCEB1) +#define MIME_S_SECURITY_NOOP HR_S(0xCEB1) +#define MIME_S_SECURITY_NONE HR_S(0xCEB2) +#define MIME_S_SECURITY_ERROROCCURED HR_S(0xCEB3) +#define MIME_E_SECURITY_USERCHOICE HR_E(0xCEB4) +#define MIME_E_SECURITY_UNKMSGTYPE HR_E(0xCEB5) +#define MIME_E_SECURITY_BADMESSAGE HR_E(0xCEB6) +#define MIME_E_SECURITY_BADCONTENT HR_E(0xCEB7) +#define MIME_E_SECURITY_BADSECURETYPE HR_E(0xCEB8) +#define MIME_E_SECURITY_CLASSNOTSUPPORTED HR_E(0xCEB9) +#define MIME_S_SECURITY_RECURSEONLY HR_S(0xCEBA) +#define MIME_E_SECURITY_BADSTORE HR_E(0xCED0) +#define MIME_S_SECURITY_NOCERT HR_S(0xCED1) +#define MIME_E_SECURITY_NOCERT HR_E(0xCED1) +#define MIME_E_SECURITY_CERTERROR HR_E(0xCED2) +#define MIME_S_SECURITY_CERTERROR HR_S(0xCED2) +#define MIME_S_SECURITY_NODEFCERT HR_S(0xCED3) +#define MIME_E_SECURITY_BADSIGNATURE HR_E(0xCEE0) +#define MIME_E_SECURITY_MULTSIGNERS HR_E(0xCEE1) +#define MIME_E_SECURITY_NOSIGNINGCERT HR_E(0xCEE2) +#define MIME_E_SECURITY_CANTDECRYPT HR_E(0xCEF0) +#define MIME_E_SECURITY_ENCRYPTNOSENDERCERT HR_E(0xCEF1) +#define MIME_S_SECURITY_NOSENDERCERT HR_S(0xCEF2) + +#if (_WIN32_OE >= 0x0500) +// -------------------------------------------------------------------------------- +// MIMEEDIT Failure Return Values +// -------------------------------------------------------------------------------- +#define MIMEEDIT_E_UNEXPECTED HR_E(0x1700) +#define MIMEEDIT_E_DODEFAULT HR_E(0x1701) +#define MIMEEDIT_E_LOADLIBRARYFAILURE HR_E(0x1702) +#define MIMEEDIT_E_USERCANCEL HR_E(0x1703) +#define MIMEEDIT_E_CHARSETNOTFOUND HR_E(0x1704) +#define MIMEEDIT_E_ILLEGALBODYFORMAT HR_E(0x1705) +#define MIMEEDIT_E_CANNOTSAVEUNTILPARSECOMPLETE HR_E(0x1706) +#define MIMEEDIT_E_CANNOTSAVEWHILESOURCEEDITING HR_E(0x1707) + +// -------------------------------------------------------------------------------- +// MIMEEDIT Success Return Values +// -------------------------------------------------------------------------------- +#define MIMEEDIT_S_OPENFILE HR_S(0x1750) +#define MIMEEDIT_S_SAVEFILE HR_S(0x1751) + +// -------------------------------------------------------------------------------- +// MIMEEDIT Warning Return Values +// -------------------------------------------------------------------------------- +#define MIMEEDIT_W_DOWNLOADNOTCOMPLETE HR_S(0x1760) +#define MIMEEDIT_W_BADURLSNOTATTACHED HR_S(0x1761) + +#endif //_WIN32_OE + +// -------------------------------------------------------------------------------- +// String Definition Macros +// -------------------------------------------------------------------------------- +#ifdef __cplusplus +#define EXTERN_C extern "C" +#else +#define EXTERN_C extern +#endif + +#ifndef STRCONSTA +#ifdef DEFINE_STRCONST +#define STRCONSTA(x,y) EXTERN_C const char x[] = y +#define STRCONSTW(x,y) EXTERN_C const WCHAR x[] = L##y +#else +#define STRCONSTA(x,y) EXTERN_C const char x[] +#define STRCONSTW(x,y) EXTERN_C const WCHAR x[] +#endif +#endif + +// -------------------------------------------------------------------------------- +// rfc822 Headers +// -------------------------------------------------------------------------------- +STRCONSTA(STR_HDR_FROM, "From"); +STRCONSTA(STR_HDR_TO, "To"); +STRCONSTA(STR_HDR_CC, "Cc"); +STRCONSTA(STR_HDR_BCC, "Bcc"); +STRCONSTA(STR_HDR_SENDER, "Sender"); +STRCONSTA(STR_HDR_REPLYTO, "Reply-To"); +STRCONSTA(STR_HDR_RETURNPATH, "Return-Path"); +STRCONSTA(STR_HDR_RR, "Rr"); +STRCONSTA(STR_HDR_RETRCPTTO, "Return-Receipt-To"); +STRCONSTA(STR_HDR_APPARTO, "Apparently-To"); +STRCONSTA(STR_HDR_DATE, "Date"); +STRCONSTA(STR_HDR_RECEIVED, "Received"); +STRCONSTA(STR_HDR_MESSAGEID, "Message-ID"); +STRCONSTA(STR_HDR_XMAILER, "X-Mailer"); +STRCONSTA(STR_HDR_ENCODING, "Encoding"); +STRCONSTA(STR_HDR_ENCRYPTED, "Encrypted"); +STRCONSTA(STR_HDR_COMMENT, "Comment"); +STRCONSTA(STR_HDR_SUBJECT, "Subject"); +STRCONSTA(STR_HDR_MIMEVER, "MIME-Version"); +STRCONSTA(STR_HDR_CNTTYPE, "Content-Type"); +STRCONSTA(STR_HDR_CNTXFER, "Content-Transfer-Encoding"); +STRCONSTA(STR_HDR_CNTID, "Content-ID"); +STRCONSTA(STR_HDR_CNTDESC, "Content-Description"); +STRCONSTA(STR_HDR_CNTDISP, "Content-Disposition"); +STRCONSTA(STR_HDR_CNTBASE, "Content-Base"); +STRCONSTA(STR_HDR_CNTLOC, "Content-Location"); +STRCONSTA(STR_HDR_NEWSGROUPS, "Newsgroups"); +STRCONSTA(STR_HDR_PATH, "Path"); +STRCONSTA(STR_HDR_FOLLOWUPTO, "Followup-To"); +STRCONSTA(STR_HDR_EXPIRES, "Expires"); +STRCONSTA(STR_HDR_REFS, "References"); +STRCONSTA(STR_HDR_CONTROL, "Control"); +STRCONSTA(STR_HDR_DISTRIB, "Distribution"); +STRCONSTA(STR_HDR_KEYWORDS, "Keywords"); +STRCONSTA(STR_HDR_SUMMARY, "Summary"); +STRCONSTA(STR_HDR_APPROVED, "Approved"); +STRCONSTA(STR_HDR_LINES, "Lines"); +STRCONSTA(STR_HDR_XREF, "Xref"); +STRCONSTA(STR_HDR_ORG, "Organization"); +STRCONSTA(STR_HDR_XNEWSRDR, "X-Newsreader"); +STRCONSTA(STR_HDR_XPRI, "X-Priority"); +STRCONSTA(STR_HDR_XMSPRI, "X-MSMail-Priority"); +STRCONSTA(STR_HDR_OFFSETS, "X-Offsets"); +STRCONSTA(STR_HDR_XUNSENT, "X-Unsent"); +STRCONSTA(STR_HDR_ARTICLEID, "X-ArticleId"); +STRCONSTA(STR_HDR_NEWSGROUP, "X-Newsgroup"); +STRCONSTA(STR_HDR_XVOICEMAIL, "X-VoiceMail"); + +// -------------------------------------------------------------------------------- +// Parameters Available through IMimePropertySet/IMimeBody +// -------------------------------------------------------------------------------- +STRCONSTA(STR_PAR_CHARSET, "par:content-type:charset"); +STRCONSTA(STR_PAR_NUMBER, "par:content-type:number"); +STRCONSTA(STR_PAR_TOTAL, "par:content-type:total"); +STRCONSTA(STR_PAR_ID, "par:content-type:id"); +STRCONSTA(STR_PAR_BOUNDARY, "par:content-type:boundary"); +STRCONSTA(STR_PAR_NAME, "par:content-type:name"); +STRCONSTA(STR_PAR_PROTOCOL, "par:content-type:protocol"); +STRCONSTA(STR_PAR_MICALG, "par:content-type:micalg"); +STRCONSTA(STR_PAR_FILENAME, "par:content-disposition:filename"); +STRCONSTA(STR_PAR_TYPE, "par:content-type:type"); +STRCONSTA(STR_PAR_START, "par:content-type:start"); +#if (_WIN32_OE >= 0x0500) +STRCONSTA(STR_PAR_ACCESSTYPE, "par:content-type:access-type"); +STRCONSTA(STR_PAR_XURL, "par:content-type:X-URL"); +STRCONSTA(STR_PAR_SIZE, "par:content-type:size"); +STRCONSTA(STR_PAR_SMIMETYPE, "par:content-type:smime-type"); +#endif + +// -------------------------------------------------------------------------------- +// Attributes Available through IMimePropertySet/IMimeBody +// -------------------------------------------------------------------------------- +STRCONSTA(STR_ATT_FILENAME, "att:filename"); +STRCONSTA(STR_ATT_GENFNAME, "att:generated-filename"); +STRCONSTA(STR_ATT_PRITYPE, "att:pri-content-type"); +STRCONSTA(STR_ATT_SUBTYPE, "att:sub-content-type"); +STRCONSTA(STR_ATT_NORMSUBJ, "att:normalized-subject"); +STRCONSTA(STR_ATT_ILLEGAL, "att:illegal-lines"); +STRCONSTA(STR_ATT_RENDERED, "att:rendered"); // VT_UI4 - TRUE or FALSE +STRCONSTA(STR_ATT_AUTOINLINED, "att:auto-inlined"); // VT_UI4 - TRUE or FALSE +STRCONSTA(STR_ATT_SENTTIME, "att:sent-time"); +STRCONSTA(STR_ATT_RECVTIME, "att:received-time"); +STRCONSTA(STR_ATT_PRIORITY, "att:priority"); +STRCONSTA(STR_ATT_SERVER, "att:athena-server"); // VT_LPSTR +#ifdef OE5_BETA2 +STRCONSTA(STR_ATT_ACCOUNTNAME, "att:athena-account-name"); // VT_LPSTR +#else +STRCONSTA(STR_ATT_ACCOUNT, "att:athena-account"); // VT_LPSTR +#endif +STRCONSTA(STR_ATT_UIDL, "att:athena-pop3-uidl"); // VT_LPSTR +STRCONSTA(STR_ATT_STOREMSGID, "att:athena-store-msgid"); // VT_UI4 +STRCONSTA(STR_ATT_USERNAME, "att:athena-user-name"); // VT_LPSTR +STRCONSTA(STR_ATT_FORWARDTO, "att:athena-forward-to"); // VT_LPSTR +STRCONSTA(STR_ATT_STOREFOLDERID, "att:athena-store-fdrid"); // VT_UI4 +STRCONSTA(STR_ATT_GHOSTED, "att:athena-ghosted"); // VT_I4 +STRCONSTA(STR_ATT_UNCACHEDSIZE, "att:athena-uncachedsize"); // VT_UI4 +STRCONSTA(STR_ATT_COMBINED, "att:athena-combined"); // VT_UI4 +#ifdef OE5_BETA2 +STRCONSTA(STR_ATT_ACCOUNTID, "att:athena-account-id"); // VT_LPSTR +#endif + +// -------------------------------------------------------------------------------- +// MIME Content Types +// -------------------------------------------------------------------------------- +STRCONSTA(STR_MIME_TEXT_PLAIN, "text/plain"); +STRCONSTA(STR_MIME_TEXT_HTML, "text/html"); +STRCONSTA(STR_MIME_APPL_STREAM, "application/octet-stream"); +STRCONSTA(STR_MIME_MPART_MIXED, "multipart/mixed"); +STRCONSTA(STR_MIME_MPART_ALT, "multipart/alternative"); +STRCONSTA(STR_MIME_MPART_RELATED, "multipart/related"); +STRCONSTA(STR_MIME_MSG_PART, "message/partial"); +STRCONSTA(STR_MIME_MSG_RFC822, "message/rfc822"); +STRCONSTA(STR_MIME_APPLY_MSTNEF, "application/ms-tnef"); +STRCONSTA(STR_MIME_APPL_PKCS7SIG, "application/x-pkcs7-signature"); +STRCONSTA(STR_MIME_APPL_PKCS7SIG_1, "application/pkcs7-signature"); +STRCONSTA(STR_MIME_TEXT_ENRCICHED, "text/enriched"); + +// -------------------------------------------------------------------------------- +// MIME Primary Content Types +// -------------------------------------------------------------------------------- +STRCONSTA(STR_CNT_TEXT, "text"); +STRCONSTA(STR_CNT_MULTIPART, "multipart"); +STRCONSTA(STR_CNT_MESSAGE, "message"); +STRCONSTA(STR_CNT_IMAGE, "image"); +STRCONSTA(STR_CNT_AUDIO, "audio"); +STRCONSTA(STR_CNT_VIDEO, "video"); +STRCONSTA(STR_CNT_APPLICATION, "application"); + +// -------------------------------------------------------------------------------- +// MIME Secondary Content Types +// -------------------------------------------------------------------------------- +STRCONSTA(STR_SUB_PLAIN, "plain"); +STRCONSTA(STR_SUB_HTML, "html"); +STRCONSTA(STR_SUB_ENRICHED, "enriched"); +STRCONSTA(STR_SUB_RTF, "ms-rtf"); +STRCONSTA(STR_SUB_MIXED, "mixed"); +STRCONSTA(STR_SUB_PARALLEL, "parallel"); +STRCONSTA(STR_SUB_DIGEST, "digest"); +STRCONSTA(STR_SUB_RELATED, "related"); +STRCONSTA(STR_SUB_ALTERNATIVE, "alternative"); +STRCONSTA(STR_SUB_RFC822, "rfc822"); +STRCONSTA(STR_SUB_PARTIAL, "partial"); +STRCONSTA(STR_SUB_EXTERNAL, "external-body"); +STRCONSTA(STR_SUB_OCTETSTREAM, "octet-stream"); +STRCONSTA(STR_SUB_POSTSCRIPT, "postscript"); +STRCONSTA(STR_SUB_GIF, "gif"); +STRCONSTA(STR_SUB_JPEG, "jpeg"); +STRCONSTA(STR_SUB_BASIC, "basic"); +STRCONSTA(STR_SUB_MPEG, "mpeg"); +STRCONSTA(STR_SUB_MSTNEF, "ms-tnef"); +STRCONSTA(STR_SUB_MSWORD, "msword"); +STRCONSTA(STR_SUB_WAV, "wav"); +STRCONSTA(STR_SUB_PKCS7MIME, "pkcs7-mime"); // non-standard +STRCONSTA(STR_SUB_PKCS7SIG, "pkcs7-signature"); // non-standard +STRCONSTA(STR_SUB_XPKCS7MIME, "x-pkcs7-mime"); +STRCONSTA(STR_SUB_XPKCS7SIG, "x-pkcs7-signature"); +STRCONSTA(STR_SUB_SIGNED, "signed"); +STRCONSTA(STR_SUB_BINHEX, "mac-binhex40"); +STRCONSTA(STR_SUB_VCARD, "x-vcard"); + +// -------------------------------------------------------------------------------- +// MIME Content-Transfer-Encoding Types +// -------------------------------------------------------------------------------- +STRCONSTA(STR_ENC_7BIT, "7bit"); +STRCONSTA(STR_ENC_QP, "quoted-printable"); +STRCONSTA(STR_ENC_BASE64, "base64"); +STRCONSTA(STR_ENC_8BIT, "8bit"); +STRCONSTA(STR_ENC_BINARY, "binary"); +STRCONSTA(STR_ENC_UUENCODE, "uuencode"); +STRCONSTA(STR_ENC_XUUENCODE, "x-uuencode"); +STRCONSTA(STR_ENC_XUUE, "x-uue"); +STRCONSTA(STR_ENC_BINHEX40, "mac-binhex40"); + +// -------------------------------------------------------------------------------- +// MIME Content-Disposition Types +// -------------------------------------------------------------------------------- +STRCONSTA(STR_DIS_INLINE, "inline"); +STRCONSTA(STR_DIS_ATTACHMENT, "attachment"); + +// -------------------------------------------------------------------------------- +// MIME Protocol Types +// -------------------------------------------------------------------------------- +STRCONSTA(STR_PRO_SHA1, "sha1"); +STRCONSTA(STR_PRO_MD5, "rsa-md5"); + +// -------------------------------------------------------------------------------- +// Known Priority Strings +// -------------------------------------------------------------------------------- +STRCONSTA(STR_PRI_MS_HIGH, "High"); +STRCONSTA(STR_PRI_MS_NORMAL, "Normal"); +STRCONSTA(STR_PRI_MS_LOW, "Low"); +STRCONSTA(STR_PRI_HIGH, "1"); +STRCONSTA(STR_PRI_NORMAL, "3"); +STRCONSTA(STR_PRI_LOW, "5"); + +// -------------------------------------------------------------------------------- +// IMimeMessage IDataObject clipboard formats (also include CF_TEXT) +// -------------------------------------------------------------------------------- +STRCONSTA(STR_CF_HTML, "HTML Format"); +STRCONSTA(STR_CF_INETMSG, "Internet Message (rfc822/rfc1522)"); +STRCONSTA(STR_CF_RFC822, "message/rfc822"); + +// -------------------------------------------------------------------------------- +// PIDSTRING - Use in GetProp, SetProp, QueryProp, DeleteProp +// -------------------------------------------------------------------------------- +#define PID_BASE 2 +#define PIDTOSTR(_dwPropId) ((LPCSTR)((DWORD_PTR)(_dwPropId))) +#define STRTOPID(_pszName) ((DWORD)((DWORD_PTR)((LPCSTR)(_pszName)))) +#define ISPIDSTR(_pszName) ((HIWORD((DWORD_PTR)(_pszName)) == 0)) +#define ISKNOWNPID(_dwPropId) (_dwPropId >= PID_BASE && _dwPropId < PID_LAST) + +// -------------------------------------------------------------------------------- +// Mime Property Ids +// -------------------------------------------------------------------------------- +typedef enum tagMIMEPROPID { + PID_HDR_NEWSGROUP = 2, + PID_HDR_NEWSGROUPS = 3, + PID_HDR_REFS = 4, + PID_HDR_SUBJECT = 5, + PID_HDR_FROM = 6, + PID_HDR_MESSAGEID = 7, + PID_HDR_RETURNPATH = 8, + PID_HDR_RR = 9, + PID_HDR_RETRCPTTO = 10, + PID_HDR_APPARTO = 11, + PID_HDR_DATE = 12, + PID_HDR_RECEIVED = 13, + PID_HDR_REPLYTO = 14, + PID_HDR_XMAILER = 15, + PID_HDR_BCC = 16, + PID_HDR_MIMEVER = 17, + PID_HDR_CNTTYPE = 18, + PID_HDR_CNTXFER = 19, + PID_HDR_CNTID = 20, + PID_HDR_CNTDESC = 21, + PID_HDR_CNTDISP = 22, + PID_HDR_CNTBASE = 23, + PID_HDR_CNTLOC = 24, + PID_HDR_TO = 25, + PID_HDR_PATH = 26, + PID_HDR_FOLLOWUPTO = 27, + PID_HDR_EXPIRES = 28, + PID_HDR_CC = 29, + PID_HDR_CONTROL = 30, + PID_HDR_DISTRIB = 31, + PID_HDR_KEYWORDS = 32, + PID_HDR_SUMMARY = 33, + PID_HDR_APPROVED = 34, + PID_HDR_LINES = 35, + PID_HDR_XREF = 36, + PID_HDR_ORG = 37, + PID_HDR_XNEWSRDR = 38, + PID_HDR_XPRI = 39, + PID_HDR_XMSPRI = 40, + PID_PAR_FILENAME = 41, + PID_PAR_BOUNDARY = 42, + PID_PAR_CHARSET = 43, + PID_PAR_NAME = 44, + PID_ATT_FILENAME = 45, + PID_ATT_GENFNAME = 46, + PID_ATT_PRITYPE = 47, + PID_ATT_SUBTYPE = 48, + PID_ATT_NORMSUBJ = 49, + PID_ATT_ILLEGAL = 50, + PID_ATT_RENDERED = 51, + PID_ATT_SENTTIME = 52, + PID_ATT_RECVTIME = 53, + PID_ATT_PRIORITY = 54, + PID_HDR_COMMENT = 55, + PID_HDR_ENCODING = 56, + PID_HDR_ENCRYPTED = 57, + PID_HDR_OFFSETS = 58, + PID_HDR_XUNSENT = 59, + PID_HDR_ARTICLEID = 60, + PID_HDR_SENDER = 61, + PID_ATT_SERVER = 62, +#ifdef OE5_BETA2 + PID_ATT_ACCOUNTID = 63, +#else + PID_ATT_ACCOUNT = 63, +#endif + PID_ATT_UIDL = 64, + PID_ATT_STOREMSGID = 65, + PID_ATT_USERNAME = 66, + PID_ATT_FORWARDTO = 67, + PID_ATT_STOREFOLDERID = 68, + PID_ATT_GHOSTED = 69, + PID_ATT_UNCACHEDSIZE = 70, + PID_ATT_COMBINED = 71, + PID_ATT_AUTOINLINED = 72, + PID_LAST = 73 +} MIMEPROPID; + +// -------------------------------------------------------------------------------- +// Variant Typed Identifiers +// -------------------------------------------------------------------------------- +#define TYPEDID_MASK ((ULONG)0x0000FFFF) +#define TYPEDID_TYPE(_typedid) (VARTYPE)(((ULONG)(_typedid)) & TYPEDID_MASK) +#define TYPEDID_ID(_typedid) (((ULONG)(_typedid))>>16) +#define TYPEDID(_vartype,_id) ((((TYPEDID)(_id))<<16)|((ULONG)(_vartype))) + +// -------------------------------------------------------------------------------- +// Options Ids +// -------------------------------------------------------------------------------- +#define OID_ALLOW_8BIT_HEADER TYPEDID(VT_BOOL, 0x0001) // TRUE or FALSE +#define OID_CBMAX_HEADER_LINE TYPEDID(VT_UI4, 0x0002) // Bytes +#define OID_SAVE_FORMAT TYPEDID(VT_UI4, 0x0003) // SAVE_RFC822 or SAVE_RFC1521 (mime) +#define OID_WRAP_BODY_TEXT TYPEDID(VT_BOOL, 0x0004) // TRUE or FALSE +#define OID_CBMAX_BODY_LINE TYPEDID(VT_UI4, 0x0005) // Bytes +#define OID_TRANSMIT_BODY_ENCODING TYPEDID(VT_UI4, 0x0006) // ENCODINGTYPE +#define OID_TRANSMIT_TEXT_ENCODING TYPEDID(VT_UI4, 0x0007) // ENCODINGTYPE, IMimeMessageTree +#define OID_GENERATE_MESSAGE_ID TYPEDID(VT_BOOL, 0x0008) // TRUE or FALSE +#define OID_HIDE_TNEF_ATTACHMENTS TYPEDID(VT_BOOL, 0X000E) // TRUE or FALSE +#define OID_CLEANUP_TREE_ON_SAVE TYPEDID(VT_BOOL, 0X000F) // TRUE or FALSE +#define OID_BODY_REMOVE_NBSP TYPEDID(VT_BOOL, 0x0014) // TRUE or FALSE +#define OID_DEFAULT_BODY_CHARSET TYPEDID(VT_UI4, 0x0015) // HCHARSET +#define OID_DEFAULT_HEADER_CHARSET TYPEDID(VT_UI4, 0x0016) // HCHARSET +#define OID_DBCS_ESCAPE_IS_8BIT TYPEDID(VT_BOOL, 0x0017) // TRUE or FALSE +#define OID_SECURITY_TYPE TYPEDID(VT_UI4, 0x0018) +#define OID_SECURITY_ALG_HASH TYPEDID(VT_BLOB, 0x0019) +#define OID_SECURITY_ALG_BULK TYPEDID(VT_BLOB, 0x0020) +#define OID_SECURITY_CERT_SIGNING TYPEDID(VT_UI4, 0x0021) +#define OID_SECURITY_CERT_DECRYPTION TYPEDID(VT_UI4, 0x0022) +#define OID_SECURITY_RG_CERT_ENCRYPT TYPEDID(VT_VECTOR | VT_UI4, 0x0023) +#define OID_SECURITY_HCERTSTORE TYPEDID(VT_UI4, 0x0024) +#define OID_SECURITY_RG_CERT_BAG TYPEDID(VT_VECTOR | VT_UI4, 0x0025) +#define OID_SECURITY_CRL TYPEDID(VT_BLOB, 0x0026) +#define OID_SECURITY_SEARCHSTORES TYPEDID(VT_VECTOR | VT_UI4, 0x0027) +#define OID_SECURITY_RG_IASN TYPEDID(VT_VECTOR | VT_UI4, 0x0028) +#define OID_SECURITY_SYMCAPS TYPEDID(VT_BLOB, 0x0029) +#define OID_SECURITY_AUTHATTR TYPEDID(VT_BLOB, 0x002A) +#define OID_SECURITY_UNAUTHATTR TYPEDID(VT_BLOB, 0x002B) +#define OID_SECURITY_SIGNTIME TYPEDID(VT_FILETIME,0x002C) +#define OID_SECURITY_USER_VALIDITY TYPEDID(VT_UI4, 0x002D) +#define OID_SECURITY_RO_MSG_VALIDITY TYPEDID(VT_UI4, 0x002E) // read-only +#define OID_SECURITY_HCRYPTPROV TYPEDID(VT_UI4, 0x002F) +#define OID_SECURITY_ENCODE_FLAGS TYPEDID(VT_UI4, 0x0030) +#define OID_SECURITY_CERT_INCLUDED TYPEDID(VT_BOOL, 0x0031) // read-only +#define OID_SECURITY_HWND_OWNER TYPEDID(VT_UI4, 0x0032) +#define OID_SECURITY_REQUESTED_CTE TYPEDID(VT_I4, 0x0033) +#define OID_NO_DEFAULT_CNTTYPE TYPEDID(VT_BOOL, 0x0034) +#define OID_XMIT_PLAIN_TEXT_ENCODING TYPEDID(VT_UI4, 0x0035) // ENCODINGTYPE, IMimeMessageTree +#define OID_XMIT_HTML_TEXT_ENCODING TYPEDID(VT_UI4, 0x0036) // ENCODINGTYPE, IMimeMessageTree +#define OID_HEADER_RELOAD_TYPE TYPEDID(VT_UI4, 0x0037) // RELOADTYPE IMimeMessageTree or IMimeBody or IMimePropertySet +#define OID_CAN_INLINE_TEXT_BODIES TYPEDID(VT_BOOL, 0x0038) // TRUE or FALSE +#define OID_SHOW_MACBINARY TYPEDID(VT_BOOL, 0x0039) // TRUE or FALSE +#define OID_SAVEBODY_KEEPBOUNDARY TYPEDID(VT_BOOL, 0x0040) // TRUE or FALSE +#if (_WIN32_OE >= 0x0500) +#define OID_SECURITY_ALG_HASH_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x0019) +#define OID_SECURITY_CERT_SIGNING_RG TYPEDID(VT_VECTOR | VT_UI4, 0x0021) +#define OID_SECURITY_SYMCAPS_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x0029) +#define OID_SECURITY_AUTHATTR_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x002A) +#define OID_SECURITY_UNAUTHATTR_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x002B) +#define OID_SECURITY_SIGNTIME_RG TYPEDID(VT_VECTOR | VT_FILETIME, 0x002C) +#define OID_SECURITY_USER_VALIDITY_RG TYPEDID(VT_VECTOR | VT_UI4, 0x002D) +#define OID_SECURITY_RO_MSG_VALIDITY_RG TYPEDID(VT_VECTOR | VT_UI4, 0x002E) // read-only +#define OID_SUPPORT_EXTERNAL_BODY TYPEDID(VT_BOOL, 0x0041) // TRUE or FALSE +#define OID_LOAD_USE_BIND_FILE TYPEDID(VT_BOOL, 0x0042) // TRUE or FALSE +#define OID_SECURITY_SIGNATURE_COUNT TYPEDID(VT_UI4, 0x0043) // Size of SECURITY LAYER arrays +#define OID_HANDSOFF_ONSAVE TYPEDID(VT_BOOL, 0x0044) // TRUE or FALSE +#define OID_SECURITY_RECEIPT TYPEDID(VT_BLOB, 0x0045) // Receipt body +#define OID_NOSECURITY_ONSAVE TYPEDID(VT_BOOL, 0x0046) // TRUE or FALSE +#define OID_DECODE_RFC1154 TYPEDID(VT_BOOL, 0x0047) // TRUE or FALSE +#endif + +// -------------------------------------------------------------------------------- +// Default Option Values +// -------------------------------------------------------------------------------- +#define DEF_ALLOW_8BIT_HEADER FALSE +#define DEF_CBMAX_HEADER_LINE 1000 +#define DEF_SAVE_FORMAT SAVE_RFC1521 +#define DEF_WRAP_BODY_TEXT TRUE +#define DEF_CBMAX_BODY_LINE 74 +#define DEF_GENERATE_MESSAGE_ID FALSE +#define DEF_HASH_ALG_ID 0x8004 //SHA //N needed? +#define DEF_ENCRYPTION_ALG_ID 0x6602 //RC2 //N needed? +#define DEF_INCLUDE_SENDER_CERT FALSE +#define DEF_HIDE_TNEF_ATTACHMENTS TRUE +#define DEF_CLEANUP_TREE_ON_SAVE TRUE +#define DEF_BODY_REMOVE_NBSP TRUE +#define DEF_SECURITY_IGNOREMASK 0 +#define DEF_DBCS_ESCAPE_IS_8BIT FALSE +#define DEF_TRANSMIT_BODY_ENCODING IET_UNKNOWN +#define DEF_TRANSMIT_TEXT_ENCODING IET_UNKNOWN +#define DEF_XMIT_PLAIN_TEXT_ENCODING IET_UNKNOWN +#define DEF_XMIT_HTML_TEXT_ENCODING IET_UNKNOWN +#define DEF_NO_DEFAULT_CNTTYPE FALSE +#define DEF_HEADER_RELOAD_TYPE_TREE RELOAD_HEADER_RESET +#define DEF_HEADER_RELOAD_TYPE_PROPSET RELOAD_HEADER_NONE +#define DEF_CAN_INLINE_TEXT_BODIES FALSE +#define DEF_SHOW_MACBINARY FALSE +#define DEF_SAVEBODY_KEEPBOUNDARY FALSE +#if (_WIN32_OE >= 0x0500) +#define DEF_SUPPORT_EXTERNAL_BODY FALSE +#define DEF_LOAD_USE_BIND_FILE FALSE +#define DEF_HANDSOFF_ONSAVE FALSE +#define DEF_DECODE_RFC1154 FALSE +#endif + +// -------------------------------------------------------------------------------- +// Min-Max Option Values +// -------------------------------------------------------------------------------- +#define MAX_CBMAX_HEADER_LINE 0xffffffff +#define MIN_CBMAX_HEADER_LINE 76 +#define MAX_CBMAX_BODY_LINE 0xffffffff +#define MIN_CBMAX_BODY_LINE 30 + +// -------------------------------------------------------------------------------- +// LIBID_MIMEOLE +// -------------------------------------------------------------------------------- + + +extern RPC_IF_HANDLE __MIDL_itf_mimeole_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mimeole_0000_v0_0_s_ifspec; + + +#ifndef __MIMEOLE_LIBRARY_DEFINED__ +#define __MIMEOLE_LIBRARY_DEFINED__ + +/* library MIMEOLE */ +/* [version][helpstring][uuid] */ + +struct HCHARSET__ + { + DWORD unused; + } ; +typedef const struct HCHARSET__ *HCHARSET; + +typedef HCHARSET *LPHCHARSET; + +struct HBODY__ + { + DWORD unused; + } ; +typedef const struct HBODY__ *HBODY; + +typedef HBODY *LPHBODY; + +struct HHEADERROW__ + { + DWORD unused; + } ; +typedef const struct HHEADERROW__ *HHEADERROW; + +typedef HHEADERROW *LPHHEADERROW; + +typedef DWORD TYPEDID; + +typedef const PROPVARIANT *LPCPROPVARIANT; + +typedef const BLOB *LPCBLOB; + +typedef +enum tagRELOADTYPE + { RELOAD_HEADER_NONE = 0, + RELOAD_HEADER_RESET = RELOAD_HEADER_NONE + 1, + RELOAD_HEADER_APPEND = RELOAD_HEADER_RESET + 1, + RELOAD_HEADER_REPLACE = RELOAD_HEADER_APPEND + 1 + } RELOADTYPE; + +typedef +enum tagMIMESAVETYPE + { SAVE_RFC822 = 0, + SAVE_RFC1521 = SAVE_RFC822 + 1 + } MIMESAVETYPE; + +typedef +enum tagCSETAPPLYTYPE + { CSET_APPLY_UNTAGGED = 0, + CSET_APPLY_ALL = CSET_APPLY_UNTAGGED + 1, + CSET_APPLY_TAG_ALL = CSET_APPLY_ALL + 1 + } CSETAPPLYTYPE; + +typedef +enum tagENCODINGTYPE + { IET_BINARY = 0, + IET_BASE64 = IET_BINARY + 1, + IET_UUENCODE = IET_BASE64 + 1, + IET_QP = IET_UUENCODE + 1, + IET_7BIT = IET_QP + 1, + IET_8BIT = IET_7BIT + 1, + IET_INETCSET = IET_8BIT + 1, + IET_UNICODE = IET_INETCSET + 1, + IET_RFC1522 = IET_UNICODE + 1, + IET_ENCODED = IET_RFC1522 + 1, + IET_CURRENT = IET_ENCODED + 1, + IET_UNKNOWN = IET_CURRENT + 1, + IET_BINHEX40 = IET_UNKNOWN + 1, + IET_LAST = IET_BINHEX40 + 1 + } ENCODINGTYPE; + +#define IET_DECODED ( IET_BINARY ) + +#define CCHMAX_HEADER_LINE ( 1000 ) + + +EXTERN_C const IID LIBID_MIMEOLE; + +#ifndef __IMimeInternational_INTERFACE_DEFINED__ +#define __IMimeInternational_INTERFACE_DEFINED__ + +/* interface IMimeInternational */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeInternational *LPMIMEINTERNATIONAL; + +typedef DWORD CODEPAGEID; + +#define CP_USASCII ( 1252 ) + +#define CP_UNICODE ( 1200 ) + +#define CP_JAUTODETECT ( 50932 ) + +#define CP_KAUTODETECT ( 50949 ) + +#define CP_ISO2022JPESC ( 50221 ) + +#define CP_ISO2022JPSIO ( 50222 ) + +#define CCHMAX_CSET_NAME ( 128 ) + +#define CCHMAX_LANG_NAME ( 128 ) + +#define CCHMAX_FACE_NAME ( 128 ) + +typedef struct tagINETCSETINFO + { + CHAR szName[ 128 ]; + HCHARSET hCharset; + CODEPAGEID cpiWindows; + CODEPAGEID cpiInternet; + DWORD dwReserved1; + } INETCSETINFO; + +typedef struct tagINETCSETINFO *LPINETCSETINFO; + +typedef +enum tagINETLANGMASK + { ILM_FAMILY = 0x1, + ILM_NAME = 0x2, + ILM_BODYCSET = 0x4, + ILM_HEADERCSET = 0x8, + ILM_WEBCSET = 0x10, + ILM_FIXEDFONT = 0x20, + ILM_VARIABLEFONT = 0x40 + } INETLANGMASK; + +typedef struct tagCODEPAGEINFO + { + DWORD dwMask; + CODEPAGEID cpiCodePage; + BOOL fIsValidCodePage; + ULONG ulMaxCharSize; + BOOL fInternetCP; + CODEPAGEID cpiFamily; + CHAR szName[ 128 ]; + CHAR szBodyCset[ 128 ]; + CHAR szHeaderCset[ 128 ]; + CHAR szWebCset[ 128 ]; + CHAR szFixedFont[ 128 ]; + CHAR szVariableFont[ 128 ]; + ENCODINGTYPE ietNewsDefault; + ENCODINGTYPE ietMailDefault; + DWORD dwReserved1; + } CODEPAGEINFO; + +typedef struct tagCODEPAGEINFO *LPCODEPAGEINFO; + +typedef struct tagRFC1522INFO + { + BOOL fRfc1522Allowed; + BOOL fRfc1522Used; + BOOL fAllow8bit; + HCHARSET hRfc1522Cset; + } RFC1522INFO; + +typedef struct tagRFC1522INFO *LPRFC1522INFO; + +typedef +enum tagCHARSETTYPE + { CHARSET_BODY = 0, + CHARSET_HEADER = CHARSET_BODY + 1, + CHARSET_WEB = CHARSET_HEADER + 1 + } CHARSETTYPE; + + +EXTERN_C const IID IID_IMimeInternational; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C5588349-7F86-11d0-8252-00C04FD85AB4") + IMimeInternational : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDefaultCharset( + /* [in] */ HCHARSET hCharset) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultCharset( + /* [out] */ LPHCHARSET phCharset) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCodePageCharset( + /* [in] */ CODEPAGEID cpiCodePage, + /* [in] */ CHARSETTYPE ctCsetType, + /* [out] */ LPHCHARSET phCharset) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindCharset( + /* [in] */ LPCSTR pszCharset, + /* [out] */ LPHCHARSET phCharset) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCharsetInfo( + /* [in] */ HCHARSET hCharset, + /* [out][in] */ LPINETCSETINFO pCsetInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCodePageInfo( + /* [in] */ CODEPAGEID cpiCodePage, + /* [out][in] */ LPCODEPAGEINFO pCodePageInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE CanConvertCodePages( + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest) = 0; + + virtual HRESULT STDMETHODCALLTYPE DecodeHeader( + /* [in] */ HCHARSET hCharset, + /* [in] */ LPCSTR pszData, + /* [out][in] */ LPPROPVARIANT pDecoded, + /* [out][in] */ LPRFC1522INFO pRfc1522Info) = 0; + + virtual HRESULT STDMETHODCALLTYPE EncodeHeader( + /* [in] */ HCHARSET hCharset, + /* [in] */ LPPROPVARIANT pData, + /* [out] */ LPSTR *ppszEncoded, + /* [out][in] */ LPRFC1522INFO pRfc1522Info) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConvertBuffer( + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPBLOB pIn, + /* [out][in] */ LPBLOB pOut, + /* [out] */ ULONG *pcbRead) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConvertString( + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPPROPVARIANT pIn, + /* [out][in] */ LPPROPVARIANT pOut) = 0; + + virtual HRESULT STDMETHODCALLTYPE MLANG_ConvertInetReset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE MLANG_ConvertInetString( + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPCSTR pSource, + /* [in] */ int *pnSizeOfSource, + /* [out] */ LPSTR pDestination, + /* [in] */ int *pnDstSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE Rfc1522Decode( + /* [in] */ LPCSTR pszValue, + /* [ref][in] */ LPSTR pszCharset, + /* [in] */ ULONG cchmax, + /* [out] */ LPSTR *ppszDecoded) = 0; + + virtual HRESULT STDMETHODCALLTYPE Rfc1522Encode( + /* [in] */ LPCSTR pszValue, + /* [in] */ HCHARSET hCharset, + /* [out] */ LPSTR *ppszEncoded) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeInternationalVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeInternational * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeInternational * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeInternational * This); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultCharset )( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultCharset )( + IMimeInternational * This, + /* [out] */ LPHCHARSET phCharset); + + HRESULT ( STDMETHODCALLTYPE *GetCodePageCharset )( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiCodePage, + /* [in] */ CHARSETTYPE ctCsetType, + /* [out] */ LPHCHARSET phCharset); + + HRESULT ( STDMETHODCALLTYPE *FindCharset )( + IMimeInternational * This, + /* [in] */ LPCSTR pszCharset, + /* [out] */ LPHCHARSET phCharset); + + HRESULT ( STDMETHODCALLTYPE *GetCharsetInfo )( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset, + /* [out][in] */ LPINETCSETINFO pCsetInfo); + + HRESULT ( STDMETHODCALLTYPE *GetCodePageInfo )( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiCodePage, + /* [out][in] */ LPCODEPAGEINFO pCodePageInfo); + + HRESULT ( STDMETHODCALLTYPE *CanConvertCodePages )( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest); + + HRESULT ( STDMETHODCALLTYPE *DecodeHeader )( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ LPCSTR pszData, + /* [out][in] */ LPPROPVARIANT pDecoded, + /* [out][in] */ LPRFC1522INFO pRfc1522Info); + + HRESULT ( STDMETHODCALLTYPE *EncodeHeader )( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ LPPROPVARIANT pData, + /* [out] */ LPSTR *ppszEncoded, + /* [out][in] */ LPRFC1522INFO pRfc1522Info); + + HRESULT ( STDMETHODCALLTYPE *ConvertBuffer )( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPBLOB pIn, + /* [out][in] */ LPBLOB pOut, + /* [out] */ ULONG *pcbRead); + + HRESULT ( STDMETHODCALLTYPE *ConvertString )( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPPROPVARIANT pIn, + /* [out][in] */ LPPROPVARIANT pOut); + + HRESULT ( STDMETHODCALLTYPE *MLANG_ConvertInetReset )( + IMimeInternational * This); + + HRESULT ( STDMETHODCALLTYPE *MLANG_ConvertInetString )( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPCSTR pSource, + /* [in] */ int *pnSizeOfSource, + /* [out] */ LPSTR pDestination, + /* [in] */ int *pnDstSize); + + HRESULT ( STDMETHODCALLTYPE *Rfc1522Decode )( + IMimeInternational * This, + /* [in] */ LPCSTR pszValue, + /* [ref][in] */ LPSTR pszCharset, + /* [in] */ ULONG cchmax, + /* [out] */ LPSTR *ppszDecoded); + + HRESULT ( STDMETHODCALLTYPE *Rfc1522Encode )( + IMimeInternational * This, + /* [in] */ LPCSTR pszValue, + /* [in] */ HCHARSET hCharset, + /* [out] */ LPSTR *ppszEncoded); + + END_INTERFACE + } IMimeInternationalVtbl; + + interface IMimeInternational + { + CONST_VTBL struct IMimeInternationalVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeInternational_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeInternational_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeInternational_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeInternational_SetDefaultCharset(This,hCharset) \ + (This)->lpVtbl -> SetDefaultCharset(This,hCharset) + +#define IMimeInternational_GetDefaultCharset(This,phCharset) \ + (This)->lpVtbl -> GetDefaultCharset(This,phCharset) + +#define IMimeInternational_GetCodePageCharset(This,cpiCodePage,ctCsetType,phCharset) \ + (This)->lpVtbl -> GetCodePageCharset(This,cpiCodePage,ctCsetType,phCharset) + +#define IMimeInternational_FindCharset(This,pszCharset,phCharset) \ + (This)->lpVtbl -> FindCharset(This,pszCharset,phCharset) + +#define IMimeInternational_GetCharsetInfo(This,hCharset,pCsetInfo) \ + (This)->lpVtbl -> GetCharsetInfo(This,hCharset,pCsetInfo) + +#define IMimeInternational_GetCodePageInfo(This,cpiCodePage,pCodePageInfo) \ + (This)->lpVtbl -> GetCodePageInfo(This,cpiCodePage,pCodePageInfo) + +#define IMimeInternational_CanConvertCodePages(This,cpiSource,cpiDest) \ + (This)->lpVtbl -> CanConvertCodePages(This,cpiSource,cpiDest) + +#define IMimeInternational_DecodeHeader(This,hCharset,pszData,pDecoded,pRfc1522Info) \ + (This)->lpVtbl -> DecodeHeader(This,hCharset,pszData,pDecoded,pRfc1522Info) + +#define IMimeInternational_EncodeHeader(This,hCharset,pData,ppszEncoded,pRfc1522Info) \ + (This)->lpVtbl -> EncodeHeader(This,hCharset,pData,ppszEncoded,pRfc1522Info) + +#define IMimeInternational_ConvertBuffer(This,cpiSource,cpiDest,pIn,pOut,pcbRead) \ + (This)->lpVtbl -> ConvertBuffer(This,cpiSource,cpiDest,pIn,pOut,pcbRead) + +#define IMimeInternational_ConvertString(This,cpiSource,cpiDest,pIn,pOut) \ + (This)->lpVtbl -> ConvertString(This,cpiSource,cpiDest,pIn,pOut) + +#define IMimeInternational_MLANG_ConvertInetReset(This) \ + (This)->lpVtbl -> MLANG_ConvertInetReset(This) + +#define IMimeInternational_MLANG_ConvertInetString(This,cpiSource,cpiDest,pSource,pnSizeOfSource,pDestination,pnDstSize) \ + (This)->lpVtbl -> MLANG_ConvertInetString(This,cpiSource,cpiDest,pSource,pnSizeOfSource,pDestination,pnDstSize) + +#define IMimeInternational_Rfc1522Decode(This,pszValue,pszCharset,cchmax,ppszDecoded) \ + (This)->lpVtbl -> Rfc1522Decode(This,pszValue,pszCharset,cchmax,ppszDecoded) + +#define IMimeInternational_Rfc1522Encode(This,pszValue,hCharset,ppszEncoded) \ + (This)->lpVtbl -> Rfc1522Encode(This,pszValue,hCharset,ppszEncoded) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeInternational_SetDefaultCharset_Proxy( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset); + + +void __RPC_STUB IMimeInternational_SetDefaultCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_GetDefaultCharset_Proxy( + IMimeInternational * This, + /* [out] */ LPHCHARSET phCharset); + + +void __RPC_STUB IMimeInternational_GetDefaultCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_GetCodePageCharset_Proxy( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiCodePage, + /* [in] */ CHARSETTYPE ctCsetType, + /* [out] */ LPHCHARSET phCharset); + + +void __RPC_STUB IMimeInternational_GetCodePageCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_FindCharset_Proxy( + IMimeInternational * This, + /* [in] */ LPCSTR pszCharset, + /* [out] */ LPHCHARSET phCharset); + + +void __RPC_STUB IMimeInternational_FindCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_GetCharsetInfo_Proxy( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset, + /* [out][in] */ LPINETCSETINFO pCsetInfo); + + +void __RPC_STUB IMimeInternational_GetCharsetInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_GetCodePageInfo_Proxy( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiCodePage, + /* [out][in] */ LPCODEPAGEINFO pCodePageInfo); + + +void __RPC_STUB IMimeInternational_GetCodePageInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_CanConvertCodePages_Proxy( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest); + + +void __RPC_STUB IMimeInternational_CanConvertCodePages_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_DecodeHeader_Proxy( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ LPCSTR pszData, + /* [out][in] */ LPPROPVARIANT pDecoded, + /* [out][in] */ LPRFC1522INFO pRfc1522Info); + + +void __RPC_STUB IMimeInternational_DecodeHeader_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_EncodeHeader_Proxy( + IMimeInternational * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ LPPROPVARIANT pData, + /* [out] */ LPSTR *ppszEncoded, + /* [out][in] */ LPRFC1522INFO pRfc1522Info); + + +void __RPC_STUB IMimeInternational_EncodeHeader_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_ConvertBuffer_Proxy( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPBLOB pIn, + /* [out][in] */ LPBLOB pOut, + /* [out] */ ULONG *pcbRead); + + +void __RPC_STUB IMimeInternational_ConvertBuffer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_ConvertString_Proxy( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPPROPVARIANT pIn, + /* [out][in] */ LPPROPVARIANT pOut); + + +void __RPC_STUB IMimeInternational_ConvertString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_MLANG_ConvertInetReset_Proxy( + IMimeInternational * This); + + +void __RPC_STUB IMimeInternational_MLANG_ConvertInetReset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_MLANG_ConvertInetString_Proxy( + IMimeInternational * This, + /* [in] */ CODEPAGEID cpiSource, + /* [in] */ CODEPAGEID cpiDest, + /* [in] */ LPCSTR pSource, + /* [in] */ int *pnSizeOfSource, + /* [out] */ LPSTR pDestination, + /* [in] */ int *pnDstSize); + + +void __RPC_STUB IMimeInternational_MLANG_ConvertInetString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_Rfc1522Decode_Proxy( + IMimeInternational * This, + /* [in] */ LPCSTR pszValue, + /* [ref][in] */ LPSTR pszCharset, + /* [in] */ ULONG cchmax, + /* [out] */ LPSTR *ppszDecoded); + + +void __RPC_STUB IMimeInternational_Rfc1522Decode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeInternational_Rfc1522Encode_Proxy( + IMimeInternational * This, + /* [in] */ LPCSTR pszValue, + /* [in] */ HCHARSET hCharset, + /* [out] */ LPSTR *ppszEncoded); + + +void __RPC_STUB IMimeInternational_Rfc1522Encode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeInternational_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeSecurity_INTERFACE_DEFINED__ +#define __IMimeSecurity_INTERFACE_DEFINED__ + +/* interface IMimeSecurity */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeSecurity *LPMIMESECURITY; + +typedef /* [unique] */ const IMimeSecurity *LPCMIMESECURITY; + +typedef BLOB THUMBBLOB; + +typedef void *HCAPICERTSTORE; + +#ifndef __WINCRYPT_H__ +typedef const void *PCX509CERT; + +typedef void *HCERTSTORE; + +#else +typedef PCCERT_CONTEXT PCX509CERT; +#endif +#ifndef IMS_ALGIDDEF +#define IMS_ALGIDDEF +typedef unsigned int ALG_ID; + +#endif +// ------------------------------------------------------------------- +// ITT_* - thumbprint types +// ------------------------------------------------------------------- +typedef DWORD ITHUMBPRINTTYPE; + +#define ITT_SIGNING 0x00000001 +#define ITT_ENCRYPTION 0x00000002 +// ------------------------------------------------------------------- +// SEF_* - Secure Encoding Flags +// must not overlap the EBF flags +// ------------------------------------------------------------------- +#define SEF_ENCRYPTWITHNOSENDERCERT 0x00000001 +#define SEF_SENDERSCERTPROVIDED 0x00000002 +#define SEF_MASK 0x0000ffff +// ------------------------------------------------------------------- +// EBF_* - Enchanted Broccoli Forest, also Encode Body Flags +// must not overlap the SEF flags +// ------------------------------------------------------------------- +#define EBF_RECURSE 0x00010000 +#define EBF_COMMITIFDIRTY 0x00020000 +#define EBF_MASK 0xffff0000 +// ------------------------------------------------------------------- +// MSV_* - MIME Security Validity +// ------------------------------------------------------------------- +#define MSV_OK 0x00000000 +#define MSV_BADSIGNATURE 0X00000001 +#define MSV_UNVERIFIABLE 0X00000002 +#define MSV_UNKHASH 0X00000004 +#define MSV_MALFORMEDSIG 0X00000080 +#define MSV_SIGNATURE_MASK 0X000000ff +#define MSV_EXPIRED_SIGNINGCERT 0X00000100 +#define MSV_SIGNING_MASK 0X00000f00 +#define MSV_CANTDECRYPT 0X00001000 +#define MSV_ENC_FOR_EXPIREDCERT 0X00002000 +#define MSV_ENCRYPT_MASK 0x000ff000 +#define MSV_INVALID 0X01000000 +#define MSV_MSG_MASK 0x0f000000 +// ------------------------------------------------------------------- +// MST_* - MIME Security Type +// ------------------------------------------------------------------- +#define MST_NONE 0x00000000 +#define MST_THIS_SIGN 0x00000001 +#define MST_THIS_ENCRYPT 0x00000002 +#define MST_THIS_BLOBSIGN 0x00000005 // MST_BLOB_FLAG|MST_THIS_SIGN +#define MST_CHILD_SIGN 0x00000100 +#define MST_CHILD_ENCRYPT 0x00000200 +#define MST_SUBMSG_SIGN 0x00001000 +#define MST_SUBMSG_ENCRYPT 0x00002000 +#define MST_THIS_MASK 0x000000ff +#define MST_CHILD_MASK 0x00000f00 +#define MST_SUBMSG_MASK 0x0000f000 +#define MST_DESCENDENT_MASK 0x0000ff00 //(MST_CHILD|MST_SUBMSG) +#define MST_SIGN_MASK 0x00001101 +#define MST_ENCRYPT_MASK 0x00002202 +#define MST_BLOB_FLAG 0x00000004 +#define MST_TYPE_MASK 0x0000ffff +#define MST_RECEIPT_REQUEST 0x00010000 +#define MST_CLASS_SMIME_V1 0x00000000 +#define MST_CLASS_PGP 0x01000000 +#define MST_CLASS_MASK 0xff000000 +typedef +enum tagCERTSTATE + { CERTIFICATE_OK = 0, + CERTIFICATE_NOT_PRESENT = CERTIFICATE_OK + 1, + CERTIFICATE_EXPIRED = CERTIFICATE_NOT_PRESENT + 1, + CERTIFICATE_CHAIN_TOO_LONG = CERTIFICATE_EXPIRED + 1, + CERTIFICATE_MISSING_ISSUER = CERTIFICATE_CHAIN_TOO_LONG + 1, + CERTIFICATE_CRL_LISTED = CERTIFICATE_MISSING_ISSUER + 1, + CERTIFICATE_NOT_TRUSTED = CERTIFICATE_CRL_LISTED + 1, + CERTIFICATE_INVALID = CERTIFICATE_NOT_TRUSTED + 1, + CERTIFICATE_ERROR = CERTIFICATE_INVALID + 1, + CERTIFICATE_NOPRINT = CERTIFICATE_ERROR + 1, + CERTIFICATE_UNKNOWN = CERTIFICATE_NOPRINT + 1 + } CERTSTATE; + +typedef +enum tagCERTNAMETYPE + { SIMPLE = 0, + OID = SIMPLE + 1, + X500 = OID + 1 + } CERTNAMETYPE; + +typedef +enum tagCERTDATAID + { CDID_EMAIL = 0, + CDID_MAX = CDID_EMAIL + 1 + } CERTDATAID; + +typedef struct tagX509CERTRESULT + { + DWORD cEntries; + CERTSTATE *rgcs; + PCX509CERT *rgpCert; + } X509CERTRESULT; + +typedef struct tagX509CERTRESULT *PX509CERTRESULT; + +typedef const X509CERTRESULT *PCX509CERTRESULT; + + +EXTERN_C const IID IID_IMimeSecurity; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C5588353-7F86-11d0-8252-00C04FD85AB4") + IMimeSecurity : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE InitNew( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckInit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE EncodeMessage( + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE EncodeBody( + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ HBODY hEncodeRoot, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE DecodeMessage( + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE DecodeBody( + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ HBODY hDecodeRoot, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumCertificates( + /* [in] */ HCAPICERTSTORE hc, + /* [in] */ DWORD dwUsage, + /* [in] */ PCX509CERT pPrev, + /* [out] */ PCX509CERT *ppCert) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCertificateName( + /* [in] */ const PCX509CERT pX509Cert, + /* [in] */ const CERTNAMETYPE cn, + /* [out] */ LPSTR *ppszName) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMessageType( + /* [in] */ const HWND hwndParent, + /* [in] */ IMimeBody *const pBody, + /* [out] */ DWORD *const pdwSecType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCertData( + /* [in] */ const PCX509CERT pX509Cert, + /* [in] */ const CERTDATAID dataid, + /* [ref][out] */ LPPROPVARIANT pValue) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeSecurityVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeSecurity * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeSecurity * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeSecurity * This); + + HRESULT ( STDMETHODCALLTYPE *InitNew )( + IMimeSecurity * This); + + HRESULT ( STDMETHODCALLTYPE *CheckInit )( + IMimeSecurity * This); + + HRESULT ( STDMETHODCALLTYPE *EncodeMessage )( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *EncodeBody )( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ HBODY hEncodeRoot, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *DecodeMessage )( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *DecodeBody )( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ HBODY hDecodeRoot, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *EnumCertificates )( + IMimeSecurity * This, + /* [in] */ HCAPICERTSTORE hc, + /* [in] */ DWORD dwUsage, + /* [in] */ PCX509CERT pPrev, + /* [out] */ PCX509CERT *ppCert); + + HRESULT ( STDMETHODCALLTYPE *GetCertificateName )( + IMimeSecurity * This, + /* [in] */ const PCX509CERT pX509Cert, + /* [in] */ const CERTNAMETYPE cn, + /* [out] */ LPSTR *ppszName); + + HRESULT ( STDMETHODCALLTYPE *GetMessageType )( + IMimeSecurity * This, + /* [in] */ const HWND hwndParent, + /* [in] */ IMimeBody *const pBody, + /* [out] */ DWORD *const pdwSecType); + + HRESULT ( STDMETHODCALLTYPE *GetCertData )( + IMimeSecurity * This, + /* [in] */ const PCX509CERT pX509Cert, + /* [in] */ const CERTDATAID dataid, + /* [ref][out] */ LPPROPVARIANT pValue); + + END_INTERFACE + } IMimeSecurityVtbl; + + interface IMimeSecurity + { + CONST_VTBL struct IMimeSecurityVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeSecurity_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeSecurity_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeSecurity_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeSecurity_InitNew(This) \ + (This)->lpVtbl -> InitNew(This) + +#define IMimeSecurity_CheckInit(This) \ + (This)->lpVtbl -> CheckInit(This) + +#define IMimeSecurity_EncodeMessage(This,pTree,dwFlags) \ + (This)->lpVtbl -> EncodeMessage(This,pTree,dwFlags) + +#define IMimeSecurity_EncodeBody(This,pTree,hEncodeRoot,dwFlags) \ + (This)->lpVtbl -> EncodeBody(This,pTree,hEncodeRoot,dwFlags) + +#define IMimeSecurity_DecodeMessage(This,pTree,dwFlags) \ + (This)->lpVtbl -> DecodeMessage(This,pTree,dwFlags) + +#define IMimeSecurity_DecodeBody(This,pTree,hDecodeRoot,dwFlags) \ + (This)->lpVtbl -> DecodeBody(This,pTree,hDecodeRoot,dwFlags) + +#define IMimeSecurity_EnumCertificates(This,hc,dwUsage,pPrev,ppCert) \ + (This)->lpVtbl -> EnumCertificates(This,hc,dwUsage,pPrev,ppCert) + +#define IMimeSecurity_GetCertificateName(This,pX509Cert,cn,ppszName) \ + (This)->lpVtbl -> GetCertificateName(This,pX509Cert,cn,ppszName) + +#define IMimeSecurity_GetMessageType(This,hwndParent,pBody,pdwSecType) \ + (This)->lpVtbl -> GetMessageType(This,hwndParent,pBody,pdwSecType) + +#define IMimeSecurity_GetCertData(This,pX509Cert,dataid,pValue) \ + (This)->lpVtbl -> GetCertData(This,pX509Cert,dataid,pValue) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_InitNew_Proxy( + IMimeSecurity * This); + + +void __RPC_STUB IMimeSecurity_InitNew_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_CheckInit_Proxy( + IMimeSecurity * This); + + +void __RPC_STUB IMimeSecurity_CheckInit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_EncodeMessage_Proxy( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeSecurity_EncodeMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_EncodeBody_Proxy( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ HBODY hEncodeRoot, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeSecurity_EncodeBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_DecodeMessage_Proxy( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeSecurity_DecodeMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_DecodeBody_Proxy( + IMimeSecurity * This, + /* [in] */ IMimeMessageTree *const pTree, + /* [in] */ HBODY hDecodeRoot, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeSecurity_DecodeBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_EnumCertificates_Proxy( + IMimeSecurity * This, + /* [in] */ HCAPICERTSTORE hc, + /* [in] */ DWORD dwUsage, + /* [in] */ PCX509CERT pPrev, + /* [out] */ PCX509CERT *ppCert); + + +void __RPC_STUB IMimeSecurity_EnumCertificates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_GetCertificateName_Proxy( + IMimeSecurity * This, + /* [in] */ const PCX509CERT pX509Cert, + /* [in] */ const CERTNAMETYPE cn, + /* [out] */ LPSTR *ppszName); + + +void __RPC_STUB IMimeSecurity_GetCertificateName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_GetMessageType_Proxy( + IMimeSecurity * This, + /* [in] */ const HWND hwndParent, + /* [in] */ IMimeBody *const pBody, + /* [out] */ DWORD *const pdwSecType); + + +void __RPC_STUB IMimeSecurity_GetMessageType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeSecurity_GetCertData_Proxy( + IMimeSecurity * This, + /* [in] */ const PCX509CERT pX509Cert, + /* [in] */ const CERTDATAID dataid, + /* [ref][out] */ LPPROPVARIANT pValue); + + +void __RPC_STUB IMimeSecurity_GetCertData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeSecurity_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeHeaderTable_INTERFACE_DEFINED__ +#define __IMimeHeaderTable_INTERFACE_DEFINED__ + +/* interface IMimeHeaderTable */ +/* [object][helpstring][uuid] */ + +typedef struct tagFINDHEADER + { + LPCSTR pszHeader; + DWORD dwReserved; + } FINDHEADER; + +typedef struct tagFINDHEADER *LPFINDHEADER; + +typedef struct tagHEADERROWINFO + { + DWORD dwRowNumber; + ULONG cboffStart; + ULONG cboffColon; + ULONG cboffEnd; + } HEADERROWINFO; + +typedef struct tagHEADERROWINFO *LPHEADERROWINFO; + +typedef +enum tagHEADERTABLEFLAGS + { HTF_NAMEINDATA = 0x1, + HTF_ENUMHANDLESONLY = 0x2 + } HEADERTABLEFLAGS; + + +EXTERN_C const IID IID_IMimeHeaderTable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FD853CD1-7F86-11d0-8252-00C04FD85AB4") + IMimeHeaderTable : public IPersistStream + { + public: + virtual HRESULT STDMETHODCALLTYPE FindFirstRow( + /* [in] */ LPFINDHEADER pFindHeader, + /* [out] */ LPHHEADERROW phRow) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindNextRow( + /* [in] */ LPFINDHEADER pFindHeader, + /* [out] */ LPHHEADERROW phRow) = 0; + + virtual HRESULT STDMETHODCALLTYPE CountRows( + /* [in] */ LPCSTR pszHeader, + /* [out] */ ULONG *pcRows) = 0; + + virtual HRESULT STDMETHODCALLTYPE AppendRow( + /* [in] */ LPCSTR pszHeader, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCSTR pszData, + /* [in] */ ULONG cchData, + /* [out] */ LPHHEADERROW phRow) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteRow( + /* [in] */ HHEADERROW hRow) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRowData( + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwFlags, + /* [out] */ LPSTR *ppszData, + /* [out] */ ULONG *pcchData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRowData( + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCSTR pszData, + /* [in] */ ULONG cchData) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRowInfo( + /* [in] */ HHEADERROW hRow, + /* [out][in] */ LPHEADERROWINFO pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRowNumber( + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwRowNumber) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumRows( + /* [in] */ LPCSTR pszHeader, + /* [in] */ DWORD dwFlags, + /* [out] */ IMimeEnumHeaderRows **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMimeHeaderTable **ppTable) = 0; + + virtual HRESULT STDMETHODCALLTYPE BindToObject( + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeHeaderTableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeHeaderTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeHeaderTable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeHeaderTable * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMimeHeaderTable * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *IsDirty )( + IMimeHeaderTable * This); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IMimeHeaderTable * This, + /* [unique][in] */ IStream *pStm); + + HRESULT ( STDMETHODCALLTYPE *Save )( + IMimeHeaderTable * This, + /* [unique][in] */ IStream *pStm, + /* [in] */ BOOL fClearDirty); + + HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( + IMimeHeaderTable * This, + /* [out] */ ULARGE_INTEGER *pcbSize); + + HRESULT ( STDMETHODCALLTYPE *FindFirstRow )( + IMimeHeaderTable * This, + /* [in] */ LPFINDHEADER pFindHeader, + /* [out] */ LPHHEADERROW phRow); + + HRESULT ( STDMETHODCALLTYPE *FindNextRow )( + IMimeHeaderTable * This, + /* [in] */ LPFINDHEADER pFindHeader, + /* [out] */ LPHHEADERROW phRow); + + HRESULT ( STDMETHODCALLTYPE *CountRows )( + IMimeHeaderTable * This, + /* [in] */ LPCSTR pszHeader, + /* [out] */ ULONG *pcRows); + + HRESULT ( STDMETHODCALLTYPE *AppendRow )( + IMimeHeaderTable * This, + /* [in] */ LPCSTR pszHeader, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCSTR pszData, + /* [in] */ ULONG cchData, + /* [out] */ LPHHEADERROW phRow); + + HRESULT ( STDMETHODCALLTYPE *DeleteRow )( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow); + + HRESULT ( STDMETHODCALLTYPE *GetRowData )( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwFlags, + /* [out] */ LPSTR *ppszData, + /* [out] */ ULONG *pcchData); + + HRESULT ( STDMETHODCALLTYPE *SetRowData )( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCSTR pszData, + /* [in] */ ULONG cchData); + + HRESULT ( STDMETHODCALLTYPE *GetRowInfo )( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [out][in] */ LPHEADERROWINFO pInfo); + + HRESULT ( STDMETHODCALLTYPE *SetRowNumber )( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwRowNumber); + + HRESULT ( STDMETHODCALLTYPE *EnumRows )( + IMimeHeaderTable * This, + /* [in] */ LPCSTR pszHeader, + /* [in] */ DWORD dwFlags, + /* [out] */ IMimeEnumHeaderRows **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimeHeaderTable * This, + /* [out] */ IMimeHeaderTable **ppTable); + + HRESULT ( STDMETHODCALLTYPE *BindToObject )( + IMimeHeaderTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + END_INTERFACE + } IMimeHeaderTableVtbl; + + interface IMimeHeaderTable + { + CONST_VTBL struct IMimeHeaderTableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeHeaderTable_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeHeaderTable_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeHeaderTable_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeHeaderTable_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMimeHeaderTable_IsDirty(This) \ + (This)->lpVtbl -> IsDirty(This) + +#define IMimeHeaderTable_Load(This,pStm) \ + (This)->lpVtbl -> Load(This,pStm) + +#define IMimeHeaderTable_Save(This,pStm,fClearDirty) \ + (This)->lpVtbl -> Save(This,pStm,fClearDirty) + +#define IMimeHeaderTable_GetSizeMax(This,pcbSize) \ + (This)->lpVtbl -> GetSizeMax(This,pcbSize) + + +#define IMimeHeaderTable_FindFirstRow(This,pFindHeader,phRow) \ + (This)->lpVtbl -> FindFirstRow(This,pFindHeader,phRow) + +#define IMimeHeaderTable_FindNextRow(This,pFindHeader,phRow) \ + (This)->lpVtbl -> FindNextRow(This,pFindHeader,phRow) + +#define IMimeHeaderTable_CountRows(This,pszHeader,pcRows) \ + (This)->lpVtbl -> CountRows(This,pszHeader,pcRows) + +#define IMimeHeaderTable_AppendRow(This,pszHeader,dwFlags,pszData,cchData,phRow) \ + (This)->lpVtbl -> AppendRow(This,pszHeader,dwFlags,pszData,cchData,phRow) + +#define IMimeHeaderTable_DeleteRow(This,hRow) \ + (This)->lpVtbl -> DeleteRow(This,hRow) + +#define IMimeHeaderTable_GetRowData(This,hRow,dwFlags,ppszData,pcchData) \ + (This)->lpVtbl -> GetRowData(This,hRow,dwFlags,ppszData,pcchData) + +#define IMimeHeaderTable_SetRowData(This,hRow,dwFlags,pszData,cchData) \ + (This)->lpVtbl -> SetRowData(This,hRow,dwFlags,pszData,cchData) + +#define IMimeHeaderTable_GetRowInfo(This,hRow,pInfo) \ + (This)->lpVtbl -> GetRowInfo(This,hRow,pInfo) + +#define IMimeHeaderTable_SetRowNumber(This,hRow,dwRowNumber) \ + (This)->lpVtbl -> SetRowNumber(This,hRow,dwRowNumber) + +#define IMimeHeaderTable_EnumRows(This,pszHeader,dwFlags,ppEnum) \ + (This)->lpVtbl -> EnumRows(This,pszHeader,dwFlags,ppEnum) + +#define IMimeHeaderTable_Clone(This,ppTable) \ + (This)->lpVtbl -> Clone(This,ppTable) + +#define IMimeHeaderTable_BindToObject(This,riid,ppvObject) \ + (This)->lpVtbl -> BindToObject(This,riid,ppvObject) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_FindFirstRow_Proxy( + IMimeHeaderTable * This, + /* [in] */ LPFINDHEADER pFindHeader, + /* [out] */ LPHHEADERROW phRow); + + +void __RPC_STUB IMimeHeaderTable_FindFirstRow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_FindNextRow_Proxy( + IMimeHeaderTable * This, + /* [in] */ LPFINDHEADER pFindHeader, + /* [out] */ LPHHEADERROW phRow); + + +void __RPC_STUB IMimeHeaderTable_FindNextRow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_CountRows_Proxy( + IMimeHeaderTable * This, + /* [in] */ LPCSTR pszHeader, + /* [out] */ ULONG *pcRows); + + +void __RPC_STUB IMimeHeaderTable_CountRows_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_AppendRow_Proxy( + IMimeHeaderTable * This, + /* [in] */ LPCSTR pszHeader, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCSTR pszData, + /* [in] */ ULONG cchData, + /* [out] */ LPHHEADERROW phRow); + + +void __RPC_STUB IMimeHeaderTable_AppendRow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_DeleteRow_Proxy( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow); + + +void __RPC_STUB IMimeHeaderTable_DeleteRow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_GetRowData_Proxy( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwFlags, + /* [out] */ LPSTR *ppszData, + /* [out] */ ULONG *pcchData); + + +void __RPC_STUB IMimeHeaderTable_GetRowData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_SetRowData_Proxy( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCSTR pszData, + /* [in] */ ULONG cchData); + + +void __RPC_STUB IMimeHeaderTable_SetRowData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_GetRowInfo_Proxy( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [out][in] */ LPHEADERROWINFO pInfo); + + +void __RPC_STUB IMimeHeaderTable_GetRowInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_SetRowNumber_Proxy( + IMimeHeaderTable * This, + /* [in] */ HHEADERROW hRow, + /* [in] */ DWORD dwRowNumber); + + +void __RPC_STUB IMimeHeaderTable_SetRowNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_EnumRows_Proxy( + IMimeHeaderTable * This, + /* [in] */ LPCSTR pszHeader, + /* [in] */ DWORD dwFlags, + /* [out] */ IMimeEnumHeaderRows **ppEnum); + + +void __RPC_STUB IMimeHeaderTable_EnumRows_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_Clone_Proxy( + IMimeHeaderTable * This, + /* [out] */ IMimeHeaderTable **ppTable); + + +void __RPC_STUB IMimeHeaderTable_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeHeaderTable_BindToObject_Proxy( + IMimeHeaderTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + +void __RPC_STUB IMimeHeaderTable_BindToObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeHeaderTable_INTERFACE_DEFINED__ */ + + +#ifndef __IMimePropertySchema_INTERFACE_DEFINED__ +#define __IMimePropertySchema_INTERFACE_DEFINED__ + +/* interface IMimePropertySchema */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimePropertySchema *LPMIMEPROPERTYSCHEMA; + +typedef +enum tagMIMEPROPFLAGS + { MPF_INETCSET = 0x1, + MPF_RFC1522 = 0x2, + MPF_ADDRESS = 0x4, + MPF_HASPARAMS = 0x8, + MPF_MIME = 0x10, + MPF_READONLY = 0x20 + } MIMEPROPFLAGS; + + +EXTERN_C const IID IID_IMimePropertySchema; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FD853CEC-7F86-11d0-8252-00C04FD85AB4") + IMimePropertySchema : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE RegisterProperty( + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwRowNumber, + /* [in] */ VARTYPE vtDefault, + /* [out] */ LPDWORD pdwPropId) = 0; + + virtual HRESULT STDMETHODCALLTYPE ModifyProperty( + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwRowNumber, + /* [in] */ VARTYPE vtDefault) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPropertyId( + /* [in] */ LPCSTR pszName, + /* [out] */ LPDWORD pdwPropId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPropertyName( + /* [in] */ DWORD dwPropId, + /* [out] */ LPSTR *ppszName) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterAddressType( + /* [in] */ LPCSTR pszName, + /* [out] */ LPDWORD pdwAdrType) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimePropertySchemaVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimePropertySchema * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimePropertySchema * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimePropertySchema * This); + + HRESULT ( STDMETHODCALLTYPE *RegisterProperty )( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwRowNumber, + /* [in] */ VARTYPE vtDefault, + /* [out] */ LPDWORD pdwPropId); + + HRESULT ( STDMETHODCALLTYPE *ModifyProperty )( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwRowNumber, + /* [in] */ VARTYPE vtDefault); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyId )( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [out] */ LPDWORD pdwPropId); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyName )( + IMimePropertySchema * This, + /* [in] */ DWORD dwPropId, + /* [out] */ LPSTR *ppszName); + + HRESULT ( STDMETHODCALLTYPE *RegisterAddressType )( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [out] */ LPDWORD pdwAdrType); + + END_INTERFACE + } IMimePropertySchemaVtbl; + + interface IMimePropertySchema + { + CONST_VTBL struct IMimePropertySchemaVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimePropertySchema_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimePropertySchema_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimePropertySchema_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimePropertySchema_RegisterProperty(This,pszName,dwFlags,dwRowNumber,vtDefault,pdwPropId) \ + (This)->lpVtbl -> RegisterProperty(This,pszName,dwFlags,dwRowNumber,vtDefault,pdwPropId) + +#define IMimePropertySchema_ModifyProperty(This,pszName,dwFlags,dwRowNumber,vtDefault) \ + (This)->lpVtbl -> ModifyProperty(This,pszName,dwFlags,dwRowNumber,vtDefault) + +#define IMimePropertySchema_GetPropertyId(This,pszName,pdwPropId) \ + (This)->lpVtbl -> GetPropertyId(This,pszName,pdwPropId) + +#define IMimePropertySchema_GetPropertyName(This,dwPropId,ppszName) \ + (This)->lpVtbl -> GetPropertyName(This,dwPropId,ppszName) + +#define IMimePropertySchema_RegisterAddressType(This,pszName,pdwAdrType) \ + (This)->lpVtbl -> RegisterAddressType(This,pszName,pdwAdrType) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimePropertySchema_RegisterProperty_Proxy( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwRowNumber, + /* [in] */ VARTYPE vtDefault, + /* [out] */ LPDWORD pdwPropId); + + +void __RPC_STUB IMimePropertySchema_RegisterProperty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySchema_ModifyProperty_Proxy( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwRowNumber, + /* [in] */ VARTYPE vtDefault); + + +void __RPC_STUB IMimePropertySchema_ModifyProperty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySchema_GetPropertyId_Proxy( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [out] */ LPDWORD pdwPropId); + + +void __RPC_STUB IMimePropertySchema_GetPropertyId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySchema_GetPropertyName_Proxy( + IMimePropertySchema * This, + /* [in] */ DWORD dwPropId, + /* [out] */ LPSTR *ppszName); + + +void __RPC_STUB IMimePropertySchema_GetPropertyName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySchema_RegisterAddressType_Proxy( + IMimePropertySchema * This, + /* [in] */ LPCSTR pszName, + /* [out] */ LPDWORD pdwAdrType); + + +void __RPC_STUB IMimePropertySchema_RegisterAddressType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimePropertySchema_INTERFACE_DEFINED__ */ + + +#ifndef __IMimePropertySet_INTERFACE_DEFINED__ +#define __IMimePropertySet_INTERFACE_DEFINED__ + +/* interface IMimePropertySet */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimePropertySet *LPMIMEPROPERTYSET; + +#define PDF_ENCODED 0x00000001 +#define PDF_NAMEINDATA 0x00000002 +#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED) +#define PDF_NOCOMMENTS 0x00000008 +#define PDF_SAVENOENCODE 0x00000010 +#define PDF_VECTOR 0x00000020 +typedef struct tagMIMEPARAMINFO + { + LPSTR pszName; + LPSTR pszData; + } MIMEPARAMINFO; + +typedef struct tagMIMEPARAMINFO *LPMIMEPARAMINFO; + +typedef +enum tagPROPINFOMASK + { PIM_CHARSET = 0x1, + PIM_ENCODINGTYPE = 0x2, + PIM_ROWNUMBER = 0x4, + PIM_FLAGS = 0x8, + PIM_PROPID = 0x10, + PIM_VALUES = 0x20, + PIM_VTDEFAULT = 0x40, + PIM_VTCURRENT = 0x80 + } PROPINFOMASK; + +typedef struct tagMIMEPROPINFO + { + DWORD dwMask; + HCHARSET hCharset; + ENCODINGTYPE ietEncoding; + DWORD dwRowNumber; + DWORD dwFlags; + DWORD dwPropId; + DWORD cValues; + VARTYPE vtDefault; + VARTYPE vtCurrent; + } MIMEPROPINFO; + +typedef struct tagMIMEPROPINFO *LPMIMEPROPINFO; + +typedef const MIMEPROPINFO *LPCMIMEPROPINFO; + +#define EPF_NONAME 0x00000001 + +EXTERN_C const IID IID_IMimePropertySet; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FD853CD3-7F86-11d0-8252-00C04FD85AB4") + IMimePropertySet : public IPersistStreamInit + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPropInfo( + /* [in] */ LPCSTR pszName, + /* [out][in] */ LPMIMEPROPINFO pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPropInfo( + /* [in] */ LPCSTR pszName, + /* [in] */ LPCMIMEPROPINFO pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetProp( + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProp( + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE AppendProp( + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteProp( + /* [in] */ LPCSTR pszName) = 0; + + virtual HRESULT STDMETHODCALLTYPE CopyProps( + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet) = 0; + + virtual HRESULT STDMETHODCALLTYPE MoveProps( + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteExcept( + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryProp( + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCharset( + /* [out] */ LPHCHARSET phCharset) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCharset( + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParameters( + /* [in] */ LPCSTR pszName, + /* [out] */ ULONG *pcParams, + /* [out] */ LPMIMEPARAMINFO *pprgParam) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsContentType( + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType) = 0; + + virtual HRESULT STDMETHODCALLTYPE BindToObject( + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMimePropertySet **ppPropertySet) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOption( + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOption( + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumProps( + /* [in] */ DWORD dwFlags, + /* [out] */ IMimeEnumProperties **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimePropertySetVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimePropertySet * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimePropertySet * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimePropertySet * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMimePropertySet * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *IsDirty )( + IMimePropertySet * This); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IMimePropertySet * This, + /* [in] */ LPSTREAM pStm); + + HRESULT ( STDMETHODCALLTYPE *Save )( + IMimePropertySet * This, + /* [in] */ LPSTREAM pStm, + /* [in] */ BOOL fClearDirty); + + HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( + IMimePropertySet * This, + /* [out] */ ULARGE_INTEGER *pCbSize); + + HRESULT ( STDMETHODCALLTYPE *InitNew )( + IMimePropertySet * This); + + HRESULT ( STDMETHODCALLTYPE *GetPropInfo )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [out][in] */ LPMIMEPROPINFO pInfo); + + HRESULT ( STDMETHODCALLTYPE *SetPropInfo )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCMIMEPROPINFO pInfo); + + HRESULT ( STDMETHODCALLTYPE *GetProp )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *SetProp )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *AppendProp )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *DeleteProp )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName); + + HRESULT ( STDMETHODCALLTYPE *CopyProps )( + IMimePropertySet * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet); + + HRESULT ( STDMETHODCALLTYPE *MoveProps )( + IMimePropertySet * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet); + + HRESULT ( STDMETHODCALLTYPE *DeleteExcept )( + IMimePropertySet * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName); + + HRESULT ( STDMETHODCALLTYPE *QueryProp )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + HRESULT ( STDMETHODCALLTYPE *GetCharset )( + IMimePropertySet * This, + /* [out] */ LPHCHARSET phCharset); + + HRESULT ( STDMETHODCALLTYPE *SetCharset )( + IMimePropertySet * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype); + + HRESULT ( STDMETHODCALLTYPE *GetParameters )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [out] */ ULONG *pcParams, + /* [out] */ LPMIMEPARAMINFO *pprgParam); + + HRESULT ( STDMETHODCALLTYPE *IsContentType )( + IMimePropertySet * This, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType); + + HRESULT ( STDMETHODCALLTYPE *BindToObject )( + IMimePropertySet * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimePropertySet * This, + /* [out] */ IMimePropertySet **ppPropertySet); + + HRESULT ( STDMETHODCALLTYPE *SetOption )( + IMimePropertySet * This, + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *GetOption )( + IMimePropertySet * This, + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *EnumProps )( + IMimePropertySet * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IMimeEnumProperties **ppEnum); + + END_INTERFACE + } IMimePropertySetVtbl; + + interface IMimePropertySet + { + CONST_VTBL struct IMimePropertySetVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimePropertySet_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimePropertySet_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimePropertySet_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimePropertySet_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMimePropertySet_IsDirty(This) \ + (This)->lpVtbl -> IsDirty(This) + +#define IMimePropertySet_Load(This,pStm) \ + (This)->lpVtbl -> Load(This,pStm) + +#define IMimePropertySet_Save(This,pStm,fClearDirty) \ + (This)->lpVtbl -> Save(This,pStm,fClearDirty) + +#define IMimePropertySet_GetSizeMax(This,pCbSize) \ + (This)->lpVtbl -> GetSizeMax(This,pCbSize) + +#define IMimePropertySet_InitNew(This) \ + (This)->lpVtbl -> InitNew(This) + + +#define IMimePropertySet_GetPropInfo(This,pszName,pInfo) \ + (This)->lpVtbl -> GetPropInfo(This,pszName,pInfo) + +#define IMimePropertySet_SetPropInfo(This,pszName,pInfo) \ + (This)->lpVtbl -> SetPropInfo(This,pszName,pInfo) + +#define IMimePropertySet_GetProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> GetProp(This,pszName,dwFlags,pValue) + +#define IMimePropertySet_SetProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> SetProp(This,pszName,dwFlags,pValue) + +#define IMimePropertySet_AppendProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> AppendProp(This,pszName,dwFlags,pValue) + +#define IMimePropertySet_DeleteProp(This,pszName) \ + (This)->lpVtbl -> DeleteProp(This,pszName) + +#define IMimePropertySet_CopyProps(This,cNames,prgszName,pPropertySet) \ + (This)->lpVtbl -> CopyProps(This,cNames,prgszName,pPropertySet) + +#define IMimePropertySet_MoveProps(This,cNames,prgszName,pPropertySet) \ + (This)->lpVtbl -> MoveProps(This,cNames,prgszName,pPropertySet) + +#define IMimePropertySet_DeleteExcept(This,cNames,prgszName) \ + (This)->lpVtbl -> DeleteExcept(This,cNames,prgszName) + +#define IMimePropertySet_QueryProp(This,pszName,pszCriteria,fSubString,fCaseSensitive) \ + (This)->lpVtbl -> QueryProp(This,pszName,pszCriteria,fSubString,fCaseSensitive) + +#define IMimePropertySet_GetCharset(This,phCharset) \ + (This)->lpVtbl -> GetCharset(This,phCharset) + +#define IMimePropertySet_SetCharset(This,hCharset,applytype) \ + (This)->lpVtbl -> SetCharset(This,hCharset,applytype) + +#define IMimePropertySet_GetParameters(This,pszName,pcParams,pprgParam) \ + (This)->lpVtbl -> GetParameters(This,pszName,pcParams,pprgParam) + +#define IMimePropertySet_IsContentType(This,pszPriType,pszSubType) \ + (This)->lpVtbl -> IsContentType(This,pszPriType,pszSubType) + +#define IMimePropertySet_BindToObject(This,riid,ppvObject) \ + (This)->lpVtbl -> BindToObject(This,riid,ppvObject) + +#define IMimePropertySet_Clone(This,ppPropertySet) \ + (This)->lpVtbl -> Clone(This,ppPropertySet) + +#define IMimePropertySet_SetOption(This,oid,pValue) \ + (This)->lpVtbl -> SetOption(This,oid,pValue) + +#define IMimePropertySet_GetOption(This,oid,pValue) \ + (This)->lpVtbl -> GetOption(This,oid,pValue) + +#define IMimePropertySet_EnumProps(This,dwFlags,ppEnum) \ + (This)->lpVtbl -> EnumProps(This,dwFlags,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_GetPropInfo_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [out][in] */ LPMIMEPROPINFO pInfo); + + +void __RPC_STUB IMimePropertySet_GetPropInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_SetPropInfo_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCMIMEPROPINFO pInfo); + + +void __RPC_STUB IMimePropertySet_SetPropInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_GetProp_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + +void __RPC_STUB IMimePropertySet_GetProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_SetProp_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + +void __RPC_STUB IMimePropertySet_SetProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_AppendProp_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPPROPVARIANT pValue); + + +void __RPC_STUB IMimePropertySet_AppendProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_DeleteProp_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName); + + +void __RPC_STUB IMimePropertySet_DeleteProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_CopyProps_Proxy( + IMimePropertySet * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet); + + +void __RPC_STUB IMimePropertySet_CopyProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_MoveProps_Proxy( + IMimePropertySet * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet); + + +void __RPC_STUB IMimePropertySet_MoveProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_DeleteExcept_Proxy( + IMimePropertySet * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName); + + +void __RPC_STUB IMimePropertySet_DeleteExcept_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_QueryProp_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + +void __RPC_STUB IMimePropertySet_QueryProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_GetCharset_Proxy( + IMimePropertySet * This, + /* [out] */ LPHCHARSET phCharset); + + +void __RPC_STUB IMimePropertySet_GetCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_SetCharset_Proxy( + IMimePropertySet * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype); + + +void __RPC_STUB IMimePropertySet_SetCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_GetParameters_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszName, + /* [out] */ ULONG *pcParams, + /* [out] */ LPMIMEPARAMINFO *pprgParam); + + +void __RPC_STUB IMimePropertySet_GetParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_IsContentType_Proxy( + IMimePropertySet * This, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType); + + +void __RPC_STUB IMimePropertySet_IsContentType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_BindToObject_Proxy( + IMimePropertySet * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + +void __RPC_STUB IMimePropertySet_BindToObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_Clone_Proxy( + IMimePropertySet * This, + /* [out] */ IMimePropertySet **ppPropertySet); + + +void __RPC_STUB IMimePropertySet_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_SetOption_Proxy( + IMimePropertySet * This, + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue); + + +void __RPC_STUB IMimePropertySet_SetOption_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_GetOption_Proxy( + IMimePropertySet * This, + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue); + + +void __RPC_STUB IMimePropertySet_GetOption_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimePropertySet_EnumProps_Proxy( + IMimePropertySet * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IMimeEnumProperties **ppEnum); + + +void __RPC_STUB IMimePropertySet_EnumProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimePropertySet_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeAddressTable_INTERFACE_DEFINED__ +#define __IMimeAddressTable_INTERFACE_DEFINED__ + +/* interface IMimeAddressTable */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeAddressTable *LPMIMEADDRESSTABLE; + +typedef DWORD IADDRESSTYPE; + +struct HADDRESS__ + { + DWORD unused; + } ; +typedef const struct HADDRESS__ *HADDRESS; + +typedef HADDRESS *LPHADDRESS; + +#define IAT_UNKNOWN 0x00000000 +#define IAT_FROM 0x00000001 +#define IAT_SENDER 0x00000002 +#define IAT_TO 0x00000004 +#define IAT_CC 0x00000008 +#define IAT_BCC 0x00000010 +#define IAT_REPLYTO 0x00000020 +#define IAT_RETURNPATH 0x00000040 +#define IAT_RETRCPTTO 0x00000080 +#define IAT_RR 0x00000100 +#define IAT_APPARTO 0x00000200 +#define IAT_ALL 0xFFFFFFFF +#define IAT_KNOWN (IAT_FROM | IAT_TO | IAT_CC | IAT_BCC | IAT_REPLYTO | IAT_SENDER) +#define IAT_RECIPS (IAT_TO | IAT_CC | IAT_BCC) +typedef +enum tagADDRESSFORMAT + { AFT_DISPLAY_FRIENDLY = 0, + AFT_DISPLAY_EMAIL = AFT_DISPLAY_FRIENDLY + 1, + AFT_DISPLAY_BOTH = AFT_DISPLAY_EMAIL + 1, + AFT_RFC822_DECODED = AFT_DISPLAY_BOTH + 1, + AFT_RFC822_ENCODED = AFT_RFC822_DECODED + 1, + AFT_RFC822_TRANSMIT = AFT_RFC822_ENCODED + 1 + } ADDRESSFORMAT; + +#define IAP_CHARSET 0x00000001 +#define IAP_HANDLE 0x00000002 +#define IAP_ADRTYPE 0x00000004 +#define IAP_FRIENDLY 0x00000008 +#define IAP_EMAIL 0x00000020 +#define IAP_CERTSTATE 0x00000100 +#define IAP_SIGNING_PRINT 0x00000200 +#define IAP_ENCRYPTION_PRINT 0x00000400 +#define IAP_ENCODING 0x00000800 +#define IAP_COOKIE 0x00001000 +#define IAP_ALL 0xffffffff +typedef struct tagADDRESSPROPS + { + DWORD dwProps; + HADDRESS hAddress; + ENCODINGTYPE ietFriendly; + HCHARSET hCharset; + DWORD dwAdrType; + LPSTR pszFriendly; + LPWSTR pwszReserved; + LPSTR pszEmail; + CERTSTATE certstate; + THUMBBLOB tbSigning; + THUMBBLOB tbEncryption; + DWORD dwCookie; + DWORD dwReserved1; + DWORD dwReserved2; + } ADDRESSPROPS; + +typedef struct tagADDRESSPROPS *LPADDRESSPROPS; + +typedef struct tagADDRESSLIST + { + ULONG cAdrs; + LPADDRESSPROPS prgAdr; + } ADDRESSLIST; + +typedef struct tagADDRESSLIST *LPADDRESSLIST; + + +EXTERN_C const IID IID_IMimeAddressTable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C558834A-7F86-11d0-8252-00C04FD85AB4") + IMimeAddressTable : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Append( + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietFriendly, + /* [in] */ LPCSTR pszFriendly, + /* [in] */ LPCSTR pszEmail, + /* [out] */ LPHADDRESS phAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE Insert( + /* [in] */ LPADDRESSPROPS pAddress, + /* [out] */ LPHADDRESS phAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProps( + /* [in] */ HADDRESS hAddress, + /* [in] */ LPADDRESSPROPS pAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetProps( + /* [in] */ HADDRESS hAddress, + /* [in] */ LPADDRESSPROPS pAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSender( + /* [out][in] */ LPADDRESSPROPS pAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE CountTypes( + /* [in] */ DWORD dwAdrTypes, + /* [out] */ ULONG *pcAdrs) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTypes( + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out][in] */ LPADDRESSLIST pList) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumTypes( + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out] */ IMimeEnumAddressTypes **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Delete( + /* [in] */ HADDRESS hAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteTypes( + /* [in] */ DWORD dwAdrTypes) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [in] */ DWORD dwAdrType, + /* [in] */ ADDRESSFORMAT format, + /* [out] */ LPSTR *ppszFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE AppendRfc822( + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszRfc822Adr) = 0; + + virtual HRESULT STDMETHODCALLTYPE ParseRfc822( + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszRfc822Adr, + /* [out][in] */ LPADDRESSLIST pList) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMimeAddressTable **ppTable) = 0; + + virtual HRESULT STDMETHODCALLTYPE BindToObject( + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeAddressTableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeAddressTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeAddressTable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeAddressTable * This); + + HRESULT ( STDMETHODCALLTYPE *Append )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietFriendly, + /* [in] */ LPCSTR pszFriendly, + /* [in] */ LPCSTR pszEmail, + /* [out] */ LPHADDRESS phAddress); + + HRESULT ( STDMETHODCALLTYPE *Insert )( + IMimeAddressTable * This, + /* [in] */ LPADDRESSPROPS pAddress, + /* [out] */ LPHADDRESS phAddress); + + HRESULT ( STDMETHODCALLTYPE *SetProps )( + IMimeAddressTable * This, + /* [in] */ HADDRESS hAddress, + /* [in] */ LPADDRESSPROPS pAddress); + + HRESULT ( STDMETHODCALLTYPE *GetProps )( + IMimeAddressTable * This, + /* [in] */ HADDRESS hAddress, + /* [in] */ LPADDRESSPROPS pAddress); + + HRESULT ( STDMETHODCALLTYPE *GetSender )( + IMimeAddressTable * This, + /* [out][in] */ LPADDRESSPROPS pAddress); + + HRESULT ( STDMETHODCALLTYPE *CountTypes )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes, + /* [out] */ ULONG *pcAdrs); + + HRESULT ( STDMETHODCALLTYPE *GetTypes )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out][in] */ LPADDRESSLIST pList); + + HRESULT ( STDMETHODCALLTYPE *EnumTypes )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out] */ IMimeEnumAddressTypes **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Delete )( + IMimeAddressTable * This, + /* [in] */ HADDRESS hAddress); + + HRESULT ( STDMETHODCALLTYPE *DeleteTypes )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ADDRESSFORMAT format, + /* [out] */ LPSTR *ppszFormat); + + HRESULT ( STDMETHODCALLTYPE *AppendRfc822 )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszRfc822Adr); + + HRESULT ( STDMETHODCALLTYPE *ParseRfc822 )( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszRfc822Adr, + /* [out][in] */ LPADDRESSLIST pList); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimeAddressTable * This, + /* [out] */ IMimeAddressTable **ppTable); + + HRESULT ( STDMETHODCALLTYPE *BindToObject )( + IMimeAddressTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + END_INTERFACE + } IMimeAddressTableVtbl; + + interface IMimeAddressTable + { + CONST_VTBL struct IMimeAddressTableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeAddressTable_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeAddressTable_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeAddressTable_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeAddressTable_Append(This,dwAdrType,ietFriendly,pszFriendly,pszEmail,phAddress) \ + (This)->lpVtbl -> Append(This,dwAdrType,ietFriendly,pszFriendly,pszEmail,phAddress) + +#define IMimeAddressTable_Insert(This,pAddress,phAddress) \ + (This)->lpVtbl -> Insert(This,pAddress,phAddress) + +#define IMimeAddressTable_SetProps(This,hAddress,pAddress) \ + (This)->lpVtbl -> SetProps(This,hAddress,pAddress) + +#define IMimeAddressTable_GetProps(This,hAddress,pAddress) \ + (This)->lpVtbl -> GetProps(This,hAddress,pAddress) + +#define IMimeAddressTable_GetSender(This,pAddress) \ + (This)->lpVtbl -> GetSender(This,pAddress) + +#define IMimeAddressTable_CountTypes(This,dwAdrTypes,pcAdrs) \ + (This)->lpVtbl -> CountTypes(This,dwAdrTypes,pcAdrs) + +#define IMimeAddressTable_GetTypes(This,dwAdrTypes,dwProps,pList) \ + (This)->lpVtbl -> GetTypes(This,dwAdrTypes,dwProps,pList) + +#define IMimeAddressTable_EnumTypes(This,dwAdrTypes,dwProps,ppEnum) \ + (This)->lpVtbl -> EnumTypes(This,dwAdrTypes,dwProps,ppEnum) + +#define IMimeAddressTable_Delete(This,hAddress) \ + (This)->lpVtbl -> Delete(This,hAddress) + +#define IMimeAddressTable_DeleteTypes(This,dwAdrTypes) \ + (This)->lpVtbl -> DeleteTypes(This,dwAdrTypes) + +#define IMimeAddressTable_GetFormat(This,dwAdrType,format,ppszFormat) \ + (This)->lpVtbl -> GetFormat(This,dwAdrType,format,ppszFormat) + +#define IMimeAddressTable_AppendRfc822(This,dwAdrType,ietEncoding,pszRfc822Adr) \ + (This)->lpVtbl -> AppendRfc822(This,dwAdrType,ietEncoding,pszRfc822Adr) + +#define IMimeAddressTable_ParseRfc822(This,dwAdrType,ietEncoding,pszRfc822Adr,pList) \ + (This)->lpVtbl -> ParseRfc822(This,dwAdrType,ietEncoding,pszRfc822Adr,pList) + +#define IMimeAddressTable_Clone(This,ppTable) \ + (This)->lpVtbl -> Clone(This,ppTable) + +#define IMimeAddressTable_BindToObject(This,riid,ppvObject) \ + (This)->lpVtbl -> BindToObject(This,riid,ppvObject) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_Append_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietFriendly, + /* [in] */ LPCSTR pszFriendly, + /* [in] */ LPCSTR pszEmail, + /* [out] */ LPHADDRESS phAddress); + + +void __RPC_STUB IMimeAddressTable_Append_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_Insert_Proxy( + IMimeAddressTable * This, + /* [in] */ LPADDRESSPROPS pAddress, + /* [out] */ LPHADDRESS phAddress); + + +void __RPC_STUB IMimeAddressTable_Insert_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_SetProps_Proxy( + IMimeAddressTable * This, + /* [in] */ HADDRESS hAddress, + /* [in] */ LPADDRESSPROPS pAddress); + + +void __RPC_STUB IMimeAddressTable_SetProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_GetProps_Proxy( + IMimeAddressTable * This, + /* [in] */ HADDRESS hAddress, + /* [in] */ LPADDRESSPROPS pAddress); + + +void __RPC_STUB IMimeAddressTable_GetProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_GetSender_Proxy( + IMimeAddressTable * This, + /* [out][in] */ LPADDRESSPROPS pAddress); + + +void __RPC_STUB IMimeAddressTable_GetSender_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_CountTypes_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes, + /* [out] */ ULONG *pcAdrs); + + +void __RPC_STUB IMimeAddressTable_CountTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_GetTypes_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out][in] */ LPADDRESSLIST pList); + + +void __RPC_STUB IMimeAddressTable_GetTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_EnumTypes_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out] */ IMimeEnumAddressTypes **ppEnum); + + +void __RPC_STUB IMimeAddressTable_EnumTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_Delete_Proxy( + IMimeAddressTable * This, + /* [in] */ HADDRESS hAddress); + + +void __RPC_STUB IMimeAddressTable_Delete_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_DeleteTypes_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrTypes); + + +void __RPC_STUB IMimeAddressTable_DeleteTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_GetFormat_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ADDRESSFORMAT format, + /* [out] */ LPSTR *ppszFormat); + + +void __RPC_STUB IMimeAddressTable_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_AppendRfc822_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszRfc822Adr); + + +void __RPC_STUB IMimeAddressTable_AppendRfc822_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_ParseRfc822_Proxy( + IMimeAddressTable * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszRfc822Adr, + /* [out][in] */ LPADDRESSLIST pList); + + +void __RPC_STUB IMimeAddressTable_ParseRfc822_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_Clone_Proxy( + IMimeAddressTable * This, + /* [out] */ IMimeAddressTable **ppTable); + + +void __RPC_STUB IMimeAddressTable_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAddressTable_BindToObject_Proxy( + IMimeAddressTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + +void __RPC_STUB IMimeAddressTable_BindToObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeAddressTable_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeWebDocument_INTERFACE_DEFINED__ +#define __IMimeWebDocument_INTERFACE_DEFINED__ + +/* interface IMimeWebDocument */ +/* [object][helpstring][uuid] */ + + +EXTERN_C const IID IID_IMimeWebDocument; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EE519F11-851A-11d0-825C-00C04FD85AB4") + IMimeWebDocument : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetURL( + /* [out] */ LPSTR *ppszURL) = 0; + + virtual HRESULT STDMETHODCALLTYPE BindToStorage( + /* [in] */ REFIID riid, + /* [iid_is][out] */ LPVOID *ppvObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeWebDocumentVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeWebDocument * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeWebDocument * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeWebDocument * This); + + HRESULT ( STDMETHODCALLTYPE *GetURL )( + IMimeWebDocument * This, + /* [out] */ LPSTR *ppszURL); + + HRESULT ( STDMETHODCALLTYPE *BindToStorage )( + IMimeWebDocument * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ LPVOID *ppvObject); + + END_INTERFACE + } IMimeWebDocumentVtbl; + + interface IMimeWebDocument + { + CONST_VTBL struct IMimeWebDocumentVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeWebDocument_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeWebDocument_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeWebDocument_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeWebDocument_GetURL(This,ppszURL) \ + (This)->lpVtbl -> GetURL(This,ppszURL) + +#define IMimeWebDocument_BindToStorage(This,riid,ppvObject) \ + (This)->lpVtbl -> BindToStorage(This,riid,ppvObject) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeWebDocument_GetURL_Proxy( + IMimeWebDocument * This, + /* [out] */ LPSTR *ppszURL); + + +void __RPC_STUB IMimeWebDocument_GetURL_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeWebDocument_BindToStorage_Proxy( + IMimeWebDocument * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ LPVOID *ppvObject); + + +void __RPC_STUB IMimeWebDocument_BindToStorage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeWebDocument_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeBody_INTERFACE_DEFINED__ +#define __IMimeBody_INTERFACE_DEFINED__ + +/* interface IMimeBody */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeBody *LPMIMEBODY; + +typedef +enum tagIMSGBODYTYPE + { IBT_SECURE = 0, + IBT_ATTACHMENT = IBT_SECURE + 1, + IBT_EMPTY = IBT_ATTACHMENT + 1, + IBT_CSETTAGGED = IBT_EMPTY + 1, + IBT_AUTOATTACH = IBT_CSETTAGGED + 1 + } IMSGBODYTYPE; + +typedef struct tagBODYOFFSETS + { + DWORD cbBoundaryStart; + DWORD cbHeaderStart; + DWORD cbBodyStart; + DWORD cbBodyEnd; + } BODYOFFSETS; + +typedef struct tagBODYOFFSETS *LPBODYOFFSETS; + +typedef struct tagTRANSMITINFO + { + ENCODINGTYPE ietCurrent; + ENCODINGTYPE ietXmitMime; + ENCODINGTYPE ietXmit822; + ULONG cbLongestLine; + ULONG cExtended; + ULONG ulPercentExt; + ULONG cbSize; + ULONG cLines; + } TRANSMITINFO; + +typedef struct tagTRANSMITINFO *LPTRANSMITINFO; + + +EXTERN_C const IID IID_IMimeBody; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C558834C-7F86-11d0-8252-00C04FD85AB4") + IMimeBody : public IMimePropertySet + { + public: + virtual HRESULT STDMETHODCALLTYPE IsType( + /* [in] */ IMSGBODYTYPE bodytype) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDisplayName( + /* [in] */ LPCSTR pszDisplay) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDisplayName( + /* [out] */ LPSTR *ppszDisplay) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOffsets( + /* [out] */ LPBODYOFFSETS pOffsets) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentEncoding( + /* [out] */ ENCODINGTYPE *pietEncoding) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCurrentEncoding( + /* [in] */ ENCODINGTYPE ietEncoding) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEstimatedSize( + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ ULONG *pcbSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDataHere( + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ IStream *pStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetData( + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ IStream **ppStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType, + /* [in] */ REFIID riid, + /* [iid_is][in] */ LPVOID pvObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE EmptyData( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CopyTo( + /* [in] */ IMimeBody *pBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTransmitInfo( + /* [out][in] */ LPTRANSMITINFO pTransmitInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE SaveToFile( + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszFilePath) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetHandle( + /* [out] */ LPHBODY phBody) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeBodyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeBody * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeBody * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeBody * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMimeBody * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *IsDirty )( + IMimeBody * This); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IMimeBody * This, + /* [in] */ LPSTREAM pStm); + + HRESULT ( STDMETHODCALLTYPE *Save )( + IMimeBody * This, + /* [in] */ LPSTREAM pStm, + /* [in] */ BOOL fClearDirty); + + HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( + IMimeBody * This, + /* [out] */ ULARGE_INTEGER *pCbSize); + + HRESULT ( STDMETHODCALLTYPE *InitNew )( + IMimeBody * This); + + HRESULT ( STDMETHODCALLTYPE *GetPropInfo )( + IMimeBody * This, + /* [in] */ LPCSTR pszName, + /* [out][in] */ LPMIMEPROPINFO pInfo); + + HRESULT ( STDMETHODCALLTYPE *SetPropInfo )( + IMimeBody * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCMIMEPROPINFO pInfo); + + HRESULT ( STDMETHODCALLTYPE *GetProp )( + IMimeBody * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *SetProp )( + IMimeBody * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *AppendProp )( + IMimeBody * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *DeleteProp )( + IMimeBody * This, + /* [in] */ LPCSTR pszName); + + HRESULT ( STDMETHODCALLTYPE *CopyProps )( + IMimeBody * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet); + + HRESULT ( STDMETHODCALLTYPE *MoveProps )( + IMimeBody * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName, + /* [in] */ IMimePropertySet *pPropertySet); + + HRESULT ( STDMETHODCALLTYPE *DeleteExcept )( + IMimeBody * This, + /* [in] */ ULONG cNames, + /* [in] */ LPCSTR *prgszName); + + HRESULT ( STDMETHODCALLTYPE *QueryProp )( + IMimeBody * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + HRESULT ( STDMETHODCALLTYPE *GetCharset )( + IMimeBody * This, + /* [out] */ LPHCHARSET phCharset); + + HRESULT ( STDMETHODCALLTYPE *SetCharset )( + IMimeBody * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype); + + HRESULT ( STDMETHODCALLTYPE *GetParameters )( + IMimeBody * This, + /* [in] */ LPCSTR pszName, + /* [out] */ ULONG *pcParams, + /* [out] */ LPMIMEPARAMINFO *pprgParam); + + HRESULT ( STDMETHODCALLTYPE *IsContentType )( + IMimeBody * This, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType); + + HRESULT ( STDMETHODCALLTYPE *BindToObject )( + IMimeBody * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimeBody * This, + /* [out] */ IMimePropertySet **ppPropertySet); + + HRESULT ( STDMETHODCALLTYPE *SetOption )( + IMimeBody * This, + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *GetOption )( + IMimeBody * This, + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *EnumProps )( + IMimeBody * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IMimeEnumProperties **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *IsType )( + IMimeBody * This, + /* [in] */ IMSGBODYTYPE bodytype); + + HRESULT ( STDMETHODCALLTYPE *SetDisplayName )( + IMimeBody * This, + /* [in] */ LPCSTR pszDisplay); + + HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( + IMimeBody * This, + /* [out] */ LPSTR *ppszDisplay); + + HRESULT ( STDMETHODCALLTYPE *GetOffsets )( + IMimeBody * This, + /* [out] */ LPBODYOFFSETS pOffsets); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentEncoding )( + IMimeBody * This, + /* [out] */ ENCODINGTYPE *pietEncoding); + + HRESULT ( STDMETHODCALLTYPE *SetCurrentEncoding )( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding); + + HRESULT ( STDMETHODCALLTYPE *GetEstimatedSize )( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ ULONG *pcbSize); + + HRESULT ( STDMETHODCALLTYPE *GetDataHere )( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ IStream *pStream); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ IStream **ppStream); + + HRESULT ( STDMETHODCALLTYPE *SetData )( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType, + /* [in] */ REFIID riid, + /* [iid_is][in] */ LPVOID pvObject); + + HRESULT ( STDMETHODCALLTYPE *EmptyData )( + IMimeBody * This); + + HRESULT ( STDMETHODCALLTYPE *CopyTo )( + IMimeBody * This, + /* [in] */ IMimeBody *pBody); + + HRESULT ( STDMETHODCALLTYPE *GetTransmitInfo )( + IMimeBody * This, + /* [out][in] */ LPTRANSMITINFO pTransmitInfo); + + HRESULT ( STDMETHODCALLTYPE *SaveToFile )( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszFilePath); + + HRESULT ( STDMETHODCALLTYPE *GetHandle )( + IMimeBody * This, + /* [out] */ LPHBODY phBody); + + END_INTERFACE + } IMimeBodyVtbl; + + interface IMimeBody + { + CONST_VTBL struct IMimeBodyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeBody_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeBody_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeBody_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeBody_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMimeBody_IsDirty(This) \ + (This)->lpVtbl -> IsDirty(This) + +#define IMimeBody_Load(This,pStm) \ + (This)->lpVtbl -> Load(This,pStm) + +#define IMimeBody_Save(This,pStm,fClearDirty) \ + (This)->lpVtbl -> Save(This,pStm,fClearDirty) + +#define IMimeBody_GetSizeMax(This,pCbSize) \ + (This)->lpVtbl -> GetSizeMax(This,pCbSize) + +#define IMimeBody_InitNew(This) \ + (This)->lpVtbl -> InitNew(This) + + +#define IMimeBody_GetPropInfo(This,pszName,pInfo) \ + (This)->lpVtbl -> GetPropInfo(This,pszName,pInfo) + +#define IMimeBody_SetPropInfo(This,pszName,pInfo) \ + (This)->lpVtbl -> SetPropInfo(This,pszName,pInfo) + +#define IMimeBody_GetProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> GetProp(This,pszName,dwFlags,pValue) + +#define IMimeBody_SetProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> SetProp(This,pszName,dwFlags,pValue) + +#define IMimeBody_AppendProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> AppendProp(This,pszName,dwFlags,pValue) + +#define IMimeBody_DeleteProp(This,pszName) \ + (This)->lpVtbl -> DeleteProp(This,pszName) + +#define IMimeBody_CopyProps(This,cNames,prgszName,pPropertySet) \ + (This)->lpVtbl -> CopyProps(This,cNames,prgszName,pPropertySet) + +#define IMimeBody_MoveProps(This,cNames,prgszName,pPropertySet) \ + (This)->lpVtbl -> MoveProps(This,cNames,prgszName,pPropertySet) + +#define IMimeBody_DeleteExcept(This,cNames,prgszName) \ + (This)->lpVtbl -> DeleteExcept(This,cNames,prgszName) + +#define IMimeBody_QueryProp(This,pszName,pszCriteria,fSubString,fCaseSensitive) \ + (This)->lpVtbl -> QueryProp(This,pszName,pszCriteria,fSubString,fCaseSensitive) + +#define IMimeBody_GetCharset(This,phCharset) \ + (This)->lpVtbl -> GetCharset(This,phCharset) + +#define IMimeBody_SetCharset(This,hCharset,applytype) \ + (This)->lpVtbl -> SetCharset(This,hCharset,applytype) + +#define IMimeBody_GetParameters(This,pszName,pcParams,pprgParam) \ + (This)->lpVtbl -> GetParameters(This,pszName,pcParams,pprgParam) + +#define IMimeBody_IsContentType(This,pszPriType,pszSubType) \ + (This)->lpVtbl -> IsContentType(This,pszPriType,pszSubType) + +#define IMimeBody_BindToObject(This,riid,ppvObject) \ + (This)->lpVtbl -> BindToObject(This,riid,ppvObject) + +#define IMimeBody_Clone(This,ppPropertySet) \ + (This)->lpVtbl -> Clone(This,ppPropertySet) + +#define IMimeBody_SetOption(This,oid,pValue) \ + (This)->lpVtbl -> SetOption(This,oid,pValue) + +#define IMimeBody_GetOption(This,oid,pValue) \ + (This)->lpVtbl -> GetOption(This,oid,pValue) + +#define IMimeBody_EnumProps(This,dwFlags,ppEnum) \ + (This)->lpVtbl -> EnumProps(This,dwFlags,ppEnum) + + +#define IMimeBody_IsType(This,bodytype) \ + (This)->lpVtbl -> IsType(This,bodytype) + +#define IMimeBody_SetDisplayName(This,pszDisplay) \ + (This)->lpVtbl -> SetDisplayName(This,pszDisplay) + +#define IMimeBody_GetDisplayName(This,ppszDisplay) \ + (This)->lpVtbl -> GetDisplayName(This,ppszDisplay) + +#define IMimeBody_GetOffsets(This,pOffsets) \ + (This)->lpVtbl -> GetOffsets(This,pOffsets) + +#define IMimeBody_GetCurrentEncoding(This,pietEncoding) \ + (This)->lpVtbl -> GetCurrentEncoding(This,pietEncoding) + +#define IMimeBody_SetCurrentEncoding(This,ietEncoding) \ + (This)->lpVtbl -> SetCurrentEncoding(This,ietEncoding) + +#define IMimeBody_GetEstimatedSize(This,ietEncoding,pcbSize) \ + (This)->lpVtbl -> GetEstimatedSize(This,ietEncoding,pcbSize) + +#define IMimeBody_GetDataHere(This,ietEncoding,pStream) \ + (This)->lpVtbl -> GetDataHere(This,ietEncoding,pStream) + +#define IMimeBody_GetData(This,ietEncoding,ppStream) \ + (This)->lpVtbl -> GetData(This,ietEncoding,ppStream) + +#define IMimeBody_SetData(This,ietEncoding,pszPriType,pszSubType,riid,pvObject) \ + (This)->lpVtbl -> SetData(This,ietEncoding,pszPriType,pszSubType,riid,pvObject) + +#define IMimeBody_EmptyData(This) \ + (This)->lpVtbl -> EmptyData(This) + +#define IMimeBody_CopyTo(This,pBody) \ + (This)->lpVtbl -> CopyTo(This,pBody) + +#define IMimeBody_GetTransmitInfo(This,pTransmitInfo) \ + (This)->lpVtbl -> GetTransmitInfo(This,pTransmitInfo) + +#define IMimeBody_SaveToFile(This,ietEncoding,pszFilePath) \ + (This)->lpVtbl -> SaveToFile(This,ietEncoding,pszFilePath) + +#define IMimeBody_GetHandle(This,phBody) \ + (This)->lpVtbl -> GetHandle(This,phBody) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeBody_IsType_Proxy( + IMimeBody * This, + /* [in] */ IMSGBODYTYPE bodytype); + + +void __RPC_STUB IMimeBody_IsType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_SetDisplayName_Proxy( + IMimeBody * This, + /* [in] */ LPCSTR pszDisplay); + + +void __RPC_STUB IMimeBody_SetDisplayName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetDisplayName_Proxy( + IMimeBody * This, + /* [out] */ LPSTR *ppszDisplay); + + +void __RPC_STUB IMimeBody_GetDisplayName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetOffsets_Proxy( + IMimeBody * This, + /* [out] */ LPBODYOFFSETS pOffsets); + + +void __RPC_STUB IMimeBody_GetOffsets_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetCurrentEncoding_Proxy( + IMimeBody * This, + /* [out] */ ENCODINGTYPE *pietEncoding); + + +void __RPC_STUB IMimeBody_GetCurrentEncoding_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_SetCurrentEncoding_Proxy( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding); + + +void __RPC_STUB IMimeBody_SetCurrentEncoding_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetEstimatedSize_Proxy( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ ULONG *pcbSize); + + +void __RPC_STUB IMimeBody_GetEstimatedSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetDataHere_Proxy( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ IStream *pStream); + + +void __RPC_STUB IMimeBody_GetDataHere_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetData_Proxy( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ IStream **ppStream); + + +void __RPC_STUB IMimeBody_GetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_SetData_Proxy( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType, + /* [in] */ REFIID riid, + /* [iid_is][in] */ LPVOID pvObject); + + +void __RPC_STUB IMimeBody_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_EmptyData_Proxy( + IMimeBody * This); + + +void __RPC_STUB IMimeBody_EmptyData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_CopyTo_Proxy( + IMimeBody * This, + /* [in] */ IMimeBody *pBody); + + +void __RPC_STUB IMimeBody_CopyTo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetTransmitInfo_Proxy( + IMimeBody * This, + /* [out][in] */ LPTRANSMITINFO pTransmitInfo); + + +void __RPC_STUB IMimeBody_GetTransmitInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_SaveToFile_Proxy( + IMimeBody * This, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ LPCSTR pszFilePath); + + +void __RPC_STUB IMimeBody_SaveToFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeBody_GetHandle_Proxy( + IMimeBody * This, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeBody_GetHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeBody_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeMessageTree_INTERFACE_DEFINED__ +#define __IMimeMessageTree_INTERFACE_DEFINED__ + +/* interface IMimeMessageTree */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeMessageTree *LPMIMEMESSAGETREE; + +#define HBODY_ROOT ( ( HBODY )-1 ) + +typedef +enum tagBODYLOCATION + { IBL_ROOT = 0, + IBL_PARENT = IBL_ROOT + 1, + IBL_FIRST = IBL_PARENT + 1, + IBL_LAST = IBL_FIRST + 1, + IBL_NEXT = IBL_LAST + 1, + IBL_PREVIOUS = IBL_NEXT + 1 + } BODYLOCATION; + +typedef struct tagFINDBODY + { + LPSTR pszPriType; + LPSTR pszSubType; + DWORD dwReserved; + } FINDBODY; + +typedef struct tagFINDBODY *LPFINDBODY; + +#define COMMIT_ONLYIFDIRTY 0x00000001 +#define COMMIT_REUSESTORAGE 0x00000002 +#define COMMIT_SMIMETRANSFERENCODE 0x00000004 +#define SAVEBODY_KEEPBOUNDARY 0x00000001 +#define DELETE_PROMOTE_CHILDREN 0x00000001 +#define DELETE_CHILDREN_ONLY 0x00000002 + +EXTERN_C const IID IID_IMimeMessageTree; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FD853CD4-7F86-11d0-8252-00C04FD85AB4") + IMimeMessageTree : public IPersistStreamInit + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMessageSource( + /* [out] */ IStream **ppStream, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMessageSize( + /* [out] */ ULONG *pcbSize, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadOffsetTable( + /* [in] */ IStream *pStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE SaveOffsetTable( + /* [in] */ IStream *pStream, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFlags( + /* [out] */ DWORD *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Commit( + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE HandsOffStorage( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE BindToObject( + /* [in] */ const HBODY hBody, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE SaveBody( + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags, + /* [in] */ IStream *pStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE InsertBody( + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBody( + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteBody( + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE MoveBody( + /* [in] */ HBODY hBody, + /* [in] */ BODYLOCATION location) = 0; + + virtual HRESULT STDMETHODCALLTYPE CountBodies( + /* [in] */ HBODY hParent, + /* [in] */ boolean fRecurse, + /* [out] */ ULONG *pcBodies) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindFirst( + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindNext( + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE ResolveURL( + /* [in] */ HBODY hRelated, + /* [in] */ LPCSTR pszBase, + /* [in] */ LPCSTR pszURL, + /* [in] */ DWORD dwFlags, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE ToMultipart( + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszSubType, + /* [out] */ LPHBODY phMultipart) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBodyOffsets( + /* [in] */ HBODY hBody, + /* [out][in] */ LPBODYOFFSETS pOffsets) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCharset( + /* [out] */ LPHCHARSET phCharset) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCharset( + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsBodyType( + /* [in] */ HBODY hBody, + /* [in] */ IMSGBODYTYPE bodytype) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsContentType( + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryBodyProp( + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBodyProp( + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBodyProp( + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteBodyProp( + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOption( + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOption( + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeMessageTreeVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeMessageTree * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeMessageTree * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeMessageTree * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMimeMessageTree * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *IsDirty )( + IMimeMessageTree * This); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IMimeMessageTree * This, + /* [in] */ LPSTREAM pStm); + + HRESULT ( STDMETHODCALLTYPE *Save )( + IMimeMessageTree * This, + /* [in] */ LPSTREAM pStm, + /* [in] */ BOOL fClearDirty); + + HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( + IMimeMessageTree * This, + /* [out] */ ULARGE_INTEGER *pCbSize); + + HRESULT ( STDMETHODCALLTYPE *InitNew )( + IMimeMessageTree * This); + + HRESULT ( STDMETHODCALLTYPE *GetMessageSource )( + IMimeMessageTree * This, + /* [out] */ IStream **ppStream, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetMessageSize )( + IMimeMessageTree * This, + /* [out] */ ULONG *pcbSize, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *LoadOffsetTable )( + IMimeMessageTree * This, + /* [in] */ IStream *pStream); + + HRESULT ( STDMETHODCALLTYPE *SaveOffsetTable )( + IMimeMessageTree * This, + /* [in] */ IStream *pStream, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFlags )( + IMimeMessageTree * This, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + IMimeMessageTree * This, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *HandsOffStorage )( + IMimeMessageTree * This); + + HRESULT ( STDMETHODCALLTYPE *BindToObject )( + IMimeMessageTree * This, + /* [in] */ const HBODY hBody, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *SaveBody )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags, + /* [in] */ IStream *pStream); + + HRESULT ( STDMETHODCALLTYPE *InsertBody )( + IMimeMessageTree * This, + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *GetBody )( + IMimeMessageTree * This, + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *DeleteBody )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *MoveBody )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ BODYLOCATION location); + + HRESULT ( STDMETHODCALLTYPE *CountBodies )( + IMimeMessageTree * This, + /* [in] */ HBODY hParent, + /* [in] */ boolean fRecurse, + /* [out] */ ULONG *pcBodies); + + HRESULT ( STDMETHODCALLTYPE *FindFirst )( + IMimeMessageTree * This, + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *FindNext )( + IMimeMessageTree * This, + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *ResolveURL )( + IMimeMessageTree * This, + /* [in] */ HBODY hRelated, + /* [in] */ LPCSTR pszBase, + /* [in] */ LPCSTR pszURL, + /* [in] */ DWORD dwFlags, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *ToMultipart )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszSubType, + /* [out] */ LPHBODY phMultipart); + + HRESULT ( STDMETHODCALLTYPE *GetBodyOffsets )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [out][in] */ LPBODYOFFSETS pOffsets); + + HRESULT ( STDMETHODCALLTYPE *GetCharset )( + IMimeMessageTree * This, + /* [out] */ LPHCHARSET phCharset); + + HRESULT ( STDMETHODCALLTYPE *SetCharset )( + IMimeMessageTree * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype); + + HRESULT ( STDMETHODCALLTYPE *IsBodyType )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ IMSGBODYTYPE bodytype); + + HRESULT ( STDMETHODCALLTYPE *IsContentType )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType); + + HRESULT ( STDMETHODCALLTYPE *QueryBodyProp )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + HRESULT ( STDMETHODCALLTYPE *GetBodyProp )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *SetBodyProp )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *DeleteBodyProp )( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName); + + HRESULT ( STDMETHODCALLTYPE *SetOption )( + IMimeMessageTree * This, + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *GetOption )( + IMimeMessageTree * This, + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue); + + END_INTERFACE + } IMimeMessageTreeVtbl; + + interface IMimeMessageTree + { + CONST_VTBL struct IMimeMessageTreeVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeMessageTree_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeMessageTree_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeMessageTree_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeMessageTree_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMimeMessageTree_IsDirty(This) \ + (This)->lpVtbl -> IsDirty(This) + +#define IMimeMessageTree_Load(This,pStm) \ + (This)->lpVtbl -> Load(This,pStm) + +#define IMimeMessageTree_Save(This,pStm,fClearDirty) \ + (This)->lpVtbl -> Save(This,pStm,fClearDirty) + +#define IMimeMessageTree_GetSizeMax(This,pCbSize) \ + (This)->lpVtbl -> GetSizeMax(This,pCbSize) + +#define IMimeMessageTree_InitNew(This) \ + (This)->lpVtbl -> InitNew(This) + + +#define IMimeMessageTree_GetMessageSource(This,ppStream,dwFlags) \ + (This)->lpVtbl -> GetMessageSource(This,ppStream,dwFlags) + +#define IMimeMessageTree_GetMessageSize(This,pcbSize,dwFlags) \ + (This)->lpVtbl -> GetMessageSize(This,pcbSize,dwFlags) + +#define IMimeMessageTree_LoadOffsetTable(This,pStream) \ + (This)->lpVtbl -> LoadOffsetTable(This,pStream) + +#define IMimeMessageTree_SaveOffsetTable(This,pStream,dwFlags) \ + (This)->lpVtbl -> SaveOffsetTable(This,pStream,dwFlags) + +#define IMimeMessageTree_GetFlags(This,pdwFlags) \ + (This)->lpVtbl -> GetFlags(This,pdwFlags) + +#define IMimeMessageTree_Commit(This,dwFlags) \ + (This)->lpVtbl -> Commit(This,dwFlags) + +#define IMimeMessageTree_HandsOffStorage(This) \ + (This)->lpVtbl -> HandsOffStorage(This) + +#define IMimeMessageTree_BindToObject(This,hBody,riid,ppvObject) \ + (This)->lpVtbl -> BindToObject(This,hBody,riid,ppvObject) + +#define IMimeMessageTree_SaveBody(This,hBody,dwFlags,pStream) \ + (This)->lpVtbl -> SaveBody(This,hBody,dwFlags,pStream) + +#define IMimeMessageTree_InsertBody(This,location,hPivot,phBody) \ + (This)->lpVtbl -> InsertBody(This,location,hPivot,phBody) + +#define IMimeMessageTree_GetBody(This,location,hPivot,phBody) \ + (This)->lpVtbl -> GetBody(This,location,hPivot,phBody) + +#define IMimeMessageTree_DeleteBody(This,hBody,dwFlags) \ + (This)->lpVtbl -> DeleteBody(This,hBody,dwFlags) + +#define IMimeMessageTree_MoveBody(This,hBody,location) \ + (This)->lpVtbl -> MoveBody(This,hBody,location) + +#define IMimeMessageTree_CountBodies(This,hParent,fRecurse,pcBodies) \ + (This)->lpVtbl -> CountBodies(This,hParent,fRecurse,pcBodies) + +#define IMimeMessageTree_FindFirst(This,pFindBody,phBody) \ + (This)->lpVtbl -> FindFirst(This,pFindBody,phBody) + +#define IMimeMessageTree_FindNext(This,pFindBody,phBody) \ + (This)->lpVtbl -> FindNext(This,pFindBody,phBody) + +#define IMimeMessageTree_ResolveURL(This,hRelated,pszBase,pszURL,dwFlags,phBody) \ + (This)->lpVtbl -> ResolveURL(This,hRelated,pszBase,pszURL,dwFlags,phBody) + +#define IMimeMessageTree_ToMultipart(This,hBody,pszSubType,phMultipart) \ + (This)->lpVtbl -> ToMultipart(This,hBody,pszSubType,phMultipart) + +#define IMimeMessageTree_GetBodyOffsets(This,hBody,pOffsets) \ + (This)->lpVtbl -> GetBodyOffsets(This,hBody,pOffsets) + +#define IMimeMessageTree_GetCharset(This,phCharset) \ + (This)->lpVtbl -> GetCharset(This,phCharset) + +#define IMimeMessageTree_SetCharset(This,hCharset,applytype) \ + (This)->lpVtbl -> SetCharset(This,hCharset,applytype) + +#define IMimeMessageTree_IsBodyType(This,hBody,bodytype) \ + (This)->lpVtbl -> IsBodyType(This,hBody,bodytype) + +#define IMimeMessageTree_IsContentType(This,hBody,pszPriType,pszSubType) \ + (This)->lpVtbl -> IsContentType(This,hBody,pszPriType,pszSubType) + +#define IMimeMessageTree_QueryBodyProp(This,hBody,pszName,pszCriteria,fSubString,fCaseSensitive) \ + (This)->lpVtbl -> QueryBodyProp(This,hBody,pszName,pszCriteria,fSubString,fCaseSensitive) + +#define IMimeMessageTree_GetBodyProp(This,hBody,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> GetBodyProp(This,hBody,pszName,dwFlags,pValue) + +#define IMimeMessageTree_SetBodyProp(This,hBody,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> SetBodyProp(This,hBody,pszName,dwFlags,pValue) + +#define IMimeMessageTree_DeleteBodyProp(This,hBody,pszName) \ + (This)->lpVtbl -> DeleteBodyProp(This,hBody,pszName) + +#define IMimeMessageTree_SetOption(This,oid,pValue) \ + (This)->lpVtbl -> SetOption(This,oid,pValue) + +#define IMimeMessageTree_GetOption(This,oid,pValue) \ + (This)->lpVtbl -> GetOption(This,oid,pValue) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetMessageSource_Proxy( + IMimeMessageTree * This, + /* [out] */ IStream **ppStream, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeMessageTree_GetMessageSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetMessageSize_Proxy( + IMimeMessageTree * This, + /* [out] */ ULONG *pcbSize, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeMessageTree_GetMessageSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_LoadOffsetTable_Proxy( + IMimeMessageTree * This, + /* [in] */ IStream *pStream); + + +void __RPC_STUB IMimeMessageTree_LoadOffsetTable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_SaveOffsetTable_Proxy( + IMimeMessageTree * This, + /* [in] */ IStream *pStream, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeMessageTree_SaveOffsetTable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetFlags_Proxy( + IMimeMessageTree * This, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IMimeMessageTree_GetFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_Commit_Proxy( + IMimeMessageTree * This, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeMessageTree_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_HandsOffStorage_Proxy( + IMimeMessageTree * This); + + +void __RPC_STUB IMimeMessageTree_HandsOffStorage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_BindToObject_Proxy( + IMimeMessageTree * This, + /* [in] */ const HBODY hBody, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + +void __RPC_STUB IMimeMessageTree_BindToObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_SaveBody_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags, + /* [in] */ IStream *pStream); + + +void __RPC_STUB IMimeMessageTree_SaveBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_InsertBody_Proxy( + IMimeMessageTree * This, + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessageTree_InsertBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetBody_Proxy( + IMimeMessageTree * This, + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessageTree_GetBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_DeleteBody_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMimeMessageTree_DeleteBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_MoveBody_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ BODYLOCATION location); + + +void __RPC_STUB IMimeMessageTree_MoveBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_CountBodies_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hParent, + /* [in] */ boolean fRecurse, + /* [out] */ ULONG *pcBodies); + + +void __RPC_STUB IMimeMessageTree_CountBodies_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_FindFirst_Proxy( + IMimeMessageTree * This, + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessageTree_FindFirst_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_FindNext_Proxy( + IMimeMessageTree * This, + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessageTree_FindNext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_ResolveURL_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hRelated, + /* [in] */ LPCSTR pszBase, + /* [in] */ LPCSTR pszURL, + /* [in] */ DWORD dwFlags, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessageTree_ResolveURL_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_ToMultipart_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszSubType, + /* [out] */ LPHBODY phMultipart); + + +void __RPC_STUB IMimeMessageTree_ToMultipart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetBodyOffsets_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [out][in] */ LPBODYOFFSETS pOffsets); + + +void __RPC_STUB IMimeMessageTree_GetBodyOffsets_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetCharset_Proxy( + IMimeMessageTree * This, + /* [out] */ LPHCHARSET phCharset); + + +void __RPC_STUB IMimeMessageTree_GetCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_SetCharset_Proxy( + IMimeMessageTree * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype); + + +void __RPC_STUB IMimeMessageTree_SetCharset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_IsBodyType_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ IMSGBODYTYPE bodytype); + + +void __RPC_STUB IMimeMessageTree_IsBodyType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_IsContentType_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType); + + +void __RPC_STUB IMimeMessageTree_IsContentType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_QueryBodyProp_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + +void __RPC_STUB IMimeMessageTree_QueryBodyProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetBodyProp_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + +void __RPC_STUB IMimeMessageTree_GetBodyProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_SetBodyProp_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + +void __RPC_STUB IMimeMessageTree_SetBodyProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_DeleteBodyProp_Proxy( + IMimeMessageTree * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName); + + +void __RPC_STUB IMimeMessageTree_DeleteBodyProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_SetOption_Proxy( + IMimeMessageTree * This, + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue); + + +void __RPC_STUB IMimeMessageTree_SetOption_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageTree_GetOption_Proxy( + IMimeMessageTree * This, + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue); + + +void __RPC_STUB IMimeMessageTree_GetOption_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeMessageTree_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeMessage_INTERFACE_DEFINED__ +#define __IMimeMessage_INTERFACE_DEFINED__ + +/* interface IMimeMessage */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeMessage *LPMIMEMESSAGE; + +typedef DWORD TEXTTYPE; + +typedef +enum tagIMSGFLAGS + { IMF_ATTACHMENTS = 0x1, + IMF_MULTIPART = 0x2, + IMF_SUBMULTIPART = 0x4, + IMF_MIME = 0x8, + IMF_HTML = 0x10, + IMF_PLAIN = 0x20, + IMF_PARTIAL = 0x40, + IMF_SIGNED = 0x80, + IMF_ENCRYPTED = 0x100, + IMF_TNEF = 0x200, + IMF_MHTML = 0x400, + IMF_SECURE = 0x800, + IMF_TEXT = 0x1000, + IMF_CSETTAGGED = 0x2000, + IMF_NEWS = 0x4000, + IMF_VOICEMAIL = 0x8000, + IMF_HASVCARD = 0x10000, + IMF_RFC1154 = 0x20000 + } IMSGFLAGS; + +typedef +enum tagIMSGPRIORITY + { IMSG_PRI_LOW = 5, + IMSG_PRI_NORMAL = 3, + IMSG_PRI_HIGH = 1 + } IMSGPRIORITY; + +#define WPF_HTML 0x00000001 +#define WPF_AUTOINLINE 0x00000002 +#define WPF_SLIDESHOW 0x00000004 +#define WPF_ATTACHLINKS 0x00000008 +#define WPF_IMAGESONLY 0x00000010 +#define WPF_NOMETACHARSET 0x00000020 +typedef struct tagWEBPAGEOPTIONS + { + DWORD cbSize; + DWORD dwFlags; + DWORD dwDelay; + WCHAR wchQuote; + } WEBPAGEOPTIONS; + +typedef struct tagWEBPAGEOPTIONS *LPWEBPAGEOPTIONS; + +#define TXT_PLAIN 0x00000001 +#define TXT_HTML 0x00000002 +#define URL_ATTACH_INTO_MIXED 0x00000001 +#define URL_ATTACH_GENERATE_CID 0x00000002 +#define URL_ATTACH_SET_CNTTYPE 0x00000004 +#define URL_RESOLVE_RENDERED 0x00000001 +#define URL_RESULVE_NO_BASE 0x00000002 + +EXTERN_C const IID IID_IMimeMessage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FD853CD5-7F86-11d0-8252-00C04FD85AB4") + IMimeMessage : public IMimeMessageTree + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateWebPage( + /* [in] */ IStream *pRootStm, + /* [in] */ LPWEBPAGEOPTIONS pOptions, + /* [in] */ IMimeMessageCallback *pCallback, + /* [out] */ IMoniker **ppMoniker) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetProp( + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProp( + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteProp( + /* [in] */ LPCSTR pszName) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryProp( + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTextBody( + /* [in] */ DWORD dwTxtType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ IStream **ppStream, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTextBody( + /* [in] */ DWORD dwTxtType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ HBODY hAlternative, + /* [in] */ IStream *pStream, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE AttachObject( + /* [in] */ REFIID riid, + /* [iid_is][in] */ void *pvObject, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE AttachFile( + /* [in] */ LPCSTR pszFilePath, + /* [in] */ IStream *pstmFile, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE AttachURL( + /* [in] */ LPCSTR pszBase, + /* [in] */ LPCSTR pszURL, + /* [in] */ DWORD dwFlags, + /* [in] */ IStream *pstmURL, + /* [out] */ LPSTR *ppszCIDURL, + /* [out] */ LPHBODY phBody) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAttachments( + /* [out] */ ULONG *pcAttach, + /* [out] */ LPHBODY *pprghAttach) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAddressTable( + /* [out] */ IMimeAddressTable **ppTable) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSender( + /* [out][in] */ LPADDRESSPROPS pAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAddressTypes( + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out][in] */ LPADDRESSLIST pList) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAddressFormat( + /* [in] */ DWORD dwAdrType, + /* [in] */ ADDRESSFORMAT format, + /* [out] */ LPSTR *ppszFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumAddressTypes( + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out] */ IMimeEnumAddressTypes **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE SplitMessage( + /* [in] */ ULONG cbMaxPart, + /* [out] */ IMimeMessageParts **ppParts) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRootMoniker( + /* [out] */ IMoniker **ppMoniker) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeMessageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeMessage * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeMessage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeMessage * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMimeMessage * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *IsDirty )( + IMimeMessage * This); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IMimeMessage * This, + /* [in] */ LPSTREAM pStm); + + HRESULT ( STDMETHODCALLTYPE *Save )( + IMimeMessage * This, + /* [in] */ LPSTREAM pStm, + /* [in] */ BOOL fClearDirty); + + HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( + IMimeMessage * This, + /* [out] */ ULARGE_INTEGER *pCbSize); + + HRESULT ( STDMETHODCALLTYPE *InitNew )( + IMimeMessage * This); + + HRESULT ( STDMETHODCALLTYPE *GetMessageSource )( + IMimeMessage * This, + /* [out] */ IStream **ppStream, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetMessageSize )( + IMimeMessage * This, + /* [out] */ ULONG *pcbSize, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *LoadOffsetTable )( + IMimeMessage * This, + /* [in] */ IStream *pStream); + + HRESULT ( STDMETHODCALLTYPE *SaveOffsetTable )( + IMimeMessage * This, + /* [in] */ IStream *pStream, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFlags )( + IMimeMessage * This, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + IMimeMessage * This, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *HandsOffStorage )( + IMimeMessage * This); + + HRESULT ( STDMETHODCALLTYPE *BindToObject )( + IMimeMessage * This, + /* [in] */ const HBODY hBody, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *SaveBody )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags, + /* [in] */ IStream *pStream); + + HRESULT ( STDMETHODCALLTYPE *InsertBody )( + IMimeMessage * This, + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *GetBody )( + IMimeMessage * This, + /* [in] */ BODYLOCATION location, + /* [in] */ HBODY hPivot, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *DeleteBody )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *MoveBody )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ BODYLOCATION location); + + HRESULT ( STDMETHODCALLTYPE *CountBodies )( + IMimeMessage * This, + /* [in] */ HBODY hParent, + /* [in] */ boolean fRecurse, + /* [out] */ ULONG *pcBodies); + + HRESULT ( STDMETHODCALLTYPE *FindFirst )( + IMimeMessage * This, + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *FindNext )( + IMimeMessage * This, + /* [out][in] */ LPFINDBODY pFindBody, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *ResolveURL )( + IMimeMessage * This, + /* [in] */ HBODY hRelated, + /* [in] */ LPCSTR pszBase, + /* [in] */ LPCSTR pszURL, + /* [in] */ DWORD dwFlags, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *ToMultipart )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszSubType, + /* [out] */ LPHBODY phMultipart); + + HRESULT ( STDMETHODCALLTYPE *GetBodyOffsets )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [out][in] */ LPBODYOFFSETS pOffsets); + + HRESULT ( STDMETHODCALLTYPE *GetCharset )( + IMimeMessage * This, + /* [out] */ LPHCHARSET phCharset); + + HRESULT ( STDMETHODCALLTYPE *SetCharset )( + IMimeMessage * This, + /* [in] */ HCHARSET hCharset, + /* [in] */ CSETAPPLYTYPE applytype); + + HRESULT ( STDMETHODCALLTYPE *IsBodyType )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ IMSGBODYTYPE bodytype); + + HRESULT ( STDMETHODCALLTYPE *IsContentType )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszPriType, + /* [in] */ LPCSTR pszSubType); + + HRESULT ( STDMETHODCALLTYPE *QueryBodyProp )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + HRESULT ( STDMETHODCALLTYPE *GetBodyProp )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *SetBodyProp )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *DeleteBodyProp )( + IMimeMessage * This, + /* [in] */ HBODY hBody, + /* [in] */ LPCSTR pszName); + + HRESULT ( STDMETHODCALLTYPE *SetOption )( + IMimeMessage * This, + /* [in] */ const TYPEDID oid, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *GetOption )( + IMimeMessage * This, + /* [in] */ const TYPEDID oid, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *CreateWebPage )( + IMimeMessage * This, + /* [in] */ IStream *pRootStm, + /* [in] */ LPWEBPAGEOPTIONS pOptions, + /* [in] */ IMimeMessageCallback *pCallback, + /* [out] */ IMoniker **ppMoniker); + + HRESULT ( STDMETHODCALLTYPE *GetProp )( + IMimeMessage * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *SetProp )( + IMimeMessage * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + HRESULT ( STDMETHODCALLTYPE *DeleteProp )( + IMimeMessage * This, + /* [in] */ LPCSTR pszName); + + HRESULT ( STDMETHODCALLTYPE *QueryProp )( + IMimeMessage * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + HRESULT ( STDMETHODCALLTYPE *GetTextBody )( + IMimeMessage * This, + /* [in] */ DWORD dwTxtType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ IStream **ppStream, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *SetTextBody )( + IMimeMessage * This, + /* [in] */ DWORD dwTxtType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ HBODY hAlternative, + /* [in] */ IStream *pStream, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *AttachObject )( + IMimeMessage * This, + /* [in] */ REFIID riid, + /* [iid_is][in] */ void *pvObject, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *AttachFile )( + IMimeMessage * This, + /* [in] */ LPCSTR pszFilePath, + /* [in] */ IStream *pstmFile, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *AttachURL )( + IMimeMessage * This, + /* [in] */ LPCSTR pszBase, + /* [in] */ LPCSTR pszURL, + /* [in] */ DWORD dwFlags, + /* [in] */ IStream *pstmURL, + /* [out] */ LPSTR *ppszCIDURL, + /* [out] */ LPHBODY phBody); + + HRESULT ( STDMETHODCALLTYPE *GetAttachments )( + IMimeMessage * This, + /* [out] */ ULONG *pcAttach, + /* [out] */ LPHBODY *pprghAttach); + + HRESULT ( STDMETHODCALLTYPE *GetAddressTable )( + IMimeMessage * This, + /* [out] */ IMimeAddressTable **ppTable); + + HRESULT ( STDMETHODCALLTYPE *GetSender )( + IMimeMessage * This, + /* [out][in] */ LPADDRESSPROPS pAddress); + + HRESULT ( STDMETHODCALLTYPE *GetAddressTypes )( + IMimeMessage * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out][in] */ LPADDRESSLIST pList); + + HRESULT ( STDMETHODCALLTYPE *GetAddressFormat )( + IMimeMessage * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ADDRESSFORMAT format, + /* [out] */ LPSTR *ppszFormat); + + HRESULT ( STDMETHODCALLTYPE *EnumAddressTypes )( + IMimeMessage * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out] */ IMimeEnumAddressTypes **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *SplitMessage )( + IMimeMessage * This, + /* [in] */ ULONG cbMaxPart, + /* [out] */ IMimeMessageParts **ppParts); + + HRESULT ( STDMETHODCALLTYPE *GetRootMoniker )( + IMimeMessage * This, + /* [out] */ IMoniker **ppMoniker); + + END_INTERFACE + } IMimeMessageVtbl; + + interface IMimeMessage + { + CONST_VTBL struct IMimeMessageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeMessage_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeMessage_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeMessage_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeMessage_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMimeMessage_IsDirty(This) \ + (This)->lpVtbl -> IsDirty(This) + +#define IMimeMessage_Load(This,pStm) \ + (This)->lpVtbl -> Load(This,pStm) + +#define IMimeMessage_Save(This,pStm,fClearDirty) \ + (This)->lpVtbl -> Save(This,pStm,fClearDirty) + +#define IMimeMessage_GetSizeMax(This,pCbSize) \ + (This)->lpVtbl -> GetSizeMax(This,pCbSize) + +#define IMimeMessage_InitNew(This) \ + (This)->lpVtbl -> InitNew(This) + + +#define IMimeMessage_GetMessageSource(This,ppStream,dwFlags) \ + (This)->lpVtbl -> GetMessageSource(This,ppStream,dwFlags) + +#define IMimeMessage_GetMessageSize(This,pcbSize,dwFlags) \ + (This)->lpVtbl -> GetMessageSize(This,pcbSize,dwFlags) + +#define IMimeMessage_LoadOffsetTable(This,pStream) \ + (This)->lpVtbl -> LoadOffsetTable(This,pStream) + +#define IMimeMessage_SaveOffsetTable(This,pStream,dwFlags) \ + (This)->lpVtbl -> SaveOffsetTable(This,pStream,dwFlags) + +#define IMimeMessage_GetFlags(This,pdwFlags) \ + (This)->lpVtbl -> GetFlags(This,pdwFlags) + +#define IMimeMessage_Commit(This,dwFlags) \ + (This)->lpVtbl -> Commit(This,dwFlags) + +#define IMimeMessage_HandsOffStorage(This) \ + (This)->lpVtbl -> HandsOffStorage(This) + +#define IMimeMessage_BindToObject(This,hBody,riid,ppvObject) \ + (This)->lpVtbl -> BindToObject(This,hBody,riid,ppvObject) + +#define IMimeMessage_SaveBody(This,hBody,dwFlags,pStream) \ + (This)->lpVtbl -> SaveBody(This,hBody,dwFlags,pStream) + +#define IMimeMessage_InsertBody(This,location,hPivot,phBody) \ + (This)->lpVtbl -> InsertBody(This,location,hPivot,phBody) + +#define IMimeMessage_GetBody(This,location,hPivot,phBody) \ + (This)->lpVtbl -> GetBody(This,location,hPivot,phBody) + +#define IMimeMessage_DeleteBody(This,hBody,dwFlags) \ + (This)->lpVtbl -> DeleteBody(This,hBody,dwFlags) + +#define IMimeMessage_MoveBody(This,hBody,location) \ + (This)->lpVtbl -> MoveBody(This,hBody,location) + +#define IMimeMessage_CountBodies(This,hParent,fRecurse,pcBodies) \ + (This)->lpVtbl -> CountBodies(This,hParent,fRecurse,pcBodies) + +#define IMimeMessage_FindFirst(This,pFindBody,phBody) \ + (This)->lpVtbl -> FindFirst(This,pFindBody,phBody) + +#define IMimeMessage_FindNext(This,pFindBody,phBody) \ + (This)->lpVtbl -> FindNext(This,pFindBody,phBody) + +#define IMimeMessage_ResolveURL(This,hRelated,pszBase,pszURL,dwFlags,phBody) \ + (This)->lpVtbl -> ResolveURL(This,hRelated,pszBase,pszURL,dwFlags,phBody) + +#define IMimeMessage_ToMultipart(This,hBody,pszSubType,phMultipart) \ + (This)->lpVtbl -> ToMultipart(This,hBody,pszSubType,phMultipart) + +#define IMimeMessage_GetBodyOffsets(This,hBody,pOffsets) \ + (This)->lpVtbl -> GetBodyOffsets(This,hBody,pOffsets) + +#define IMimeMessage_GetCharset(This,phCharset) \ + (This)->lpVtbl -> GetCharset(This,phCharset) + +#define IMimeMessage_SetCharset(This,hCharset,applytype) \ + (This)->lpVtbl -> SetCharset(This,hCharset,applytype) + +#define IMimeMessage_IsBodyType(This,hBody,bodytype) \ + (This)->lpVtbl -> IsBodyType(This,hBody,bodytype) + +#define IMimeMessage_IsContentType(This,hBody,pszPriType,pszSubType) \ + (This)->lpVtbl -> IsContentType(This,hBody,pszPriType,pszSubType) + +#define IMimeMessage_QueryBodyProp(This,hBody,pszName,pszCriteria,fSubString,fCaseSensitive) \ + (This)->lpVtbl -> QueryBodyProp(This,hBody,pszName,pszCriteria,fSubString,fCaseSensitive) + +#define IMimeMessage_GetBodyProp(This,hBody,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> GetBodyProp(This,hBody,pszName,dwFlags,pValue) + +#define IMimeMessage_SetBodyProp(This,hBody,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> SetBodyProp(This,hBody,pszName,dwFlags,pValue) + +#define IMimeMessage_DeleteBodyProp(This,hBody,pszName) \ + (This)->lpVtbl -> DeleteBodyProp(This,hBody,pszName) + +#define IMimeMessage_SetOption(This,oid,pValue) \ + (This)->lpVtbl -> SetOption(This,oid,pValue) + +#define IMimeMessage_GetOption(This,oid,pValue) \ + (This)->lpVtbl -> GetOption(This,oid,pValue) + + +#define IMimeMessage_CreateWebPage(This,pRootStm,pOptions,pCallback,ppMoniker) \ + (This)->lpVtbl -> CreateWebPage(This,pRootStm,pOptions,pCallback,ppMoniker) + +#define IMimeMessage_GetProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> GetProp(This,pszName,dwFlags,pValue) + +#define IMimeMessage_SetProp(This,pszName,dwFlags,pValue) \ + (This)->lpVtbl -> SetProp(This,pszName,dwFlags,pValue) + +#define IMimeMessage_DeleteProp(This,pszName) \ + (This)->lpVtbl -> DeleteProp(This,pszName) + +#define IMimeMessage_QueryProp(This,pszName,pszCriteria,fSubString,fCaseSensitive) \ + (This)->lpVtbl -> QueryProp(This,pszName,pszCriteria,fSubString,fCaseSensitive) + +#define IMimeMessage_GetTextBody(This,dwTxtType,ietEncoding,ppStream,phBody) \ + (This)->lpVtbl -> GetTextBody(This,dwTxtType,ietEncoding,ppStream,phBody) + +#define IMimeMessage_SetTextBody(This,dwTxtType,ietEncoding,hAlternative,pStream,phBody) \ + (This)->lpVtbl -> SetTextBody(This,dwTxtType,ietEncoding,hAlternative,pStream,phBody) + +#define IMimeMessage_AttachObject(This,riid,pvObject,phBody) \ + (This)->lpVtbl -> AttachObject(This,riid,pvObject,phBody) + +#define IMimeMessage_AttachFile(This,pszFilePath,pstmFile,phBody) \ + (This)->lpVtbl -> AttachFile(This,pszFilePath,pstmFile,phBody) + +#define IMimeMessage_AttachURL(This,pszBase,pszURL,dwFlags,pstmURL,ppszCIDURL,phBody) \ + (This)->lpVtbl -> AttachURL(This,pszBase,pszURL,dwFlags,pstmURL,ppszCIDURL,phBody) + +#define IMimeMessage_GetAttachments(This,pcAttach,pprghAttach) \ + (This)->lpVtbl -> GetAttachments(This,pcAttach,pprghAttach) + +#define IMimeMessage_GetAddressTable(This,ppTable) \ + (This)->lpVtbl -> GetAddressTable(This,ppTable) + +#define IMimeMessage_GetSender(This,pAddress) \ + (This)->lpVtbl -> GetSender(This,pAddress) + +#define IMimeMessage_GetAddressTypes(This,dwAdrTypes,dwProps,pList) \ + (This)->lpVtbl -> GetAddressTypes(This,dwAdrTypes,dwProps,pList) + +#define IMimeMessage_GetAddressFormat(This,dwAdrType,format,ppszFormat) \ + (This)->lpVtbl -> GetAddressFormat(This,dwAdrType,format,ppszFormat) + +#define IMimeMessage_EnumAddressTypes(This,dwAdrTypes,dwProps,ppEnum) \ + (This)->lpVtbl -> EnumAddressTypes(This,dwAdrTypes,dwProps,ppEnum) + +#define IMimeMessage_SplitMessage(This,cbMaxPart,ppParts) \ + (This)->lpVtbl -> SplitMessage(This,cbMaxPart,ppParts) + +#define IMimeMessage_GetRootMoniker(This,ppMoniker) \ + (This)->lpVtbl -> GetRootMoniker(This,ppMoniker) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeMessage_CreateWebPage_Proxy( + IMimeMessage * This, + /* [in] */ IStream *pRootStm, + /* [in] */ LPWEBPAGEOPTIONS pOptions, + /* [in] */ IMimeMessageCallback *pCallback, + /* [out] */ IMoniker **ppMoniker); + + +void __RPC_STUB IMimeMessage_CreateWebPage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetProp_Proxy( + IMimeMessage * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [out][in] */ LPPROPVARIANT pValue); + + +void __RPC_STUB IMimeMessage_GetProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_SetProp_Proxy( + IMimeMessage * This, + /* [in] */ LPCSTR pszName, + /* [in] */ DWORD dwFlags, + /* [in] */ LPCPROPVARIANT pValue); + + +void __RPC_STUB IMimeMessage_SetProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_DeleteProp_Proxy( + IMimeMessage * This, + /* [in] */ LPCSTR pszName); + + +void __RPC_STUB IMimeMessage_DeleteProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_QueryProp_Proxy( + IMimeMessage * This, + /* [in] */ LPCSTR pszName, + /* [in] */ LPCSTR pszCriteria, + /* [in] */ boolean fSubString, + /* [in] */ boolean fCaseSensitive); + + +void __RPC_STUB IMimeMessage_QueryProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetTextBody_Proxy( + IMimeMessage * This, + /* [in] */ DWORD dwTxtType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [out] */ IStream **ppStream, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessage_GetTextBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_SetTextBody_Proxy( + IMimeMessage * This, + /* [in] */ DWORD dwTxtType, + /* [in] */ ENCODINGTYPE ietEncoding, + /* [in] */ HBODY hAlternative, + /* [in] */ IStream *pStream, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessage_SetTextBody_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_AttachObject_Proxy( + IMimeMessage * This, + /* [in] */ REFIID riid, + /* [iid_is][in] */ void *pvObject, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessage_AttachObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_AttachFile_Proxy( + IMimeMessage * This, + /* [in] */ LPCSTR pszFilePath, + /* [in] */ IStream *pstmFile, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessage_AttachFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_AttachURL_Proxy( + IMimeMessage * This, + /* [in] */ LPCSTR pszBase, + /* [in] */ LPCSTR pszURL, + /* [in] */ DWORD dwFlags, + /* [in] */ IStream *pstmURL, + /* [out] */ LPSTR *ppszCIDURL, + /* [out] */ LPHBODY phBody); + + +void __RPC_STUB IMimeMessage_AttachURL_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetAttachments_Proxy( + IMimeMessage * This, + /* [out] */ ULONG *pcAttach, + /* [out] */ LPHBODY *pprghAttach); + + +void __RPC_STUB IMimeMessage_GetAttachments_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetAddressTable_Proxy( + IMimeMessage * This, + /* [out] */ IMimeAddressTable **ppTable); + + +void __RPC_STUB IMimeMessage_GetAddressTable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetSender_Proxy( + IMimeMessage * This, + /* [out][in] */ LPADDRESSPROPS pAddress); + + +void __RPC_STUB IMimeMessage_GetSender_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetAddressTypes_Proxy( + IMimeMessage * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out][in] */ LPADDRESSLIST pList); + + +void __RPC_STUB IMimeMessage_GetAddressTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetAddressFormat_Proxy( + IMimeMessage * This, + /* [in] */ DWORD dwAdrType, + /* [in] */ ADDRESSFORMAT format, + /* [out] */ LPSTR *ppszFormat); + + +void __RPC_STUB IMimeMessage_GetAddressFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_EnumAddressTypes_Proxy( + IMimeMessage * This, + /* [in] */ DWORD dwAdrTypes, + /* [in] */ DWORD dwProps, + /* [out] */ IMimeEnumAddressTypes **ppEnum); + + +void __RPC_STUB IMimeMessage_EnumAddressTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_SplitMessage_Proxy( + IMimeMessage * This, + /* [in] */ ULONG cbMaxPart, + /* [out] */ IMimeMessageParts **ppParts); + + +void __RPC_STUB IMimeMessage_SplitMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessage_GetRootMoniker_Proxy( + IMimeMessage * This, + /* [out] */ IMoniker **ppMoniker); + + +void __RPC_STUB IMimeMessage_GetRootMoniker_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeMessage_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeMessageCallback_INTERFACE_DEFINED__ +#define __IMimeMessageCallback_INTERFACE_DEFINED__ + +/* interface IMimeMessageCallback */ +/* [object][helpstring][uuid] */ + +typedef IMimeMessageCallback *LPMIMEMESSAGECALLBACK; + + +EXTERN_C const IID IID_IMimeMessageCallback; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("761AA641-7BDA-11d1-8AA9-00C04FB951F3") + IMimeMessageCallback : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE OnWebPageSplitter( + /* [in] */ DWORD cInlined, + /* [in] */ IStream *ppStream) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeMessageCallbackVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeMessageCallback * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeMessageCallback * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeMessageCallback * This); + + HRESULT ( STDMETHODCALLTYPE *OnWebPageSplitter )( + IMimeMessageCallback * This, + /* [in] */ DWORD cInlined, + /* [in] */ IStream *ppStream); + + END_INTERFACE + } IMimeMessageCallbackVtbl; + + interface IMimeMessageCallback + { + CONST_VTBL struct IMimeMessageCallbackVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeMessageCallback_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeMessageCallback_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeMessageCallback_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeMessageCallback_OnWebPageSplitter(This,cInlined,ppStream) \ + (This)->lpVtbl -> OnWebPageSplitter(This,cInlined,ppStream) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeMessageCallback_OnWebPageSplitter_Proxy( + IMimeMessageCallback * This, + /* [in] */ DWORD cInlined, + /* [in] */ IStream *ppStream); + + +void __RPC_STUB IMimeMessageCallback_OnWebPageSplitter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeMessageCallback_INTERFACE_DEFINED__ */ + + +#ifndef __IPersistMime_INTERFACE_DEFINED__ +#define __IPersistMime_INTERFACE_DEFINED__ + +/* interface IPersistMime */ +/* [object][helpstring][uuid] */ + +typedef IPersistMime *LPPERSISTMIME; + +#define PMS_HTML 0x00000001 +#define PMS_TEXT 0x00000002 + +EXTERN_C const IID IID_IPersistMime; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DE4AD8DA-555F-11d1-8DD0-00C04FB951F9") + IPersistMime : public IPersist + { + public: + virtual HRESULT STDMETHODCALLTYPE Load( + /* [in] */ IMimeMessage *pMsg) = 0; + + virtual HRESULT STDMETHODCALLTYPE Save( + /* [in] */ IMimeMessage *pMsg, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IPersistMimeVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IPersistMime * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IPersistMime * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IPersistMime * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IPersistMime * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IPersistMime * This, + /* [in] */ IMimeMessage *pMsg); + + HRESULT ( STDMETHODCALLTYPE *Save )( + IPersistMime * This, + /* [in] */ IMimeMessage *pMsg, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } IPersistMimeVtbl; + + interface IPersistMime + { + CONST_VTBL struct IPersistMimeVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IPersistMime_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IPersistMime_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IPersistMime_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IPersistMime_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IPersistMime_Load(This,pMsg) \ + (This)->lpVtbl -> Load(This,pMsg) + +#define IPersistMime_Save(This,pMsg,dwFlags) \ + (This)->lpVtbl -> Save(This,pMsg,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IPersistMime_Load_Proxy( + IPersistMime * This, + /* [in] */ IMimeMessage *pMsg); + + +void __RPC_STUB IPersistMime_Load_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPersistMime_Save_Proxy( + IPersistMime * This, + /* [in] */ IMimeMessage *pMsg, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IPersistMime_Save_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IPersistMime_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeMessageParts_INTERFACE_DEFINED__ +#define __IMimeMessageParts_INTERFACE_DEFINED__ + +/* interface IMimeMessageParts */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeMessageParts *LPMIMEMESSAGEPARTS; + + +EXTERN_C const IID IID_IMimeMessageParts; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C558834F-7F86-11d0-8252-00C04FD85AB4") + IMimeMessageParts : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CombineParts( + /* [out] */ IMimeMessage **ppMessage) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddPart( + /* [in] */ IMimeMessage *pMessage) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMaxParts( + /* [in] */ ULONG cParts) = 0; + + virtual HRESULT STDMETHODCALLTYPE CountParts( + /* [out] */ ULONG *pcParts) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumParts( + /* [out] */ IMimeEnumMessageParts **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeMessagePartsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeMessageParts * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeMessageParts * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeMessageParts * This); + + HRESULT ( STDMETHODCALLTYPE *CombineParts )( + IMimeMessageParts * This, + /* [out] */ IMimeMessage **ppMessage); + + HRESULT ( STDMETHODCALLTYPE *AddPart )( + IMimeMessageParts * This, + /* [in] */ IMimeMessage *pMessage); + + HRESULT ( STDMETHODCALLTYPE *SetMaxParts )( + IMimeMessageParts * This, + /* [in] */ ULONG cParts); + + HRESULT ( STDMETHODCALLTYPE *CountParts )( + IMimeMessageParts * This, + /* [out] */ ULONG *pcParts); + + HRESULT ( STDMETHODCALLTYPE *EnumParts )( + IMimeMessageParts * This, + /* [out] */ IMimeEnumMessageParts **ppEnum); + + END_INTERFACE + } IMimeMessagePartsVtbl; + + interface IMimeMessageParts + { + CONST_VTBL struct IMimeMessagePartsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeMessageParts_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeMessageParts_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeMessageParts_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeMessageParts_CombineParts(This,ppMessage) \ + (This)->lpVtbl -> CombineParts(This,ppMessage) + +#define IMimeMessageParts_AddPart(This,pMessage) \ + (This)->lpVtbl -> AddPart(This,pMessage) + +#define IMimeMessageParts_SetMaxParts(This,cParts) \ + (This)->lpVtbl -> SetMaxParts(This,cParts) + +#define IMimeMessageParts_CountParts(This,pcParts) \ + (This)->lpVtbl -> CountParts(This,pcParts) + +#define IMimeMessageParts_EnumParts(This,ppEnum) \ + (This)->lpVtbl -> EnumParts(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeMessageParts_CombineParts_Proxy( + IMimeMessageParts * This, + /* [out] */ IMimeMessage **ppMessage); + + +void __RPC_STUB IMimeMessageParts_CombineParts_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageParts_AddPart_Proxy( + IMimeMessageParts * This, + /* [in] */ IMimeMessage *pMessage); + + +void __RPC_STUB IMimeMessageParts_AddPart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageParts_SetMaxParts_Proxy( + IMimeMessageParts * This, + /* [in] */ ULONG cParts); + + +void __RPC_STUB IMimeMessageParts_SetMaxParts_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageParts_CountParts_Proxy( + IMimeMessageParts * This, + /* [out] */ ULONG *pcParts); + + +void __RPC_STUB IMimeMessageParts_CountParts_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeMessageParts_EnumParts_Proxy( + IMimeMessageParts * This, + /* [out] */ IMimeEnumMessageParts **ppEnum); + + +void __RPC_STUB IMimeMessageParts_EnumParts_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeMessageParts_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeEnumHeaderRows_INTERFACE_DEFINED__ +#define __IMimeEnumHeaderRows_INTERFACE_DEFINED__ + +/* interface IMimeEnumHeaderRows */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeEnumHeaderRows *LPMIMEENUMHEADERROWS; + +typedef struct tagENUMHEADERROW + { + HHEADERROW hRow; + LPSTR pszHeader; + LPSTR pszData; + ULONG cchData; + DWORD dwReserved; + } ENUMHEADERROW; + +typedef struct tagENUMHEADERROW *LPENUMHEADERROW; + + +EXTERN_C const IID IID_IMimeEnumHeaderRows; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C558834D-7F86-11d0-8252-00C04FD85AB4") + IMimeEnumHeaderRows : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFetch, + /* [out][in] */ LPENUMHEADERROW prgRow, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cItems) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMimeEnumHeaderRows **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Count( + /* [out] */ ULONG *pcItems) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeEnumHeaderRowsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeEnumHeaderRows * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeEnumHeaderRows * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeEnumHeaderRows * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IMimeEnumHeaderRows * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPENUMHEADERROW prgRow, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IMimeEnumHeaderRows * This, + /* [in] */ ULONG cItems); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IMimeEnumHeaderRows * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimeEnumHeaderRows * This, + /* [out] */ IMimeEnumHeaderRows **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Count )( + IMimeEnumHeaderRows * This, + /* [out] */ ULONG *pcItems); + + END_INTERFACE + } IMimeEnumHeaderRowsVtbl; + + interface IMimeEnumHeaderRows + { + CONST_VTBL struct IMimeEnumHeaderRowsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeEnumHeaderRows_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeEnumHeaderRows_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeEnumHeaderRows_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeEnumHeaderRows_Next(This,cFetch,prgRow,pcFetched) \ + (This)->lpVtbl -> Next(This,cFetch,prgRow,pcFetched) + +#define IMimeEnumHeaderRows_Skip(This,cItems) \ + (This)->lpVtbl -> Skip(This,cItems) + +#define IMimeEnumHeaderRows_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IMimeEnumHeaderRows_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#define IMimeEnumHeaderRows_Count(This,pcItems) \ + (This)->lpVtbl -> Count(This,pcItems) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeEnumHeaderRows_Next_Proxy( + IMimeEnumHeaderRows * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPENUMHEADERROW prgRow, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IMimeEnumHeaderRows_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumHeaderRows_Skip_Proxy( + IMimeEnumHeaderRows * This, + /* [in] */ ULONG cItems); + + +void __RPC_STUB IMimeEnumHeaderRows_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumHeaderRows_Reset_Proxy( + IMimeEnumHeaderRows * This); + + +void __RPC_STUB IMimeEnumHeaderRows_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumHeaderRows_Clone_Proxy( + IMimeEnumHeaderRows * This, + /* [out] */ IMimeEnumHeaderRows **ppEnum); + + +void __RPC_STUB IMimeEnumHeaderRows_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumHeaderRows_Count_Proxy( + IMimeEnumHeaderRows * This, + /* [out] */ ULONG *pcItems); + + +void __RPC_STUB IMimeEnumHeaderRows_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeEnumHeaderRows_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeEnumProperties_INTERFACE_DEFINED__ +#define __IMimeEnumProperties_INTERFACE_DEFINED__ + +/* interface IMimeEnumProperties */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeEnumProperties *LPMIMEENUMPROPERTIES; + +typedef struct tagENUMPROPERTY + { + LPSTR pszName; + HHEADERROW hRow; + DWORD dwPropId; + } ENUMPROPERTY; + +typedef struct tagENUMPROPERTY *LPENUMPROPERTY; + + +EXTERN_C const IID IID_IMimeEnumProperties; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FD853CEE-7F86-11d0-8252-00C04FD85AB4") + IMimeEnumProperties : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFetch, + /* [out][in] */ LPENUMPROPERTY prgProp, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cItems) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMimeEnumProperties **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Count( + /* [out] */ ULONG *pcItems) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeEnumPropertiesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeEnumProperties * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeEnumProperties * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeEnumProperties * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IMimeEnumProperties * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPENUMPROPERTY prgProp, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IMimeEnumProperties * This, + /* [in] */ ULONG cItems); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IMimeEnumProperties * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimeEnumProperties * This, + /* [out] */ IMimeEnumProperties **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Count )( + IMimeEnumProperties * This, + /* [out] */ ULONG *pcItems); + + END_INTERFACE + } IMimeEnumPropertiesVtbl; + + interface IMimeEnumProperties + { + CONST_VTBL struct IMimeEnumPropertiesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeEnumProperties_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeEnumProperties_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeEnumProperties_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeEnumProperties_Next(This,cFetch,prgProp,pcFetched) \ + (This)->lpVtbl -> Next(This,cFetch,prgProp,pcFetched) + +#define IMimeEnumProperties_Skip(This,cItems) \ + (This)->lpVtbl -> Skip(This,cItems) + +#define IMimeEnumProperties_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IMimeEnumProperties_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#define IMimeEnumProperties_Count(This,pcItems) \ + (This)->lpVtbl -> Count(This,pcItems) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeEnumProperties_Next_Proxy( + IMimeEnumProperties * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPENUMPROPERTY prgProp, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IMimeEnumProperties_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumProperties_Skip_Proxy( + IMimeEnumProperties * This, + /* [in] */ ULONG cItems); + + +void __RPC_STUB IMimeEnumProperties_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumProperties_Reset_Proxy( + IMimeEnumProperties * This); + + +void __RPC_STUB IMimeEnumProperties_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumProperties_Clone_Proxy( + IMimeEnumProperties * This, + /* [out] */ IMimeEnumProperties **ppEnum); + + +void __RPC_STUB IMimeEnumProperties_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumProperties_Count_Proxy( + IMimeEnumProperties * This, + /* [out] */ ULONG *pcItems); + + +void __RPC_STUB IMimeEnumProperties_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeEnumProperties_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeEnumAddressTypes_INTERFACE_DEFINED__ +#define __IMimeEnumAddressTypes_INTERFACE_DEFINED__ + +/* interface IMimeEnumAddressTypes */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeEnumAddressTypes *LPMIMEENUMADDRESSTYPES; + + +EXTERN_C const IID IID_IMimeEnumAddressTypes; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C5588354-7F86-11d0-8252-00C04FD85AB4") + IMimeEnumAddressTypes : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFetch, + /* [out][in] */ LPADDRESSPROPS prgAdr, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cItems) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMimeEnumAddressTypes **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Count( + /* [out] */ ULONG *pcItems) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeEnumAddressTypesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeEnumAddressTypes * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeEnumAddressTypes * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeEnumAddressTypes * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IMimeEnumAddressTypes * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPADDRESSPROPS prgAdr, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IMimeEnumAddressTypes * This, + /* [in] */ ULONG cItems); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IMimeEnumAddressTypes * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimeEnumAddressTypes * This, + /* [out] */ IMimeEnumAddressTypes **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Count )( + IMimeEnumAddressTypes * This, + /* [out] */ ULONG *pcItems); + + END_INTERFACE + } IMimeEnumAddressTypesVtbl; + + interface IMimeEnumAddressTypes + { + CONST_VTBL struct IMimeEnumAddressTypesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeEnumAddressTypes_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeEnumAddressTypes_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeEnumAddressTypes_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeEnumAddressTypes_Next(This,cFetch,prgAdr,pcFetched) \ + (This)->lpVtbl -> Next(This,cFetch,prgAdr,pcFetched) + +#define IMimeEnumAddressTypes_Skip(This,cItems) \ + (This)->lpVtbl -> Skip(This,cItems) + +#define IMimeEnumAddressTypes_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IMimeEnumAddressTypes_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#define IMimeEnumAddressTypes_Count(This,pcItems) \ + (This)->lpVtbl -> Count(This,pcItems) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeEnumAddressTypes_Next_Proxy( + IMimeEnumAddressTypes * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPADDRESSPROPS prgAdr, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IMimeEnumAddressTypes_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumAddressTypes_Skip_Proxy( + IMimeEnumAddressTypes * This, + /* [in] */ ULONG cItems); + + +void __RPC_STUB IMimeEnumAddressTypes_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumAddressTypes_Reset_Proxy( + IMimeEnumAddressTypes * This); + + +void __RPC_STUB IMimeEnumAddressTypes_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumAddressTypes_Clone_Proxy( + IMimeEnumAddressTypes * This, + /* [out] */ IMimeEnumAddressTypes **ppEnum); + + +void __RPC_STUB IMimeEnumAddressTypes_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumAddressTypes_Count_Proxy( + IMimeEnumAddressTypes * This, + /* [out] */ ULONG *pcItems); + + +void __RPC_STUB IMimeEnumAddressTypes_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeEnumAddressTypes_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeEnumMessageParts_INTERFACE_DEFINED__ +#define __IMimeEnumMessageParts_INTERFACE_DEFINED__ + +/* interface IMimeEnumMessageParts */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeEnumMessageParts *LPMIMEENUMMESSAGEPARTS; + + +EXTERN_C const IID IID_IMimeEnumMessageParts; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C5588350-7F86-11d0-8252-00C04FD85AB4") + IMimeEnumMessageParts : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFetch, + /* [out][in] */ IMimeMessage **prgpMessage, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cItems) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMimeEnumMessageParts **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Count( + /* [out] */ ULONG *pcItems) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeEnumMessagePartsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeEnumMessageParts * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeEnumMessageParts * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeEnumMessageParts * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IMimeEnumMessageParts * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ IMimeMessage **prgpMessage, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IMimeEnumMessageParts * This, + /* [in] */ ULONG cItems); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IMimeEnumMessageParts * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMimeEnumMessageParts * This, + /* [out] */ IMimeEnumMessageParts **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Count )( + IMimeEnumMessageParts * This, + /* [out] */ ULONG *pcItems); + + END_INTERFACE + } IMimeEnumMessagePartsVtbl; + + interface IMimeEnumMessageParts + { + CONST_VTBL struct IMimeEnumMessagePartsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeEnumMessageParts_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeEnumMessageParts_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeEnumMessageParts_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeEnumMessageParts_Next(This,cFetch,prgpMessage,pcFetched) \ + (This)->lpVtbl -> Next(This,cFetch,prgpMessage,pcFetched) + +#define IMimeEnumMessageParts_Skip(This,cItems) \ + (This)->lpVtbl -> Skip(This,cItems) + +#define IMimeEnumMessageParts_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IMimeEnumMessageParts_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#define IMimeEnumMessageParts_Count(This,pcItems) \ + (This)->lpVtbl -> Count(This,pcItems) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeEnumMessageParts_Next_Proxy( + IMimeEnumMessageParts * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ IMimeMessage **prgpMessage, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IMimeEnumMessageParts_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumMessageParts_Skip_Proxy( + IMimeEnumMessageParts * This, + /* [in] */ ULONG cItems); + + +void __RPC_STUB IMimeEnumMessageParts_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumMessageParts_Reset_Proxy( + IMimeEnumMessageParts * This); + + +void __RPC_STUB IMimeEnumMessageParts_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumMessageParts_Clone_Proxy( + IMimeEnumMessageParts * This, + /* [out] */ IMimeEnumMessageParts **ppEnum); + + +void __RPC_STUB IMimeEnumMessageParts_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEnumMessageParts_Count_Proxy( + IMimeEnumMessageParts * This, + /* [out] */ ULONG *pcItems); + + +void __RPC_STUB IMimeEnumMessageParts_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeEnumMessageParts_INTERFACE_DEFINED__ */ + + +#ifndef __IHashTable_INTERFACE_DEFINED__ +#define __IHashTable_INTERFACE_DEFINED__ + +/* interface IHashTable */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IHashTable *LPHASHTABLE; + +#define HF_NO_DUPLICATES ( 0x1 ) + + +EXTERN_C const IID IID_IHashTable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("64577981-86D7-11d1-BDFC-00C04FA31009") + IHashTable : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Init( + /* [in] */ DWORD dwSize, + /* [in] */ BOOL fDupeKeys) = 0; + + virtual HRESULT STDMETHODCALLTYPE Insert( + /* [in] */ LPSTR psz, + /* [in] */ LPVOID pv, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Replace( + /* [in] */ LPSTR psz, + /* [in] */ LPVOID pv) = 0; + + virtual HRESULT STDMETHODCALLTYPE Find( + /* [in] */ LPSTR psz, + /* [in] */ BOOL fRemove, + /* [out] */ LPVOID *ppv) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFetch, + /* [out][in] */ LPVOID **prgpv, + /* [out] */ ULONG *pcFetched) = 0; + + }; + +#else /* C style interface */ + + typedef struct IHashTableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IHashTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IHashTable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IHashTable * This); + + HRESULT ( STDMETHODCALLTYPE *Init )( + IHashTable * This, + /* [in] */ DWORD dwSize, + /* [in] */ BOOL fDupeKeys); + + HRESULT ( STDMETHODCALLTYPE *Insert )( + IHashTable * This, + /* [in] */ LPSTR psz, + /* [in] */ LPVOID pv, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Replace )( + IHashTable * This, + /* [in] */ LPSTR psz, + /* [in] */ LPVOID pv); + + HRESULT ( STDMETHODCALLTYPE *Find )( + IHashTable * This, + /* [in] */ LPSTR psz, + /* [in] */ BOOL fRemove, + /* [out] */ LPVOID *ppv); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IHashTable * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IHashTable * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPVOID **prgpv, + /* [out] */ ULONG *pcFetched); + + END_INTERFACE + } IHashTableVtbl; + + interface IHashTable + { + CONST_VTBL struct IHashTableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IHashTable_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IHashTable_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IHashTable_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IHashTable_Init(This,dwSize,fDupeKeys) \ + (This)->lpVtbl -> Init(This,dwSize,fDupeKeys) + +#define IHashTable_Insert(This,psz,pv,dwFlags) \ + (This)->lpVtbl -> Insert(This,psz,pv,dwFlags) + +#define IHashTable_Replace(This,psz,pv) \ + (This)->lpVtbl -> Replace(This,psz,pv) + +#define IHashTable_Find(This,psz,fRemove,ppv) \ + (This)->lpVtbl -> Find(This,psz,fRemove,ppv) + +#define IHashTable_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IHashTable_Next(This,cFetch,prgpv,pcFetched) \ + (This)->lpVtbl -> Next(This,cFetch,prgpv,pcFetched) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IHashTable_Init_Proxy( + IHashTable * This, + /* [in] */ DWORD dwSize, + /* [in] */ BOOL fDupeKeys); + + +void __RPC_STUB IHashTable_Init_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IHashTable_Insert_Proxy( + IHashTable * This, + /* [in] */ LPSTR psz, + /* [in] */ LPVOID pv, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IHashTable_Insert_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IHashTable_Replace_Proxy( + IHashTable * This, + /* [in] */ LPSTR psz, + /* [in] */ LPVOID pv); + + +void __RPC_STUB IHashTable_Replace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IHashTable_Find_Proxy( + IHashTable * This, + /* [in] */ LPSTR psz, + /* [in] */ BOOL fRemove, + /* [out] */ LPVOID *ppv); + + +void __RPC_STUB IHashTable_Find_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IHashTable_Reset_Proxy( + IHashTable * This); + + +void __RPC_STUB IHashTable_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IHashTable_Next_Proxy( + IHashTable * This, + /* [in] */ ULONG cFetch, + /* [out][in] */ LPVOID **prgpv, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IHashTable_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IHashTable_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeAllocator_INTERFACE_DEFINED__ +#define __IMimeAllocator_INTERFACE_DEFINED__ + +/* interface IMimeAllocator */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeAllocator *LPMIMEALLOCATOR; + + +EXTERN_C const IID IID_IMimeAllocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C5588351-7F86-11d0-8252-00C04FD85AB4") + IMimeAllocator : public IMalloc + { + public: + virtual HRESULT STDMETHODCALLTYPE FreeParamInfoArray( + /* [in] */ ULONG cParams, + /* [in] */ LPMIMEPARAMINFO prgParam, + /* [in] */ boolean fFreeArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeAddressList( + /* [out][in] */ LPADDRESSLIST pList) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeAddressProps( + /* [out][in] */ LPADDRESSPROPS pAddress) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseObjects( + /* [in] */ ULONG cObjects, + /* [in] */ IUnknown **prgpUnknown, + /* [in] */ boolean fFreeArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeEnumHeaderRowArray( + /* [in] */ ULONG cRows, + /* [in] */ LPENUMHEADERROW prgRow, + /* [in] */ boolean fFreeArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeEnumPropertyArray( + /* [in] */ ULONG cProps, + /* [in] */ LPENUMPROPERTY prgProp, + /* [in] */ boolean fFreeArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeThumbprint( + /* [in] */ THUMBBLOB *pthumbprint) = 0; + + virtual HRESULT STDMETHODCALLTYPE PropVariantClear( + /* [in] */ LPPROPVARIANT pProp) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeAllocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeAllocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeAllocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeAllocator * This); + + void *( STDMETHODCALLTYPE *Alloc )( + IMimeAllocator * This, + /* [in] */ SIZE_T cb); + + void *( STDMETHODCALLTYPE *Realloc )( + IMimeAllocator * This, + /* [in] */ void *pv, + /* [in] */ SIZE_T cb); + + void ( STDMETHODCALLTYPE *Free )( + IMimeAllocator * This, + /* [in] */ void *pv); + + SIZE_T ( STDMETHODCALLTYPE *GetSize )( + IMimeAllocator * This, + /* [in] */ void *pv); + + int ( STDMETHODCALLTYPE *DidAlloc )( + IMimeAllocator * This, + void *pv); + + void ( STDMETHODCALLTYPE *HeapMinimize )( + IMimeAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *FreeParamInfoArray )( + IMimeAllocator * This, + /* [in] */ ULONG cParams, + /* [in] */ LPMIMEPARAMINFO prgParam, + /* [in] */ boolean fFreeArray); + + HRESULT ( STDMETHODCALLTYPE *FreeAddressList )( + IMimeAllocator * This, + /* [out][in] */ LPADDRESSLIST pList); + + HRESULT ( STDMETHODCALLTYPE *FreeAddressProps )( + IMimeAllocator * This, + /* [out][in] */ LPADDRESSPROPS pAddress); + + HRESULT ( STDMETHODCALLTYPE *ReleaseObjects )( + IMimeAllocator * This, + /* [in] */ ULONG cObjects, + /* [in] */ IUnknown **prgpUnknown, + /* [in] */ boolean fFreeArray); + + HRESULT ( STDMETHODCALLTYPE *FreeEnumHeaderRowArray )( + IMimeAllocator * This, + /* [in] */ ULONG cRows, + /* [in] */ LPENUMHEADERROW prgRow, + /* [in] */ boolean fFreeArray); + + HRESULT ( STDMETHODCALLTYPE *FreeEnumPropertyArray )( + IMimeAllocator * This, + /* [in] */ ULONG cProps, + /* [in] */ LPENUMPROPERTY prgProp, + /* [in] */ boolean fFreeArray); + + HRESULT ( STDMETHODCALLTYPE *FreeThumbprint )( + IMimeAllocator * This, + /* [in] */ THUMBBLOB *pthumbprint); + + HRESULT ( STDMETHODCALLTYPE *PropVariantClear )( + IMimeAllocator * This, + /* [in] */ LPPROPVARIANT pProp); + + END_INTERFACE + } IMimeAllocatorVtbl; + + interface IMimeAllocator + { + CONST_VTBL struct IMimeAllocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeAllocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeAllocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeAllocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeAllocator_Alloc(This,cb) \ + (This)->lpVtbl -> Alloc(This,cb) + +#define IMimeAllocator_Realloc(This,pv,cb) \ + (This)->lpVtbl -> Realloc(This,pv,cb) + +#define IMimeAllocator_Free(This,pv) \ + (This)->lpVtbl -> Free(This,pv) + +#define IMimeAllocator_GetSize(This,pv) \ + (This)->lpVtbl -> GetSize(This,pv) + +#define IMimeAllocator_DidAlloc(This,pv) \ + (This)->lpVtbl -> DidAlloc(This,pv) + +#define IMimeAllocator_HeapMinimize(This) \ + (This)->lpVtbl -> HeapMinimize(This) + + +#define IMimeAllocator_FreeParamInfoArray(This,cParams,prgParam,fFreeArray) \ + (This)->lpVtbl -> FreeParamInfoArray(This,cParams,prgParam,fFreeArray) + +#define IMimeAllocator_FreeAddressList(This,pList) \ + (This)->lpVtbl -> FreeAddressList(This,pList) + +#define IMimeAllocator_FreeAddressProps(This,pAddress) \ + (This)->lpVtbl -> FreeAddressProps(This,pAddress) + +#define IMimeAllocator_ReleaseObjects(This,cObjects,prgpUnknown,fFreeArray) \ + (This)->lpVtbl -> ReleaseObjects(This,cObjects,prgpUnknown,fFreeArray) + +#define IMimeAllocator_FreeEnumHeaderRowArray(This,cRows,prgRow,fFreeArray) \ + (This)->lpVtbl -> FreeEnumHeaderRowArray(This,cRows,prgRow,fFreeArray) + +#define IMimeAllocator_FreeEnumPropertyArray(This,cProps,prgProp,fFreeArray) \ + (This)->lpVtbl -> FreeEnumPropertyArray(This,cProps,prgProp,fFreeArray) + +#define IMimeAllocator_FreeThumbprint(This,pthumbprint) \ + (This)->lpVtbl -> FreeThumbprint(This,pthumbprint) + +#define IMimeAllocator_PropVariantClear(This,pProp) \ + (This)->lpVtbl -> PropVariantClear(This,pProp) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_FreeParamInfoArray_Proxy( + IMimeAllocator * This, + /* [in] */ ULONG cParams, + /* [in] */ LPMIMEPARAMINFO prgParam, + /* [in] */ boolean fFreeArray); + + +void __RPC_STUB IMimeAllocator_FreeParamInfoArray_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_FreeAddressList_Proxy( + IMimeAllocator * This, + /* [out][in] */ LPADDRESSLIST pList); + + +void __RPC_STUB IMimeAllocator_FreeAddressList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_FreeAddressProps_Proxy( + IMimeAllocator * This, + /* [out][in] */ LPADDRESSPROPS pAddress); + + +void __RPC_STUB IMimeAllocator_FreeAddressProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_ReleaseObjects_Proxy( + IMimeAllocator * This, + /* [in] */ ULONG cObjects, + /* [in] */ IUnknown **prgpUnknown, + /* [in] */ boolean fFreeArray); + + +void __RPC_STUB IMimeAllocator_ReleaseObjects_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_FreeEnumHeaderRowArray_Proxy( + IMimeAllocator * This, + /* [in] */ ULONG cRows, + /* [in] */ LPENUMHEADERROW prgRow, + /* [in] */ boolean fFreeArray); + + +void __RPC_STUB IMimeAllocator_FreeEnumHeaderRowArray_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_FreeEnumPropertyArray_Proxy( + IMimeAllocator * This, + /* [in] */ ULONG cProps, + /* [in] */ LPENUMPROPERTY prgProp, + /* [in] */ boolean fFreeArray); + + +void __RPC_STUB IMimeAllocator_FreeEnumPropertyArray_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_FreeThumbprint_Proxy( + IMimeAllocator * This, + /* [in] */ THUMBBLOB *pthumbprint); + + +void __RPC_STUB IMimeAllocator_FreeThumbprint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeAllocator_PropVariantClear_Proxy( + IMimeAllocator * This, + /* [in] */ LPPROPVARIANT pProp); + + +void __RPC_STUB IMimeAllocator_PropVariantClear_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeAllocator_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeObjResolver_INTERFACE_DEFINED__ +#define __IMimeObjResolver_INTERFACE_DEFINED__ + +/* interface IMimeObjResolver */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeObjResolver *LPMIMEOBJRESOLVER; + + +EXTERN_C const IID IID_IMimeObjResolver; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FECEAFFD-C441-11d1-960E-00C04FBD7C09") + IMimeObjResolver : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE MimeOleObjectFromMoniker( + /* [in] */ BINDF bindf, + /* [in] */ IMoniker *pmkOriginal, + /* [in] */ IBindCtx *pBindCtx, + /* [in] */ REFIID riid, + /* [out] */ LPVOID *ppvObject, + /* [out] */ IMoniker **ppmkNew) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeObjResolverVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeObjResolver * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeObjResolver * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeObjResolver * This); + + HRESULT ( STDMETHODCALLTYPE *MimeOleObjectFromMoniker )( + IMimeObjResolver * This, + /* [in] */ BINDF bindf, + /* [in] */ IMoniker *pmkOriginal, + /* [in] */ IBindCtx *pBindCtx, + /* [in] */ REFIID riid, + /* [out] */ LPVOID *ppvObject, + /* [out] */ IMoniker **ppmkNew); + + END_INTERFACE + } IMimeObjResolverVtbl; + + interface IMimeObjResolver + { + CONST_VTBL struct IMimeObjResolverVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeObjResolver_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeObjResolver_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeObjResolver_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeObjResolver_MimeOleObjectFromMoniker(This,bindf,pmkOriginal,pBindCtx,riid,ppvObject,ppmkNew) \ + (This)->lpVtbl -> MimeOleObjectFromMoniker(This,bindf,pmkOriginal,pBindCtx,riid,ppvObject,ppmkNew) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeObjResolver_MimeOleObjectFromMoniker_Proxy( + IMimeObjResolver * This, + /* [in] */ BINDF bindf, + /* [in] */ IMoniker *pmkOriginal, + /* [in] */ IBindCtx *pBindCtx, + /* [in] */ REFIID riid, + /* [out] */ LPVOID *ppvObject, + /* [out] */ IMoniker **ppmkNew); + + +void __RPC_STUB IMimeObjResolver_MimeOleObjectFromMoniker_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeObjResolver_INTERFACE_DEFINED__ */ + +#endif /* __MIMEOLE_LIBRARY_DEFINED__ */ + +/* interface __MIDL_itf_mimeole_0278 */ +/* [local] */ + +typedef +enum tagFNTSYSTYPE + { FNT_SYS_ICON = 0, + FNT_SYS_ICON_BOLD = FNT_SYS_ICON + 1, + FNT_SYS_MENU = FNT_SYS_ICON_BOLD + 1, + FNT_SYS_ICON_STRIKEOUT = FNT_SYS_MENU + 1, + FNT_SYS_LAST = FNT_SYS_ICON_STRIKEOUT + 1 + } FNTSYSTYPE; + +typedef struct _charformat CHARFORMAT; + + + +extern RPC_IF_HANDLE __MIDL_itf_mimeole_0278_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mimeole_0278_v0_0_s_ifspec; + +#ifndef __IFontCache_INTERFACE_DEFINED__ +#define __IFontCache_INTERFACE_DEFINED__ + +/* interface IFontCache */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IFontCache *LPFONTCACHE; + + +EXTERN_C const IID IID_IFontCache; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B0D17FC2-7BC4-11d1-BDFA-00C04FA31009") + IFontCache : public IUnknown + { + public: + virtual /* [local] */ HRESULT STDMETHODCALLTYPE Init( + /* [in] */ HKEY hkey, + /* [in] */ LPCSTR pszIntlKey, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFont( + /* [in] */ FNTSYSTYPE fntType, + /* [in] */ HCHARSET hCharset, + /* [out] */ HFONT *phFont) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnOptionChange( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetJP_ISOControl( + /* [out] */ BOOL *pfUseSIO) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFontCacheVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFontCache * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFontCache * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFontCache * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Init )( + IFontCache * This, + /* [in] */ HKEY hkey, + /* [in] */ LPCSTR pszIntlKey, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFont )( + IFontCache * This, + /* [in] */ FNTSYSTYPE fntType, + /* [in] */ HCHARSET hCharset, + /* [out] */ HFONT *phFont); + + HRESULT ( STDMETHODCALLTYPE *OnOptionChange )( + IFontCache * This); + + HRESULT ( STDMETHODCALLTYPE *GetJP_ISOControl )( + IFontCache * This, + /* [out] */ BOOL *pfUseSIO); + + END_INTERFACE + } IFontCacheVtbl; + + interface IFontCache + { + CONST_VTBL struct IFontCacheVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFontCache_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFontCache_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFontCache_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFontCache_Init(This,hkey,pszIntlKey,dwFlags) \ + (This)->lpVtbl -> Init(This,hkey,pszIntlKey,dwFlags) + +#define IFontCache_GetFont(This,fntType,hCharset,phFont) \ + (This)->lpVtbl -> GetFont(This,fntType,hCharset,phFont) + +#define IFontCache_OnOptionChange(This) \ + (This)->lpVtbl -> OnOptionChange(This) + +#define IFontCache_GetJP_ISOControl(This,pfUseSIO) \ + (This)->lpVtbl -> GetJP_ISOControl(This,pfUseSIO) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [local] */ HRESULT STDMETHODCALLTYPE IFontCache_Init_Proxy( + IFontCache * This, + /* [in] */ HKEY hkey, + /* [in] */ LPCSTR pszIntlKey, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IFontCache_Init_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFontCache_GetFont_Proxy( + IFontCache * This, + /* [in] */ FNTSYSTYPE fntType, + /* [in] */ HCHARSET hCharset, + /* [out] */ HFONT *phFont); + + +void __RPC_STUB IFontCache_GetFont_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFontCache_OnOptionChange_Proxy( + IFontCache * This); + + +void __RPC_STUB IFontCache_OnOptionChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFontCache_GetJP_ISOControl_Proxy( + IFontCache * This, + /* [out] */ BOOL *pfUseSIO); + + +void __RPC_STUB IFontCache_GetJP_ISOControl_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFontCache_INTERFACE_DEFINED__ */ + + +#ifndef __IFontCacheNotify_INTERFACE_DEFINED__ +#define __IFontCacheNotify_INTERFACE_DEFINED__ + +/* interface IFontCacheNotify */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IFontCacheNotify *LPFONTCACHENOTIFY; + + +EXTERN_C const IID IID_IFontCacheNotify; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B0D17FC5-7BC4-11d1-BDFA-00C04FA31009") + IFontCacheNotify : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE OnPreFontChange( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnPostFontChange( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFontCacheNotifyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFontCacheNotify * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFontCacheNotify * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFontCacheNotify * This); + + HRESULT ( STDMETHODCALLTYPE *OnPreFontChange )( + IFontCacheNotify * This); + + HRESULT ( STDMETHODCALLTYPE *OnPostFontChange )( + IFontCacheNotify * This); + + END_INTERFACE + } IFontCacheNotifyVtbl; + + interface IFontCacheNotify + { + CONST_VTBL struct IFontCacheNotifyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFontCacheNotify_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFontCacheNotify_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFontCacheNotify_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFontCacheNotify_OnPreFontChange(This) \ + (This)->lpVtbl -> OnPreFontChange(This) + +#define IFontCacheNotify_OnPostFontChange(This) \ + (This)->lpVtbl -> OnPostFontChange(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFontCacheNotify_OnPreFontChange_Proxy( + IFontCacheNotify * This); + + +void __RPC_STUB IFontCacheNotify_OnPreFontChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFontCacheNotify_OnPostFontChange_Proxy( + IFontCacheNotify * This); + + +void __RPC_STUB IFontCacheNotify_OnPostFontChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFontCacheNotify_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeEditTag_INTERFACE_DEFINED__ +#define __IMimeEditTag_INTERFACE_DEFINED__ + +/* interface IMimeEditTag */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeEditTag *PMIMEEDITTAG; + + +EXTERN_C const IID IID_IMimeEditTag; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("70183210-7b36-11d2-8c12-00c04fa31009") + IMimeEditTag : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSrc( + /* [out] */ BSTR *pbstr) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSrc( + /* [in] */ BSTR bstr) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDest( + /* [out] */ BSTR *pbstr) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDest( + /* [in] */ BSTR bstr) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnPreSave( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnPostSave( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CanPackage( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsValidMimeType( + /* [in] */ LPWSTR pszTypeW) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeEditTagVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeEditTag * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeEditTag * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeEditTag * This); + + HRESULT ( STDMETHODCALLTYPE *GetSrc )( + IMimeEditTag * This, + /* [out] */ BSTR *pbstr); + + HRESULT ( STDMETHODCALLTYPE *SetSrc )( + IMimeEditTag * This, + /* [in] */ BSTR bstr); + + HRESULT ( STDMETHODCALLTYPE *GetDest )( + IMimeEditTag * This, + /* [out] */ BSTR *pbstr); + + HRESULT ( STDMETHODCALLTYPE *SetDest )( + IMimeEditTag * This, + /* [in] */ BSTR bstr); + + HRESULT ( STDMETHODCALLTYPE *OnPreSave )( + IMimeEditTag * This); + + HRESULT ( STDMETHODCALLTYPE *OnPostSave )( + IMimeEditTag * This); + + HRESULT ( STDMETHODCALLTYPE *CanPackage )( + IMimeEditTag * This); + + HRESULT ( STDMETHODCALLTYPE *IsValidMimeType )( + IMimeEditTag * This, + /* [in] */ LPWSTR pszTypeW); + + END_INTERFACE + } IMimeEditTagVtbl; + + interface IMimeEditTag + { + CONST_VTBL struct IMimeEditTagVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeEditTag_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeEditTag_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeEditTag_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeEditTag_GetSrc(This,pbstr) \ + (This)->lpVtbl -> GetSrc(This,pbstr) + +#define IMimeEditTag_SetSrc(This,bstr) \ + (This)->lpVtbl -> SetSrc(This,bstr) + +#define IMimeEditTag_GetDest(This,pbstr) \ + (This)->lpVtbl -> GetDest(This,pbstr) + +#define IMimeEditTag_SetDest(This,bstr) \ + (This)->lpVtbl -> SetDest(This,bstr) + +#define IMimeEditTag_OnPreSave(This) \ + (This)->lpVtbl -> OnPreSave(This) + +#define IMimeEditTag_OnPostSave(This) \ + (This)->lpVtbl -> OnPostSave(This) + +#define IMimeEditTag_CanPackage(This) \ + (This)->lpVtbl -> CanPackage(This) + +#define IMimeEditTag_IsValidMimeType(This,pszTypeW) \ + (This)->lpVtbl -> IsValidMimeType(This,pszTypeW) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_GetSrc_Proxy( + IMimeEditTag * This, + /* [out] */ BSTR *pbstr); + + +void __RPC_STUB IMimeEditTag_GetSrc_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_SetSrc_Proxy( + IMimeEditTag * This, + /* [in] */ BSTR bstr); + + +void __RPC_STUB IMimeEditTag_SetSrc_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_GetDest_Proxy( + IMimeEditTag * This, + /* [out] */ BSTR *pbstr); + + +void __RPC_STUB IMimeEditTag_GetDest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_SetDest_Proxy( + IMimeEditTag * This, + /* [in] */ BSTR bstr); + + +void __RPC_STUB IMimeEditTag_SetDest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_OnPreSave_Proxy( + IMimeEditTag * This); + + +void __RPC_STUB IMimeEditTag_OnPreSave_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_OnPostSave_Proxy( + IMimeEditTag * This); + + +void __RPC_STUB IMimeEditTag_OnPostSave_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_CanPackage_Proxy( + IMimeEditTag * This); + + +void __RPC_STUB IMimeEditTag_CanPackage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTag_IsValidMimeType_Proxy( + IMimeEditTag * This, + /* [in] */ LPWSTR pszTypeW); + + +void __RPC_STUB IMimeEditTag_IsValidMimeType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeEditTag_INTERFACE_DEFINED__ */ + + +#ifndef __IMimeEditTagCollection_INTERFACE_DEFINED__ +#define __IMimeEditTagCollection_INTERFACE_DEFINED__ + +/* interface IMimeEditTagCollection */ +/* [object][helpstring][uuid] */ + +typedef /* [unique] */ IMimeEditTagCollection *PMIMEEDITTAGCOLLECTION; + + +EXTERN_C const IID IID_IMimeEditTagCollection; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("d09ee528-7b38-11d2-8c12-00c04fa31009") + IMimeEditTagCollection : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Init( + /* [in] */ IUnknown *pHtmlDoc) = 0; + + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFetch, + /* [out] */ IMimeEditTag **ppTag, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Count( + /* [out] */ ULONG *pcItems) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMimeEditTagCollectionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMimeEditTagCollection * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMimeEditTagCollection * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMimeEditTagCollection * This); + + HRESULT ( STDMETHODCALLTYPE *Init )( + IMimeEditTagCollection * This, + /* [in] */ IUnknown *pHtmlDoc); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IMimeEditTagCollection * This, + /* [in] */ ULONG cFetch, + /* [out] */ IMimeEditTag **ppTag, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IMimeEditTagCollection * This); + + HRESULT ( STDMETHODCALLTYPE *Count )( + IMimeEditTagCollection * This, + /* [out] */ ULONG *pcItems); + + END_INTERFACE + } IMimeEditTagCollectionVtbl; + + interface IMimeEditTagCollection + { + CONST_VTBL struct IMimeEditTagCollectionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMimeEditTagCollection_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMimeEditTagCollection_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMimeEditTagCollection_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMimeEditTagCollection_Init(This,pHtmlDoc) \ + (This)->lpVtbl -> Init(This,pHtmlDoc) + +#define IMimeEditTagCollection_Next(This,cFetch,ppTag,pcFetched) \ + (This)->lpVtbl -> Next(This,cFetch,ppTag,pcFetched) + +#define IMimeEditTagCollection_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IMimeEditTagCollection_Count(This,pcItems) \ + (This)->lpVtbl -> Count(This,pcItems) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMimeEditTagCollection_Init_Proxy( + IMimeEditTagCollection * This, + /* [in] */ IUnknown *pHtmlDoc); + + +void __RPC_STUB IMimeEditTagCollection_Init_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTagCollection_Next_Proxy( + IMimeEditTagCollection * This, + /* [in] */ ULONG cFetch, + /* [out] */ IMimeEditTag **ppTag, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IMimeEditTagCollection_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTagCollection_Reset_Proxy( + IMimeEditTagCollection * This); + + +void __RPC_STUB IMimeEditTagCollection_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMimeEditTagCollection_Count_Proxy( + IMimeEditTagCollection * This, + /* [out] */ ULONG *pcItems); + + +void __RPC_STUB IMimeEditTagCollection_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMimeEditTagCollection_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mimeole_0282 */ +/* [local] */ + +#if (_WIN32_OE >= 0x0500) +// -------------------------------------------------------------------------------- +// CMDSETID_MimeEdit commands +// -------------------------------------------------------------------------------- +#define MECMDID_DIRTY 1 +#define MECMDID_EMPTY 2 +#define MECMDID_STYLE 3 +#define MECMDID_EDITHTML 4 +#define MECMDID_DOWNGRADEPLAINTEXT 5 +#define MECMDID_SETTEXT 6 +#define MECMDID_ROT13 7 +#define MECMDID_INSERTTEXTFILE 8 +#define MECMDID_VIEWSOURCE 9 +#define MECMDID_FORMATFONT 10 +#define MECMDID_PREVIEWFORMAT 11 +#define MECMDID_EDITMODE 12 +#define MECMDID_CHARSET 13 +#define MECMDID_SAVEASSTATIONERY 14 +#define MECMDID_BACKGROUNDIMAGE 15 +#define MECMDID_INSERTTEXT 16 +#define MECMDID_INSERTHTML 17 +#define MECMDID_BACKGROUNDCOLOR 18 +#define MECMDID_APPLYDOCUMENT 19 +#define MECMDID_SAVEATTACHMENTS 20 +#define MECMDID_BACKGROUNDSOUND 21 +#define MECMDID_INSERTBGSOUND 22 +#define MECMDID_SHOWSOURCETABS 23 +#define MECMDID_SETSOURCETAB 24 +#define MECMDID_TABLINKS 25 +#define MECMDID_FORMATPARAGRAPH 26 + +// -------------------------------------------------------------------------------- +// MEO_FLAGS +// -------------------------------------------------------------------------------- +#define MEO_FLAGS_INCLUDEMSG 0x0001 +#define MEO_FLAGS_HTML 0x0002 +#define MEO_FLAGS_AUTOINLINE 0x0004 +#define MEO_FLAGS_SLIDESHOW 0x0008 +#define MEO_FLAGS_AUTOTEXT 0x0010 +#define MEO_FLAGS_BLOCKQUOTE 0x0020 +#define MEO_FLAGS_SENDIMAGES 0x0040 +#define MEO_FLAGS_DONTSPELLCHECKQUOTED 0x0080 +#define MEO_FLAGS_SENDEXTERNALIMGSRC 0x0100 + +// -------------------------------------------------------------------------------- +// MECMDID_VIEWSOURCE options +// -------------------------------------------------------------------------------- +#define MECMD_VS_HTML 0x0001 +#define MECMD_VS_MESSAGE 0x0002 + + +// -------------------------------------------------------------------------------- +// MEST_ +// -------------------------------------------------------------------------------- +#define MEST_EDIT 0 +#define MEST_SOURCE 1 +#define MEST_PREVIEW 2 +#define MEST_NEXT 3 +#define MEST_PREVIOUS 4 + +// -------------------------------------------------------------------------------- +// MECMDID_STYLE options +// -------------------------------------------------------------------------------- +#define MESTYLE_NOHEADER 0 +#define MESTYLE_PREVIEW 1 +#define MESTYLE_FORMATBAR 2 +#define MESTYLE_MINIHEADER 3 + +// -------------------------------------------------------------------------------- +// MECMDID_HEADER_TYLE options +// -------------------------------------------------------------------------------- +#define MEHEADER_NONE 0x00 +#define MEHEADER_NEWS 0x01 +#define MEHEADER_MAIL 0x02 +#define MEHEADER_FORCE_ENGLISH 0x04 + +// -------------------------------------------------------------------------------- +// MECMDID_SIGNATURE_ENABLED options +// -------------------------------------------------------------------------------- +#define MESIG_AUTO 0x0001 +#define MESIG_MANUAL 0x0002 + +// -------------------------------------------------------------------------------- +// MECMDID_SIGNATURE_OPTIONS options +// -------------------------------------------------------------------------------- +#define MESIGOPT_PLAIN 0x0001 +#define MESIGOPT_TOP 0x0002 +#define MESIGOPT_PREFIX 0x0004 +#define MESIGOPT_BOTTOM 0x0008 +#define MESIGOPT_HTML 0x0010 + +// -------------------------------------------------------------------------------- +// MEHOSTCMDID_BORDERFLAGS options +// -------------------------------------------------------------------------------- +#define MEBF_OUTERCLIENTEDGE 0x0001 +#define MEBF_INNERCLIENTEDGE 0x0002 +#define MEBF_FORMATBARSEP 0x0004 +#define MEBF_NOSCROLL 0x0008 + +// -------------------------------------------------------------------------------- +// MEHOSTCMDID_SPELL_OPTIONS options +// -------------------------------------------------------------------------------- +#define MESPELLOPT_IGNORENUMBER 0x0001 +#define MESPELLOPT_IGNOREUPPER 0x0002 +#define MESPELLOPT_IGNOREDBCS 0x0004 +#define MESPELLOPT_IGNOREPROTECT 0x0008 +#define MESPELLOPT_IGNOREURL 0x0010 +#define MESPELLOPT_ALWAYSSUGGEST 0x0020 +#define MESPELLOPT_CHECKONSEND 0x0040 +#define MESPELLOPT_CHECKONTYPE 0x0080 + + +// -------------------------------------------------------------------------------- +// MEHOSTCMDID_SOURCEEDIT_FLAGS options +// -------------------------------------------------------------------------------- +#define MESRCFLAGS_COLOR 0x0001 + + +// -------------------------------------------------------------------------------- +// CMDSETID_MimeEditHost commands +// -------------------------------------------------------------------------------- +#define MEHOSTCMDID_SIGNATURE_ENABLED 1 +#define MEHOSTCMDID_SIGNATURE_OPTIONS 2 +#define MEHOSTCMDID_SIGNATURE 3 +#define MEHOSTCMDID_HEADER_TYPE 4 +#define MEHOSTCMDID_ONPARSECOMPLETE 5 +#define MEHOSTCMDID_FLAGS 6 +#define MEHOSTCMDID_QUOTE_CHAR 7 +#define MEHOSTCMDID_REPLY_TICK_COLOR 8 +#define MEHOSTCMDID_COMPOSE_FONT 9 +#define MEHOSTCMDID_ADD_TO_ADDRESSBOOK 10 +#define MEHOSTCMDID_ADD_TO_FAVORITES 11 +#define MEHOSTCMDID_SLIDESHOW_DELAY 12 +#define MEHOSTCMDID_FONTCACHE 13 +#define MEHOSTCMDID_BORDERFLAGS 14 +#define MEHOSTCMDID_SECURITY_ZONE 15 +#define MEHOSTCMDID_SPELL_OPTIONS 16 +#define MEHOSTCMDID_SAVEATTACH_PATH 17 +#define MEHOSTCMDID_SOURCEEDIT_FLAGS 18 +#define MEHOSTCMDID_SPELL_LANGUAGE 19 + +#endif //_WIN32_OE + +// -------------------------------------------------------------------------------- +// MimeOLE Exported C API Functions +// -------------------------------------------------------------------------------- +#ifdef __cplusplus +extern "C" { +#endif + +// -------------------------------------------------------------------------------- +// Depends +// -------------------------------------------------------------------------------- +#include + +// -------------------------------------------------------------------------------- +// API Name Decoration +// -------------------------------------------------------------------------------- +#if !defined(_MIMEOLE_) +#define MIMEOLEAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI +#define MIMEOLEAPI_(_type_) EXTERN_C DECLSPEC_IMPORT _type_ WINAPI +#else +#define MIMEOLEAPI EXTERN_C HRESULT WINAPI +#define MIMEOLEAPI_(_type_) EXTERN_C _type_ WINAPI +#endif + +// -------------------------------------------------------------------------------- +// Constants +// -------------------------------------------------------------------------------- +#define NOFLAGS 0 +#define CCHMAX_CID 255 +#define CCHMAX_MID 255 +#define CCHMAX_INTERNET_DATE 50 + +#define MECD_HTML 0x0001 +#define MECD_PLAINTEXT 0x0002 +#define MECD_ENCODEIMAGES 0x0004 +#define MECD_ENCODEFILEURLSONLY 0x0008 +#define MECD_ENCODESOUNDS 0x0010 +#define MECD_ENCODEVIDEO 0x0020 +#define MECD_ENCODEPLUGINS 0x0040 + +// -------------------------------------------------------------------------------- +// Macros +// -------------------------------------------------------------------------------- +#define MimeOleVariantInit(_pProp) \ + ZeroMemory(_pProp, sizeof(PROPVARIANT)) + +// -------------------------------------------------------------------------------- +// MimeOLE API Prototypes +// -------------------------------------------------------------------------------- + +#define MIMEOLE_COMPAT_OE5 0x00000001 +#define MIMEOLE_COMPAT_MLANG2 0x00000002 +MIMEOLEAPI MimeOleSetCompatMode( + /* in */ DWORD dwMode); + +MIMEOLEAPI MimeOleContentTypeFromUrl( + /* in */ LPCSTR pszBase, + /* in */ LPCSTR pszUrl, + /* out */ LPSTR *ppszCntType); + +MIMEOLEAPI MimeOleParseMhtmlUrl( + /* in */ LPSTR pszUrl, + /* out */ LPSTR *ppszRootUrl, + /* out */ LPSTR *ppszBodyUrl); + +#ifndef MAC +MIMEOLEAPI MimeOleObjectFromUrl( + /* in */ LPCSTR pszUrl, + /* in */ BOOL fCreate, + /* in */ REFIID riid, + /* out */ LPVOID *ppvObject, + /* out */ IUnknown **ppUnkKeepAlive); + +MIMEOLEAPI MimeOleObjectFromMoniker( + /* in */ BINDF bindf, + /* in */ IMoniker *pmkOriginal, + /* in */ IBindCtx *pBindCtx, + /* in */ REFIID riid, + /* out */ LPVOID *ppvObject, + /* out */ IMoniker **ppmkNew); +#endif // !MAC + +MIMEOLEAPI MimeOleCombineURL( + /* in */ LPCSTR pszBase, + /* in */ ULONG cchBase, + /* in */ LPCSTR pszURL, + /* in */ ULONG cchURL, + /* in */ BOOL fUnEscape, + /* out */ LPSTR *ppszAbsolute); + +MIMEOLEAPI MimeOleGetSubjectFileName( + /* in */ IMimePropertySet *pPropertySet, + /* out */ ULONG *pulPart, + /* out */ ULONG *pulTotal, + /* in,out */ LPSTR pszFileName, + /* in */ ULONG cchMax); + +MIMEOLEAPI MimeOleCreateWebDocument( + /* in */ LPCSTR pszBase, + /* in */ LPCSTR pszURL, + /* out */ IMimeWebDocument **ppDocument); + +MIMEOLEAPI MimeOleGetRelatedSection( + /* in */ IMimeMessageTree *pTree, + /* in */ boolean fCreate, + /* out */ LPHBODY phRelated, + /* out */ boolean *pfMultiple); + +MIMEOLEAPI MimeOleGetMixedSection( + /* in */ IMimeMessageTree *pTree, + /* in */ boolean fCreate, + /* out */ LPHBODY phMixed, + /* out */ boolean *pfMultiple); + +MIMEOLEAPI MimeOleGetAlternativeSection( + /* in */ IMimeMessageTree *pTree, + /* out */ LPHBODY phAlternative, + /* out */ boolean *pfMultiple); + +MIMEOLEAPI MimeOleGenerateCID( + /* in,out */ LPSTR pszCID, + /* in */ ULONG cchMax, + /* in */ boolean fAbsolute); + +MIMEOLEAPI MimeOleGenerateMID( + /* in,out */ LPSTR pszMID, + /* in */ ULONG cchMax, + /* in */ boolean fAbsolute); + +MIMEOLEAPI MimeOleCreateByteStream( + /* out */ IStream **ppStream); + +MIMEOLEAPI MimeOleGetPropertySchema( + /* out */ IMimePropertySchema **ppSchema); + +MIMEOLEAPI MimeOleQueryString( + /* in */ LPCSTR pszSearchMe, + /* in */ LPCSTR pszCriteria, + /* in */ boolean fSubString, + /* in */ boolean fCaseSensitive); + +MIMEOLEAPI MimeOleGetPropA( + /* in */ IMimePropertySet *pPropertyset, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* out */ LPSTR *ppszData); + +MIMEOLEAPI MimeOleSetPropA( + /* in */ IMimePropertySet *pPropertyset, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* in */ LPCSTR pszData); + +MIMEOLEAPI MimeOleGetPropW( + /* in */ IMimePropertySet *pPropertyset, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* out */ LPWSTR *ppszData); + +MIMEOLEAPI MimeOleSetPropW( + /* in */ IMimePropertySet *pPropertyset, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* in */ LPWSTR pszData); + +MIMEOLEAPI MimeOleGetBodyPropA( + /* in */ IMimeMessageTree *pTree, + /* in */ HBODY hBody, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* out */ LPSTR *ppszData); + +MIMEOLEAPI MimeOleSetBodyPropA( + /* in */ IMimeMessageTree *pTree, + /* in */ HBODY hBody, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* in */ LPCSTR pszData); + +MIMEOLEAPI MimeOleGetBodyPropW( + /* in */ IMimeMessageTree *pTree, + /* in */ HBODY hBody, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* out */ LPWSTR *ppszData); + +MIMEOLEAPI MimeOleSetBodyPropW( + /* in */ IMimeMessageTree *pTree, + /* in */ HBODY hBody, + /* in */ LPCSTR pszName, + /* in */ DWORD dwFlags, + /* in */ LPCWSTR pszData); + +MIMEOLEAPI MimeOleCreateHeaderTable( + /* out */ IMimeHeaderTable **ppTable); + +MIMEOLEAPI MimeOleVariantFree( + /* in,out */ LPPROPVARIANT pProp); + +MIMEOLEAPI MimeOleVariantCopy( + /* out */ LPPROPVARIANT pDest, + /* in */ LPPROPVARIANT pSource); + +MIMEOLEAPI MimeOleGetExtClassId( + /* in */ LPCSTR pszExtension, + /* out */ LPCLSID pclsid); + +MIMEOLEAPI MimeOleEncodeHeader( + /* in */ HCHARSET hCharset, + /* in */ LPPROPVARIANT pData, + /* out */ LPSTR *ppszEncoded, + /* in,out */ LPRFC1522INFO pRfc1522Info); + +MIMEOLEAPI MimeOleDecodeHeader( + /* in */ HCHARSET hCharset, + /* in */ LPCSTR pszData, + /* out */ LPPROPVARIANT pDecoded, + /* in,out */ LPRFC1522INFO pRfc1522Info); + +MIMEOLEAPI MimeOleRfc1522Decode( + /* in */ LPCSTR pszValue, + /* in */ LPSTR pszCharset, + /* in */ ULONG cchmax, + /* out */ LPSTR *ppszDecoded); + +MIMEOLEAPI MimeOleRfc1522Encode( + /* in */ LPCSTR pszValue, + /* in */ HCHARSET hCharset, + /* out */ LPSTR *ppszEncoded); + +MIMEOLEAPI MimeOleGetInternat( + /* out */ IMimeInternational **ppInternat); + +MIMEOLEAPI MimeOleFindCharset( + /* in */ LPCSTR pszCharset, + /* out */ LPHCHARSET phCharset); + +MIMEOLEAPI MimeOleGetCharsetInfo( + /* in */ HCHARSET hCharset, + /* out */ LPINETCSETINFO pCsetInfo); + +MIMEOLEAPI MimeOleGetCodePageInfo( + /* in */ CODEPAGEID cpiCodePage, + /* out */ LPCODEPAGEINFO pCodePageInfo); + +MIMEOLEAPI MimeOleGetDefaultCharset( + /* out */ LPHCHARSET phCharset); + +MIMEOLEAPI MimeOleSetDefaultCharset( + /* in */ HCHARSET hCharset); + +MIMEOLEAPI MimeOleGetCodePageCharset( + /* in */ CODEPAGEID cpiCodePage, + /* in */ CHARSETTYPE ctCsetType, + /* out */ LPHCHARSET phCharset); + +MIMEOLEAPI MimeOleCreateVirtualStream( + /* out */ IStream **ppStream); + +MIMEOLEAPI MimeOleOpenFileStream( + /* in */ LPCSTR pszFilePath, + /* in */ DWORD dwCreationDistribution, + /* in */ DWORD dwAccess, + /* out */ IStream **ppstmFile); + +MIMEOLEAPI MimeOleIsTnefStream( + /* in */ IStream *pStream); + +MIMEOLEAPI MimeOleGenerateFileName( + /* in */ LPCSTR pszContentType, + /* in */ LPCSTR pszSuggest, + /* in */ LPCSTR pszDefaultExt, + /* in,out */ LPSTR *ppszFileName); + +MIMEOLEAPI MimeOleGetFileExtension( + /* in */ LPCSTR pszFilePath, + /* in,out */ LPSTR pszExt, + /* in */ ULONG cchMax); + +MIMEOLEAPI MimeOleCreateSecurity( + /* out */ IMimeSecurity **ppSecurity); + +MIMEOLEAPI MimeOleInetDateToFileTime( + /* in */ LPCSTR pszDate, + /* out */ LPFILETIME pft); + +MIMEOLEAPI MimeOleFileTimeToInetDate( + /* in */ LPFILETIME pft, + /* in,out */ LPSTR pszDate, + /* in */ ULONG cchMax); + +MIMEOLEAPI MimeOleCreateMessageParts( + /* out */ IMimeMessageParts **ppParts); + +MIMEOLEAPI MimeOleGetAllocator( + /* out */ IMimeAllocator **ppAllocator); + +MIMEOLEAPI MimeOleParseRfc822Address( + /* in */ DWORD dwAdrType, + /* in */ ENCODINGTYPE ietEncoding, + /* in */ LPCSTR pszRfc822Adr, + /* out */ LPADDRESSLIST pList); + +MIMEOLEAPI MimeOleCreateMessage( + /* in */ IUnknown *pUnkOuter, + /* out */ IMimeMessage **ppMessage); + +MIMEOLEAPI MimeOleMergePartialHeaders( + /* in */ IStream *pstmIn, + /* in */ IStream *pstmOut); + +MIMEOLEAPI MimeOleEscapeString( + /* in */ CODEPAGEID cpiCodePage, + /* in */ LPCSTR pszIn, + /* out */ LPSTR *ppszOut); + +MIMEOLEAPI MimeOleGetExtContentType( + /* in */ LPCSTR pszExtension, + /* out */ LPSTR *ppszContentType); + +MIMEOLEAPI MimeOleGetContentTypeExt( + /* in */ LPCSTR pszContentType, + /* out */ LPSTR *ppszExtension); + +MIMEOLEAPI MimeOleGetFileInfo( + /* in */ LPSTR pszFilePath, + /* out */ LPSTR *ppszCntType, + /* out */ LPSTR *ppszSubType, + /* out */ LPSTR *ppszCntDesc, + /* out */ LPSTR *ppszFileName, + /* out */ LPSTR *ppszExtension); + +MIMEOLEAPI MimeOleCreateBody( + /* out */ IMimeBody **ppBody); + +MIMEOLEAPI MimeOleCreatePropertySet( + /* in */ IUnknown *pUnkOuter, + /* out */ IMimePropertySet **ppPropertySet); + +MIMEOLEAPI MimeOleCreateMessageTree( + /* in */ IUnknown *pUnkOuter, + /* out */ IMimeMessageTree **ppMessageTree); + +MIMEOLEAPI MimeOleGetCertsFromThumbprints( + /* in */ THUMBBLOB *const rgThumbprint, + /* in,out */ X509CERTRESULT *const pResults, + /* in */ const HCERTSTORE *const rghCertStore, + /* in */ const DWORD cCertStore); + +MIMEOLEAPI MimeOleSplitMessage( + /* in */ IMimeMessage *pMessage, + /* in */ ULONG cbMaxPart, + /* out */ IMimeMessageParts **ppParts); + +MIMEOLEAPI MimeOleClearDirtyTree( + /* in */ IMimeMessageTree *pTree); + +MIMEOLEAPI MimeOleConvertEnrichedToHTML( + /* in */ CODEPAGEID codepage, + /* in */ IStream *pIn, + /* in */ IStream *pOut); + +MIMEOLEAPI MimeOleIsEnrichedStream( + /* in */ IStream *pStream); + +MIMEOLEAPI MimeOleSMimeCapsToDlg( + /* in */ LPBYTE pbSMimeCaps, + /* in */ DWORD cbSMimeCaps, + /* in */ DWORD cCerts, + /* in */ PCX509CERT * rgCerts, + /* in */ HWND hwndDlg, + /* in */ DWORD idEncAlgs, + /* in */ DWORD idSignAlgs, + /* in */ DWORD idBlob); + +MIMEOLEAPI MimeOleSMimeCapsFromDlg( + /* in */ HWND hwnd, + /* in */ DWORD idEncAlgs, + /* in */ DWORD idSignAlgs, + /* in */ DWORD idBlob, + /* in/out */ LPBYTE pbSMimeCaps, + /* in/out */ DWORD * pcbSmimeCaps); + +MIMEOLEAPI MimeOleSMimeCapInit( + /* in */ LPBYTE pbSMimeCap, + /* in */ DWORD cbSMimeCap, + /* out */ LPVOID * ppv); + +MIMEOLEAPI MimeOleSMimeCapAddSMimeCap( + /* in */ LPBYTE pbSMimeCap, + /* in */ DWORD cbSMimeCap, + /* in/out */ LPVOID pv); + +MIMEOLEAPI MimeOleSMimeCapAddCert( + /* in */ LPBYTE pbCert, + /* in */ DWORD cbCert, + /* in */ BOOL fParanoid, + /* in/out */ LPVOID pv); + +MIMEOLEAPI MimeOleSMimeCapGetEncAlg( + /* in */ LPVOID pv, + /* in/out */ LPBYTE pbEncode, + /* in/out */ DWORD * pcbEncode, + /* in/out */ DWORD * pdwBits); + +MIMEOLEAPI MimeOleSMimeCapGetHashAlg( + /* in */ LPVOID pv, + /* in/out */ LPBYTE pbEncode, + /* in/out */ DWORD * pcbEncode, + /* in/out */ DWORD * pfBlobSign); + +MIMEOLEAPI MimeOleSMimeCapRelease( + /* in */ LPVOID pv); + +MIMEOLEAPI MimeOleAlgNameFromSMimeCap( + /* in */ LPBYTE pb, + /* in */ DWORD cb, + /* out */ LPCSTR * ppzProtocol); + +MIMEOLEAPI MimeOleAlgStrengthFromSMimeCap( + /* in */ LPBYTE pb, + /* in */ DWORD cb, + /* in */ BOOL fEncryption, + /* out */ DWORD * pdwStrength); + +MIMEOLEAPI MimeOleSMimeCapsFull( + /* in */ LPVOID pv, + /* in */ BOOL fFullEncryption, + /* in */ BOOL fFullSigning, + /* in/out */ LPBYTE pbSymCaps, + /* in/out */ DWORD * pcbSymCaps); + + +#if (_WIN32_OE >= 0x0500) + +MIMEOLEAPI MimeOleCreateHashTable( + /* in */ DWORD dwSize, + /* in */ BOOL fDupeKeys, + /* out */ IHashTable **ppHashTable); + +MIMEOLEAPI MimeOleStripHeaders( + /* in */ IMimeMessage *pMessage, + /* in */ HBODY hBody, + /* in */ LPCSTR pszNameDelete, + /* in */ LPCSTR pszHeaderAdd, + /* in */ IStream **ppStream); + +#endif //_WIN32_OE + +#if (_WIN32_OE >= 0x0500) +// -------------------------------------------------------------------------------- +// MimeEdit API Prototypes +// -------------------------------------------------------------------------------- +MIMEOLEAPI MimeEditViewSource( + /* in */ HWND hwndParent, + /* in */ IMimeMessage *pMsg); + + +MIMEOLEAPI MimeEditIsSafeToRun( + /* in */ HWND hwndParent, + /* in */ LPCSTR lpszFileName); + + +MIMEOLEAPI MimeEditVerifyTrust( + /* in */ HWND hwndParent, + /* in */ LPCSTR lpszFileName, + /* in */ LPCSTR lpszPathName); + + +MIMEOLEAPI MimeEditCreateMimeDocument( + /* in */ IUnknown *pDoc, + /* in */ IMimeMessage *pMsgSrc, + /* in */ DWORD dwFlags, + /* out */ IMimeMessage **ppMsg); + + +MIMEOLEAPI MimeEditGetBackgroundImageUrl( + /* in */ IUnknown *pDoc, + /* out */ BSTR *pbstr); + +MIMEOLEAPI MimeEditDocumentFromStream( + /* in */ IStream *pstm, + /* in */ REFIID riid, + /* out */ void **ppDoc); + + +#ifdef __WINCRYPT_H__ +//+------------------------------------------------------------------------- +// RecipientID +// +// The value of dwRecepintType MUST be 0. +//-------------------------------------------------------------------------- +#define szOID_Microsoft_Encryption_Cert "1.3.6.1.4.1.311.16.4" +typedef struct _CRYPT_RECIPIENT_ID { + DWORD dwRecipientType; + CERT_NAME_BLOB Issuer; + CRYPT_INTEGER_BLOB SerialNumber; +} CRYPT_RECIPIENT_ID, * PCRYPT_RECIPIENT_ID; +#endif // __WINCRYPT_H__ + +#endif //_WIN32_OE +#ifdef __cplusplus +} +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_mimeole_0282_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mimeole_0282_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * ); +void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * ); + +unsigned long __RPC_USER HFONT_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in HFONT * ); +unsigned char * __RPC_USER HFONT_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in HFONT * ); +unsigned char * __RPC_USER HFONT_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out HFONT * ); +void __RPC_USER HFONT_UserFree( __RPC__in unsigned long *, __RPC__in HFONT * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/library/mapiStubLibrary.cpp b/com/win32comext/mapi/src/MAPIStubLibrary/library/mapiStubLibrary.cpp new file mode 100644 index 000000000..8d95fbf17 --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/library/mapiStubLibrary.cpp @@ -0,0 +1,2752 @@ +#define _WINSOCKAPI_ +#include + +#ifdef WIN_NOEXCEPT +#undef WIN_NOEXCEPT +#define WIN_NOEXCEPT +#endif + +#ifdef WIN_NOEXCEPT_PFN +#undef WIN_NOEXCEPT_PFN +#define WIN_NOEXCEPT_PFN +#endif + +#include +#include +#include +#include +#include +#include +#include + +// clang-format off +#pragma warning(disable : 26426) // Warning C26426 Global initializer calls a non-constexpr (i.22) +#pragma warning(disable : 26446) // Warning C26446 Prefer to use gsl::at() instead of unchecked subscript operator (bounds.4). +#pragma warning(disable : 26481) // Warning C26481 Don't use pointer arithmetic. Use span instead (bounds.1). +#pragma warning(disable : 26485) // Warning C26485 Expression '': No array to pointer decay (bounds.3). +#pragma warning(disable : 26487) // Warning C26487 Don't return a pointer '' that may be invalid (lifetime.4). +// clang-format on + +// Check that we have the Outlook 2010 MAPI headers or higher +// We do this by checking for the presence of a macro not present in the older headers +#ifndef MAPIFORM_CPU_X64 +#pragma message("Compilation requires Outlook 2010 MAPI headers or higher") +#pragma message("Go to the following URL") +#pragma message( \ + " http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f8d01fc8-f7b5-4228-baa3-817488a66db1&displaylang=en") +#pragma message("and follow the instructions to install the Outlook 2010 MAPI headers") +#pragma message("Then go to Tools\\Options\\Projects and Solutions\\VC++ Directories and ensure the headers include") +#pragma message("directory precedes the Visual Studio include directories.") +#pragma message(" ") +#error Outlook 2010 MAPI headers or higher must be installed +#endif + +#if defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64) +#define ExpandFunction(fn, c) #fn +#elif defined(_M_IX86) +#define ExpandFunction(fn, c) #fn "@" #c +#else +#error "Unsupported Platform" +#endif + +// Forward declarations for types not documented in MAPI headers + +struct MAPIOFFLINE_CREATEINFO; +struct IMAPIOfflineMgr; +struct RTF_WCSINFO; +struct RTF_WCSRETINFO; + +#define LINKAGE_EXTERN_C extern "C" +#define LINKAGE_NO_EXTERN_C /* */ + +// Forward declares from stubutils.cpp +namespace mapistub +{ + HMODULE GetMAPIHandle(); + HMODULE GetPrivateMAPI(); + void UnloadPrivateMAPI(); + extern volatile ULONG g_ulDllSequenceNum; +} // namespace mapistub + +#define DEFINE_STUB_FUNCTION_V0(_linkage, _modifiers, _name, _lookup) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(void); \ +\ + _linkage void _modifiers _name(void) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_V0(_linkage, _modifiers, _name, _ordinal) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(void); \ +\ + _linkage void _modifiers _name(void) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_0(_linkage, _ret_type, _modifiers, _name, _lookup, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(void); \ +\ + _linkage _ret_type _modifiers _name(void) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_0(_linkage, _ret_type, _modifiers, _name, _ordinal, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(void); \ +\ + _linkage _ret_type _modifiers _name(void) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_V1(_linkage, _modifiers, _name, _lookup, _param1_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(_param1_type); \ +\ + _linkage void _modifiers _name(_param1_type a) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_V1(_linkage, _modifiers, _name, _ordinal, _param1_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(_param1_type); \ +\ + _linkage void _modifiers _name(_param1_type a) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_1(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_1(_linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_V2(_linkage, _modifiers, _name, _lookup, _param1_type, _param2_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type); \ +\ + _linkage void _modifiers _name(_param1_type a, _param2_type b) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_V2(_linkage, _modifiers, _name, _ordinal, _param1_type, _param2_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type); \ +\ + _linkage void _modifiers _name(_param1_type a, _param2_type b) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_2(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type, _param2_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_2( \ + _linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _param2_type, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type, _param2_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_V3(_linkage, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type); \ +\ + _linkage void _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b, c); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_V3(_linkage, _modifiers, _name, _ordinal, _param1_type, _param2_type, _param3_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type); \ +\ + _linkage void _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b, c); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_3( \ + _linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type, _param2_type, _param3_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_3( \ + _linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _param2_type, _param3_type, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type, _param2_type, _param3_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_V4( \ + _linkage, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type, _param4_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type) \ +\ + _linkage void _modifiers \ + _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b, c, d); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_4( \ + _linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type, _param4_type, _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_4( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _ordinal, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type); \ +\ + _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_5( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, _param2_type, _param3_type, _param4_type, _param5_type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, _param2_type b, _param3_type c, _param4_type d, _param5_type e) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_5( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _ordinal, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, _param2_type, _param3_type, _param4_type, _param5_type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, _param2_type b, _param3_type c, _param4_type d, _param5_type e) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_6( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, _param2_type, _param3_type, _param4_type, _param5_type, _param6_type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, _param2_type b, _param3_type c, _param4_type d, _param5_type e, _param6_type f) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e, f); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_V7( \ + _linkage, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)( \ + _param1_type, _param2_type, _param3_type, _param4_type, _param5_type, _param6_type, _param7_type); \ +\ + _linkage void _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b, c, d, e, f, g); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_7( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, _param2_type, _param3_type, _param4_type, _param5_type, _param6_type, _param7_type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e, f, g); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_8( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g, \ + _param8_type h) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e, f, g, h); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_9( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g, \ + _param8_type h, \ + _param9_type i) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e, f, g, h, i); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_10( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g, \ + _param8_type h, \ + _param9_type i, \ + _param10_type j) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e, f, g, h, i, j); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_11( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g, \ + _param8_type h, \ + _param9_type i, \ + _param10_type j, \ + _param11Type k) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e, f, g, h, i, j, k); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_12( \ + _linkage, \ + _ret_type, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type, \ + _param12Type, \ + _default) \ +\ + _linkage typedef _ret_type(_modifiers* _name##TYPE)( \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type, \ + _param12Type); \ +\ + _linkage _ret_type _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g, \ + _param8_type h, \ + _param9_type i, \ + _param10_type j, \ + _param11Type k, \ + _param12Type l) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + return _name##VAR(a, b, c, d, e, f, g, h, i, j, k, l); \ + } \ + else \ + { \ + return _default; \ + } \ + } + +#define DEFINE_STUB_FUNCTION_V12( \ + _linkage, \ + _modifiers, \ + _name, \ + _lookup, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type, \ + _param12Type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)( \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type, \ + _param12Type); \ +\ + _linkage void _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g, \ + _param8_type h, \ + _param9_type i, \ + _param10_type j, \ + _param11Type k, \ + _param11Type l) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), _lookup); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b, c, d, e, f, g, h, i, j, k, l); \ + } \ + } + +#define DEFINE_STUB_FUNCTION_ORD_V12( \ + _linkage, \ + _modifiers, \ + _name, \ + _ordinal, \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type, \ + _param12Type) \ +\ + _linkage typedef void(_modifiers * _name##TYPE)( \ + _param1_type, \ + _param2_type, \ + _param3_type, \ + _param4_type, \ + _param5_type, \ + _param6_type, \ + _param7_type, \ + _param8_type, \ + _param9_type, \ + _param10_type, \ + _param11Type, \ + _param12Type); \ +\ + _linkage void _modifiers _name( \ + _param1_type a, \ + _param2_type b, \ + _param3_type c, \ + _param4_type d, \ + _param5_type e, \ + _param6_type f, \ + _param7_type g, \ + _param8_type h, \ + _param9_type i, \ + _param10_type j, \ + _param11Type k, \ + _param11Type l) \ + { \ + static _name##TYPE _name##VAR = nullptr; \ + static UINT ulDllSequenceNum = 0; \ +\ + if ((ulDllSequenceNum != mapistub::g_ulDllSequenceNum) || (nullptr == mapistub::GetMAPIHandle())) \ + { \ + _name##VAR = (_name##TYPE)::GetProcAddress(mapistub::GetPrivateMAPI(), (LPSTR) (_ordinal)); \ + ulDllSequenceNum = mapistub::g_ulDllSequenceNum; \ + } \ +\ + if ((nullptr != _name##VAR) && (nullptr != mapistub::GetMAPIHandle())) \ + { \ + _name##VAR(a, b, c, d, e, f, g, h, i, j, k, l); \ + } \ + } + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + MAPILogonEx, + ExpandFunction(MAPILogonEx, 20), + ULONG_PTR, + LPTSTR, + LPTSTR, + ULONG, + LPMAPISESSION*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_V0(LINKAGE_EXTERN_C, STDAPICALLTYPE, MAPIUninitialize, ExpandFunction(MAPIUninitialize, 0)) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + SCODE, + STDMETHODCALLTYPE, + MAPIAllocateBuffer, + ExpandFunction(MAPIAllocateBuffer, 8), + ULONG, + LPVOID FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDMETHODCALLTYPE, + MAPIAllocateMore, + ExpandFunction(MAPIAllocateMore, 12), + ULONG, + LPVOID, + LPVOID FAR*, + SCODE(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + MAPIReallocateBuffer, + ExpandFunction(MAPIReallocateBuffer, 12), + LPVOID, + ULONG, + LPVOID*, + SCODE(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + HRESULT, + STDMETHODCALLTYPE, + MAPIAdminProfiles, + ExpandFunction(MAPIAdminProfiles, 8), + ULONG, + LPPROFADMIN FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + MAPIInitialize, + ExpandFunction(MAPIInitialize, 4), + LPVOID, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + LaunchWizard, + ExpandFunction(LaunchWizard, 20), + HWND, + ULONG, + LPCSTR FAR*, + ULONG, + LPSTR, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + MAPIOpenFormMgr, + ExpandFunction(MAPIOpenFormMgr, 8), + LPMAPISESSION, + LPMAPIFORMMGR FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + MAPIOpenLocalFormContainer, + ExpandFunction(MAPIOpenLocalFormContainer, 4), + LPMAPIFORMCONTAINER FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScInitMapiUtil, + ExpandFunction(ScInitMapiUtil, 4), + ULONG, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_V0(LINKAGE_EXTERN_C, STDAPICALLTYPE, DeinitMapiUtil, ExpandFunction(DeinitMapiUtil, 0)) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrAllocAdviseSink, + ExpandFunction(HrAllocAdviseSink, 12), + LPNOTIFCALLBACK, + LPVOID, + LPMAPIADVISESINK FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrThisThreadAdviseSink, + ExpandFunction(HrThisThreadAdviseSink, 8), + LPMAPIADVISESINK, + LPMAPIADVISESINK FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrDispatchNotifications, + ExpandFunction(HrDispatchNotifications, 4), + ULONG, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScBinFromHexBounded, + ExpandFunction(ScBinFromHexBounded, 12), + __in LPTSTR, + LPBYTE, + ULONG, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FBinFromHex, + ExpandFunction(FBinFromHex, 8), + __in LPTSTR, + LPBYTE, + FALSE) + +DEFINE_STUB_FUNCTION_V3( + LINKAGE_EXTERN_C, + STDAPICALLTYPE, + HexFromBin, + ExpandFunction(HexFromBin, 12), + LPBYTE, + int, + __in LPTSTR) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrGetAutoDiscoverXML, + ExpandFunction(HrGetAutoDiscoverXML, 20), + LPCWSTR, + LPCWSTR, + HANDLE, + ULONG, + IStream**, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_10( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + BuildDisplayTable, + ExpandFunction(BuildDisplayTable, 40), + LPALLOCATEBUFFER, + LPALLOCATEMORE, + LPFREEBUFFER, + LPMALLOC, + HINSTANCE, + UINT, + LPDTPAGE, + ULONG, + LPMAPITABLE*, + LPTABLEDATA*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + MAPIInitIdle, + ExpandFunction(MAPIInitIdle, 4), + LPVOID, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_V0(LINKAGE_EXTERN_C, STDAPICALLTYPE, MAPIDeinitIdle, ExpandFunction(MAPIDeinitIdle, 0)) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + FTG, + STDAPICALLTYPE, + FtgRegisterIdleRoutine, + ExpandFunction(FtgRegisterIdleRoutine, 20), + PFNIDLE, + LPVOID, + short, + ULONG, + USHORT, + nullptr) + +DEFINE_STUB_FUNCTION_V2( + LINKAGE_EXTERN_C, + STDAPICALLTYPE, + EnableIdleRoutine, + ExpandFunction(EnableIdleRoutine, 8), + FTG, + BOOL) + +DEFINE_STUB_FUNCTION_V1( + LINKAGE_EXTERN_C, + STDAPICALLTYPE, + DeregisterIdleRoutine, + ExpandFunction(DeregisterIdleRoutine, 4), + FTG) + +DEFINE_STUB_FUNCTION_V7( + LINKAGE_EXTERN_C, + STDAPICALLTYPE, + ChangeIdleRoutine, + ExpandFunction(ChangeIdleRoutine, 28), + FTG, + PFNIDLE, + LPVOID, + short, + ULONG, + USHORT, + USHORT) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + CreateIProp, + ExpandFunction(CreateIProp, 24), + LPCIID, + ALLOCATEBUFFER FAR*, + ALLOCATEMORE FAR*, + FREEBUFFER FAR*, + LPVOID, + LPPROPDATA FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_9( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + CreateTable, + ExpandFunction(CreateTable, 36), + LPCIID, + ALLOCATEBUFFER FAR*, + ALLOCATEMORE FAR*, + FREEBUFFER FAR*, + LPVOID, + ULONG, + ULONG, + LPSPropTagArray, + LPTABLEDATA FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, int, WINAPI, MNLS_lstrlenW, ExpandFunction(MNLS_lstrlenW, 4), LPCWSTR, 0) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + int, + WINAPI, + MNLS_lstrcmpW, + ExpandFunction(MNLS_lstrcmpW, 8), + LPCWSTR, + LPCWSTR, + 0) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + LPWSTR, + WINAPI, + MNLS_lstrcpyW, + ExpandFunction(MNLS_lstrcpyW, 8), + LPWSTR, + LPCWSTR, + nullptr) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + int, + WINAPI, + MNLS_CompareStringW, + ExpandFunction(MNLS_CompareStringW, 24), + LCID, + DWORD, + LPCWSTR, + int, + LPCWSTR, + int, + 0) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + int, + WINAPI, + MNLS_MultiByteToWideChar, + ExpandFunction(MNLS_MultiByteToWideChar, 24), + UINT, + DWORD, + LPCSTR, + int, + LPWSTR, + int, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_8( + LINKAGE_EXTERN_C, + int, + WINAPI, + MNLS_WideCharToMultiByte, + ExpandFunction(MNLS_WideCharToMultiByte, 32), + UINT, + DWORD, + LPCWSTR, + int, + LPSTR, + int, + LPCSTR, + BOOL FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + BOOL, + WINAPI, + MNLS_IsBadStringPtrW, + ExpandFunction(MNLS_IsBadStringPtrW, 8), + LPCWSTR, + UINT, + TRUE) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FEqualNames, + ExpandFunction(FEqualNames, 8), + LPMAPINAMEID, + LPMAPINAMEID, + FALSE) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + WrapStoreEntryID, + ExpandFunction(WrapStoreEntryID, 24), + ULONG, + __in LPTSTR, + ULONG, + LPENTRYID, + ULONG*, + LPENTRYID*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + BOOL, + WINAPI, + IsBadBoundedStringPtr, + ExpandFunction(IsBadBoundedStringPtr, 8), + const void FAR*, + UINT, + FALSE) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrQueryAllRows, + ExpandFunction(HrQueryAllRows, 24), + LPMAPITABLE, + LPSPropTagArray, + LPSRestriction, + LPSSortOrderSet, + LONG, + LPSRowSet FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScCreateConversationIndex, + ExpandFunction(ScCreateConversationIndex, 16), + ULONG, + LPBYTE, + ULONG FAR*, + LPBYTE FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + PropCopyMore, + ExpandFunction(PropCopyMore, 16), + LPSPropValue, + LPSPropValue, + ALLOCATEMORE*, + LPVOID, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + ULONG, + STDAPICALLTYPE, + UlPropSize, + ExpandFunction(UlPropSize, 4), + LPSPropValue, + 0) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FPropContainsProp, + ExpandFunction(FPropContainsProp, 12), + LPSPropValue, + LPSPropValue, + ULONG, + FALSE) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FPropCompareProp, + ExpandFunction(FPropCompareProp, 12), + LPSPropValue, + ULONG, + LPSPropValue, + FALSE) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + LONG, + STDAPICALLTYPE, + LPropCompareProp, + ExpandFunction(LPropCompareProp, 8), + LPSPropValue, + LPSPropValue, + 0) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrAddColumns, + ExpandFunction(HrAddColumns, 16), + LPMAPITABLE, + LPSPropTagArray, + LPALLOCATEBUFFER, + LPFREEBUFFER, + MAPI_E_CALL_FAILED) + +typedef void(FAR* HrAddColumnsEx5ParamType)(LPSPropTagArray); + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrAddColumnsEx, + ExpandFunction(HrAddColumnsEx, 20), + LPMAPITABLE, + LPSPropTagArray, + LPALLOCATEBUFFER, + LPFREEBUFFER, + HrAddColumnsEx5ParamType, + MAPI_E_CALL_FAILED) + +const FILETIME ZERO_FILETIME = {0, 0}; + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + FILETIME, + STDAPICALLTYPE, + FtMulDwDw, + ExpandFunction(FtMulDwDw, 8), + DWORD, + DWORD, + ZERO_FILETIME) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + FILETIME, + STDAPICALLTYPE, + FtAddFt, + ExpandFunction(FtAddFt, 16), + FILETIME, + FILETIME, + ZERO_FILETIME) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + FILETIME, + STDAPICALLTYPE, + FtAdcFt, + ExpandFunction(FtAdcFt, 20), + FILETIME, + FILETIME, + WORD FAR*, + ZERO_FILETIME) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + FILETIME, + STDAPICALLTYPE, + FtSubFt, + ExpandFunction(FtSubFt, 16), + FILETIME, + FILETIME, + ZERO_FILETIME) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + FILETIME, + STDAPICALLTYPE, + FtMulDw, + ExpandFunction(FtMulDw, 12), + DWORD, + FILETIME, + ZERO_FILETIME) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + FILETIME, + STDAPICALLTYPE, + FtNegFt, + ExpandFunction(FtNegFt, 8), + FILETIME, + ZERO_FILETIME) + +DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, UlAddRef, ExpandFunction(UlAddRef, 4), LPVOID, 1) + +DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, UlRelease, ExpandFunction(UlRelease, 4), LPVOID, 1) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + LPTSTR, + STDAPICALLTYPE, + SzFindCh, + ExpandFunction(SzFindCh, 8), + LPCTSTR, + USHORT, + nullptr) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + LPTSTR, + STDAPICALLTYPE, + SzFindLastCh, + ExpandFunction(SzFindLastCh, 8), + LPCTSTR, + USHORT, + nullptr) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + LPTSTR, + STDAPICALLTYPE, + SzFindSz, + ExpandFunction(SzFindSz, 8), + LPCTSTR, + LPCTSTR, + nullptr) + +DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, unsigned int, STDAPICALLTYPE, UFromSz, ExpandFunction(UFromSz, 4), LPCTSTR, 0) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrGetOneProp, + ExpandFunction(HrGetOneProp, 12), + LPMAPIPROP, + ULONG, + LPSPropValue FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrSetOneProp, + ExpandFunction(HrSetOneProp, 8), + LPMAPIPROP, + LPSPropValue, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FPropExists, + ExpandFunction(FPropExists, 8), + LPMAPIPROP, + ULONG, + FALSE) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + LPSPropValue, + STDAPICALLTYPE, + PpropFindProp, + ExpandFunction(PpropFindProp, 12), + LPSPropValue, + ULONG, + ULONG, + nullptr) + +DEFINE_STUB_FUNCTION_V1(LINKAGE_EXTERN_C, STDAPICALLTYPE, FreePadrlist, ExpandFunction(FreePadrlist, 4), LPADRLIST) + +DEFINE_STUB_FUNCTION_V1(LINKAGE_EXTERN_C, STDAPICALLTYPE, FreeProws, ExpandFunction(FreeProws, 4), LPSRowSet) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrSzFromEntryID, + ExpandFunction(HrSzFromEntryID, 12), + ULONG, + LPENTRYID, + __in LPTSTR FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrEntryIDFromSz, + ExpandFunction(HrEntryIDFromSz, 12), + __in LPTSTR, + ULONG FAR*, + LPENTRYID FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_7( + LINKAGE_NO_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrComposeEID, + ExpandFunction(HrComposeEID, 28), + LPMAPISESSION, + ULONG, + LPBYTE, + ULONG, + LPENTRYID, + ULONG FAR*, + LPENTRYID FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_7( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrDecomposeEID, + ExpandFunction(HrDecomposeEID, 28), + LPMAPISESSION, + ULONG, + LPENTRYID, + ULONG FAR*, + LPENTRYID FAR*, + ULONG FAR*, + LPENTRYID FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrComposeMsgID, + ExpandFunction(HrComposeMsgID, 24), + LPMAPISESSION, + ULONG, + LPBYTE, + ULONG, + LPENTRYID, + __in LPTSTR FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrDecomposeMsgID, + ExpandFunction(HrDecomposeMsgID, 24), + LPMAPISESSION, + __in LPTSTR, + ULONG FAR*, + LPENTRYID FAR*, + ULONG FAR*, + LPENTRYID FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + HRESULT, + STDMETHODCALLTYPE, + OpenStreamOnFile, + ExpandFunction(OpenStreamOnFile, 24), + LPALLOCATEBUFFER, + LPFREEBUFFER, + ULONG, + __in LPCTSTR, + __in_opt LPCTSTR, + LPSTREAM FAR*, + MAPI_E_CALL_FAILED) + +#ifdef _INC_WINAPIFAMILY +DEFINE_STUB_FUNCTION_7( + LINKAGE_EXTERN_C, + _Check_return_ HRESULT, + STDMETHODCALLTYPE, + OpenTnefStream, + ExpandFunction(OpenTnefStream, 28), + LPVOID, + LPSTREAM, + __in LPTSTR, + ULONG, + LPMESSAGE, + WORD, + LPITNEF FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_8( + LINKAGE_EXTERN_C, + _Check_return_ HRESULT, + STDMETHODCALLTYPE, + OpenTnefStreamEx, + ExpandFunction(OpenTnefStreamEx, 32), + LPVOID, + LPSTREAM, + __in LPTSTR, + ULONG, + LPMESSAGE, + WORD, + LPADRBOOK, + LPITNEF FAR*, + MAPI_E_CALL_FAILED) +#else +DEFINE_STUB_FUNCTION_7( + LINKAGE_EXTERN_C, + HRESULT, + STDMETHODCALLTYPE, + OpenTnefStream, + ExpandFunction(OpenTnefStream, 28), + LPVOID, + LPSTREAM, + __in LPTSTR, + ULONG, + LPMESSAGE, + WORD, + LPITNEF FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_8( + LINKAGE_EXTERN_C, + HRESULT, + STDMETHODCALLTYPE, + OpenTnefStreamEx, + ExpandFunction(OpenTnefStreamEx, 32), + LPVOID, + LPSTREAM, + __in LPTSTR, + ULONG, + LPMESSAGE, + WORD, + LPADRBOOK, + LPITNEF FAR*, + MAPI_E_CALL_FAILED) +#endif + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDMETHODCALLTYPE, + GetTnefStreamCodepage, + ExpandFunction(GetTnefStreamCodepage, 12), + LPSTREAM, + ULONG FAR*, + ULONG FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, UlFromSzHex, ExpandFunction(UlFromSzHex, 4), LPCTSTR, 0) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScCountNotifications, + ExpandFunction(ScCountNotifications, 12), + int, + LPNOTIFICATION, + ULONG FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScCopyNotifications, + ExpandFunction(ScCopyNotifications, 16), + int, + LPNOTIFICATION, + LPVOID, + ULONG FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScRelocNotifications, + ExpandFunction(ScRelocNotifications, 20), + int, + LPNOTIFICATION, + LPVOID, + LPVOID, + ULONG FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScCountProps, + ExpandFunction(ScCountProps, 12), + int, + LPSPropValue, + ULONG FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScCopyProps, + ExpandFunction(ScCopyProps, 16), + int, + LPSPropValue, + LPVOID, + ULONG FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScRelocProps, + ExpandFunction(ScRelocProps, 20), + int, + LPSPropValue, + LPVOID, + LPVOID, + ULONG FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + LPSPropValue, + STDAPICALLTYPE, + LpValFindProp, + ExpandFunction(LpValFindProp, 12), + ULONG, + ULONG, + LPSPropValue, + nullptr) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScDupPropset, + ExpandFunction(ScDupPropset, 16), + int, + LPSPropValue, + LPALLOCATEBUFFER, + LPSPropValue FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FBadRglpszW, + ExpandFunction(FBadRglpszW, 8), + __in LPWSTR FAR*, + ULONG, + TRUE) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FBadRowSet, + ExpandFunction(FBadRowSet, 4), + LPSRowSet, + TRUE) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FBadRglpNameID, + ExpandFunction(FBadRglpNameID, 8), + LPMAPINAMEID FAR*, + ULONG, + TRUE) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + ULONG, + STDAPICALLTYPE, + FBadPropTag, + ExpandFunction(FBadPropTag, 4), + ULONG, + TRUE) + +DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, FBadRow, ExpandFunction(FBadRow, 4), LPSRow, TRUE) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + ULONG, + STDAPICALLTYPE, + FBadProp, + ExpandFunction(FBadProp, 4), + LPSPropValue, + TRUE) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + ULONG, + STDAPICALLTYPE, + FBadColumnSet, + ExpandFunction(FBadColumnSet, 4), + LPSPropTagArray, + TRUE) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + RTFSync, + ExpandFunction(RTFSync, 12), + LPMESSAGE, + ULONG, + __out BOOL FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + WrapCompressedRTFStream, + ExpandFunction(WrapCompressedRTFStream, 12), + __in LPSTREAM, + ULONG, + __out LPSTREAM FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + __ValidateParameters, + ExpandFunction(__ValidateParameters, 8), + METHODS, + void*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + __CPPValidateParameters, + ExpandFunction(__CPPValidateParameters, 8), + METHODS, + const LPVOID, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_2( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrValidateParameters, + ExpandFunction(HrValidateParameters, 8), + METHODS, + LPVOID FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + ULONG, + STDAPICALLTYPE, + FBadSortOrderSet, + ExpandFunction(FBadSortOrderSet, 4), + LPSSortOrderSet, + TRUE) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + BOOL, + STDAPICALLTYPE, + FBadEntryList, + ExpandFunction(FBadEntryList, 4), + LPENTRYLIST, + TRUE) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + ULONG, + STDAPICALLTYPE, + FBadRestriction, + ExpandFunction(FBadRestriction, 4), + LPSRestriction, + TRUE) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScUNCFromLocalPath, + ExpandFunction(ScUNCFromLocalPath, 12), + __in LPSTR, + __in LPSTR, + UINT, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + ScLocalPathFromUNC, + ExpandFunction(ScLocalPathFromUNC, 12), + __in LPSTR, + __in LPSTR, + UINT, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrIStorageFromStream, + ExpandFunction(HrIStorageFromStream, 16), + LPUNKNOWN, + LPCIID, + ULONG, + LPSTORAGE FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrValidateIPMSubtree, + ExpandFunction(HrValidateIPMSubtree, 20), + LPMDB, + ULONG, + ULONG FAR*, + LPSPropValue FAR*, + LPMAPIERROR FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + OpenIMsgSession, + ExpandFunction(OpenIMsgSession, 12), + LPMALLOC, + ULONG, + LPMSGSESS FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_V1( + LINKAGE_EXTERN_C, + STDAPICALLTYPE, + CloseIMsgSession, + ExpandFunction(CloseIMsgSession, 4), + LPMSGSESS) + +DEFINE_STUB_FUNCTION_11( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + OpenIMsgOnIStg, + ExpandFunction(OpenIMsgOnIStg, 44), + LPMSGSESS, + LPALLOCATEBUFFER, + LPALLOCATEMORE, + LPFREEBUFFER, + LPMALLOC, + LPVOID, + LPSTORAGE, + MSGCALLRELEASE FAR*, + ULONG, + ULONG, + LPMESSAGE FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + SetAttribIMsgOnIStg, + ExpandFunction(SetAttribIMsgOnIStg, 16), + LPVOID, + LPSPropTagArray, + LPSPropAttrArray, + LPSPropProblemArray FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + GetAttribIMsgOnIStg, + ExpandFunction(GetAttribIMsgOnIStg, 12), + LPVOID, + LPSPropTagArray, + LPSPropAttrArray FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + SCODE, + STDAPICALLTYPE, + MapStorageSCode, + ExpandFunction(MapStorageSCode, 4), + SCODE, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + SCODE, + STDMETHODCALLTYPE, + ScMAPIXFromSMAPI, + "ScMAPIXFromSMAPI", + LHANDLE, + ULONG, + LPCIID, + LPMAPISESSION FAR*, + MAPI_E_CALL_FAILED); + +DEFINE_STUB_FUNCTION_11( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPIAddress, + "MAPIAddress", + LHANDLE, + ULONG_PTR, + LPSTR, + ULONG, + LPSTR, + ULONG, + lpMapiRecipDesc, + FLAGS, + ULONG, + LPULONG, + lpMapiRecipDesc FAR*, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPIReadMail, + "MAPIReadMail", + LHANDLE, + ULONG_PTR, + LPSTR, + FLAGS, + ULONG, + lpMapiMessage FAR*, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPIResolveName, + "MAPIResolveName", + LHANDLE, + ULONG_PTR, + LPSTR, + FLAGS, + ULONG, + lpMapiRecipDesc FAR*, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPISendDocuments, + "MAPISendDocuments", + ULONG_PTR, + LPSTR, + LPSTR, + LPSTR, + ULONG, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPILogon, + "MAPILogon", + ULONG_PTR, + LPSTR, + LPSTR, + FLAGS, + ULONG, + LPLHANDLE, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPILogoff, + "MAPILogoff", + LHANDLE, + ULONG_PTR, + FLAGS, + ULONG, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPISendMail, + "MAPISendMail", + LHANDLE, + ULONG_PTR, + lpMapiMessage, + FLAGS, + ULONG, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPISaveMail, + "MAPISaveMail", + LHANDLE, + ULONG_PTR, + lpMapiMessage, + FLAGS, + ULONG, + LPSTR, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_7( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPIFindNext, + "MAPIFindNext", + LHANDLE, + ULONG_PTR, + LPSTR, + LPSTR, + FLAGS, + ULONG, + LPSTR, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPIDeleteMail, + "MAPIDeleteMail", + LHANDLE, + ULONG_PTR, + LPSTR, + FLAGS, + ULONG, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + ULONG, + FAR PASCAL, + MAPIDetails, + "MAPIDetails", + LHANDLE, + ULONG_PTR, + lpMapiRecipDesc, + FLAGS, + ULONG, + ULONG(MAPI_E_CALL_FAILED)) + +DEFINE_STUB_FUNCTION_V1( + LINKAGE_EXTERN_C, + STDAPICALLTYPE, + MAPICrashRecovery, + ExpandFunction(MAPICrashRecovery, 4), + ULONG) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + ULONG, + STDAPICALLTYPE, + MAPIFreeBuffer, + ExpandFunction(MAPIFreeBuffer, 4), + LPVOID, + 0) + +DEFINE_STUB_FUNCTION_0( + LINKAGE_EXTERN_C, + LPMALLOC, + STDAPICALLTYPE, + MAPIGetDefaultMalloc, + ExpandFunction(MAPIGetDefaultMalloc, 0), + nullptr) + +DEFINE_STUB_FUNCTION_6( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + OpenStreamOnFileW, + ExpandFunction(OpenStreamOnFileW, 24), + LPALLOCATEBUFFER, + LPFREEBUFFER, + ULONG, + LPWSTR, + LPWSTR, + LPSTREAM FAR*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_7( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrCreateNewWrappedObject, + ExpandFunction(HrCreateNewWrappedObject, 28), + void*, + ULONG, + ULONG, + const IID*, + const ULONG*, + BOOL, + void**, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrOpenOfflineObj, + ExpandFunction(HrOpenOfflineObj, 20), + ULONG, + LPCWSTR, + const GUID*, + const GUID*, + IMAPIOfflineMgr**, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_3( + LINKAGE_EXTERN_C, + HRESULT, + STDAPICALLTYPE, + HrCreateOfflineObj, + ExpandFunction(HrCreateOfflineObj, 12), + ULONG, + MAPIOFFLINE_CREATEINFO*, + IMAPIOfflineMgr**, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_4( + LINKAGE_EXTERN_C, + HRESULT, + STDMETHODCALLTYPE, + WrapCompressedRTFStreamEx, + ExpandFunction(WrapCompressedRTFStreamEx, 16), + LPSTREAM, + const RTF_WCSINFO*, + LPSTREAM*, + RTF_WCSRETINFO*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + BOOL, + WINAPI, + GetDefCachedMode, + ExpandFunction(GetDefCachedMode, 4), + BOOL*, + FALSE) + +DEFINE_STUB_FUNCTION_1( + LINKAGE_EXTERN_C, + BOOL, + WINAPI, + GetDefCachedModeDownloadPubFoldFavs, + ExpandFunction(GetDefCachedModeDownloadPubFoldFavs, 4), + BOOL*, + FALSE) + +DEFINE_STUB_FUNCTION_9( + LINKAGE_NO_EXTERN_C, + HRESULT, + WINAPI, + HrOpenABEntryWithExchangeContext, + ExpandFunction(HrOpenABEntryWithExchangeContext, 36), + LPMAPISESSION, + LPMAPIUID, + LPADRBOOK, + ULONG, + LPENTRYID, + LPCIID, + ULONG, + ULONG*, + LPUNKNOWN*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_12( + LINKAGE_NO_EXTERN_C, + HRESULT, + WINAPI, + HrDoABDetailsWithExchangeContext, + ExpandFunction(HrDoABDetailsWithExchangeContext, 48), + LPMAPISESSION, + LPMAPIUID, + LPADRBOOK, + ULONG_PTR*, + LPFNDISMISS, + LPVOID, + ULONG, + LPENTRYID, + LPFNBUTTON, + LPVOID, + LPSTR, + ULONG, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_11( + LINKAGE_NO_EXTERN_C, + HRESULT, + WINAPI, + HrDoABDetailsWithProviderUID, + ExpandFunction(HrDoABDetailsWithProviderUID, 44), + LPMAPIUID, + LPADRBOOK, + ULONG_PTR*, + LPFNDISMISS, + LPVOID, + ULONG, + LPENTRYID, + LPFNBUTTON, + LPVOID, + LPSTR, + ULONG, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_8( + LINKAGE_EXTERN_C, + HRESULT, + WINAPI, + HrOpenABEntryUsingDefaultContext, + ExpandFunction(HrOpenABEntryUsingDefaultContext, 32), + LPMAPISESSION, + LPADRBOOK, + ULONG, + LPENTRYID, + LPCIID, + ULONG, + ULONG*, + LPUNKNOWN*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_8( + LINKAGE_NO_EXTERN_C, + HRESULT, + WINAPI, + HrOpenABEntryWithProviderUID, + ExpandFunction(HrOpenABEntryWithProviderUID, 32), + LPMAPIUID, + LPADRBOOK, + ULONG, + LPENTRYID, + LPCIID, + ULONG, + ULONG*, + LPUNKNOWN*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_8( + LINKAGE_NO_EXTERN_C, + HRESULT, + WINAPI, + HrOpenABEntryWithProviderUIDSupport, + ExpandFunction(HrOpenABEntryWithProviderUIDSupport, 32), + LPMAPIUID, + LPMAPISUP, + ULONG, + LPENTRYID, + LPCIID, + ULONG, + ULONG*, + LPUNKNOWN*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_8( + LINKAGE_EXTERN_C, + HRESULT, + WINAPI, + HrOpenABEntryWithResolvedRow, + ExpandFunction(HrOpenABEntryWithResolvedRow, 32), + LPSRow, + LPADRBOOK, + ULONG, + LPENTRYID, + LPCIID, + ULONG, + ULONG*, + LPUNKNOWN*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_9( + LINKAGE_NO_EXTERN_C, + HRESULT, + WINAPI, + HrCompareABEntryIDsWithExchangeContext, + ExpandFunction(HrCompareABEntryIDsWithExchangeContext, 36), + LPMAPISESSION, + LPMAPIUID, + LPADRBOOK, + ULONG, + LPENTRYID, + ULONG, + LPENTRYID, + ULONG, + ULONG*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_7( + LINKAGE_EXTERN_C, + HRESULT, + WINAPI, + HrOpenABEntryWithSupport, + ExpandFunction(HrOpenABEntryWithSupport, 28), + LPMAPISUP, + ULONG, + LPENTRYID, + LPCIID, + ULONG, + ULONG*, + LPUNKNOWN*, + MAPI_E_CALL_FAILED) + +DEFINE_STUB_FUNCTION_5( + LINKAGE_NO_EXTERN_C, + HRESULT, + WINAPI, + HrGetGALFromEmsmdbUID, + ExpandFunction(HrGetGALFromEmsmdbUID, 20), + LPMAPISESSION, + LPADRBOOK, + LPMAPIUID, + ULONG*, + LPENTRYID*, + MAPI_E_CALL_FAILED) \ No newline at end of file diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.cpp b/com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.cpp new file mode 100644 index 000000000..ab0edc969 --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.cpp @@ -0,0 +1,780 @@ +#include +#include +#include +#include +#include +#include +#include + +// clang-format off +#pragma warning(disable : 26426) // Warning C26426 Global initializer calls a non-constexpr (i.22) +#pragma warning(disable : 26446) // Warning C26446 Prefer to use gsl::at() instead of unchecked subscript operator (bounds.4). +#pragma warning(disable : 26481) // Warning C26481 Don't use pointer arithmetic. Use span instead (bounds.1). +#pragma warning(disable : 26485) // Warning C26485 Expression '': No array to pointer decay (bounds.3). +#pragma warning(disable : 26487) // Warning C26487 Don't return a pointer '' that may be invalid (lifetime.4). +// clang-format on + +namespace mapistub +{ + /* + * MAPI Stub Utilities + * + * Public Functions: + * + * GetPrivateMAPI() + * Obtain a handle to the MAPI DLL. This function will load the MAPI DLL + * if it hasn't already been loaded + * + * UnloadPrivateMAPI() + * Forces the MAPI DLL to be unloaded. This can cause problems if the code + * still has outstanding allocated MAPI memory, or unmatched calls to + * MAPIInitialize/MAPIUninitialize + * + * ForceOutlookMAPI() + * Instructs the stub code to always try loading the Outlook version of MAPI + * on the system, instead of respecting the system MAPI registration + * (HKLM\Software\Clients\Mail). This call must be made prior to any MAPI + * function calls. + + * ForceSystemMAPI() + * Instructs the stub code to always try loading the MAPI32 from the + * system directory. This call must be made prior to any MAPI + * function calls. + */ + + std::function logLoadMapiCallback; + std::function logLoadLibraryCallback; + + void __cdecl logLoadMapi(LPCWSTR szMsg, ...) + { + if (logLoadMapiCallback) + { + va_list argList = nullptr; + va_start(argList, szMsg); + logLoadMapiCallback(szMsg, argList); + va_end(argList); + } + } + + void __cdecl logLoadLibrary(LPCWSTR szMsg, ...) + { + if (logLoadLibraryCallback) + { + va_list argList = nullptr; + va_start(argList, szMsg); + logLoadLibraryCallback(szMsg, argList); + va_end(argList); + } + } + + template void LogError(LPCWSTR function, T error) + { + if (error) logLoadMapi(L"%ws failed with 0x%08X\n", function, error); + } + + std::wstring GetSystemDirectory() + { + logLoadMapi(L"Enter GetSystemDirectory\n"); + auto path = std::wstring(); + auto copied = DWORD(); + do + { + path.resize(path.size() + MAX_PATH); + copied = ::GetSystemDirectoryW(const_cast(path.data()), static_cast(path.size())); + if (!copied) + { + const auto dwErr = GetLastError(); + logLoadMapi(L"GetSystemDirectory: GetSystemDirectoryW failed with 0x%08X\n", dwErr); + } + } while (copied >= path.size()); + + path.resize(copied); + + logLoadMapi(L"Exit GetSystemDirectory: found %ws\n", path.c_str()); + return path; + } + + std::vector g_pszOutlookQualifiedComponents = { + L"{5812C571-53F0-4467-BEFA-0A4F47A9437C}", // O16_CATEGORY_GUID_CORE_OFFICE (retail) // STRING_OK + L"{E83B4360-C208-4325-9504-0D23003A74A5}", // O15_CATEGORY_GUID_CORE_OFFICE (retail) // STRING_OK + L"{1E77DE88-BCAB-4C37-B9E5-073AF52DFD7A}", // O14_CATEGORY_GUID_CORE_OFFICE (retail) // STRING_OK + L"{24AAE126-0911-478F-A019-07B875EB9996}", // O12_CATEGORY_GUID_CORE_OFFICE (retail) // STRING_OK + L"{BC174BAD-2F53-4855-A1D5-0D575C19B1EA}", // O11_CATEGORY_GUID_CORE_OFFICE (retail) // STRING_OK + L"{BC174BAD-2F53-4855-A1D5-1D575C19B1EA}", // O11_CATEGORY_GUID_CORE_OFFICE (debug) // STRING_OK + }; + + std::wstring GetInstalledOutlookMAPI(int iOutlook); + std::wstring GetInstalledOutlookMAPI(const std::wstring component); + + _Check_return_ HMODULE LoadFromSystemDir(_In_ const std::wstring& szDLLName) + { + if (szDLLName.empty()) return nullptr; + + static auto szSystemDir = std::wstring(); + static auto bSystemDirLoaded = false; + + logLoadLibrary(L"LoadFromSystemDir - loading \"%ws\"\n", szDLLName.c_str()); + + if (!bSystemDirLoaded) + { + szSystemDir = mapistub::GetSystemDirectory(); + bSystemDirLoaded = true; + } + + const auto szDLLPath = szSystemDir + L"\\" + szDLLName; + logLoadLibrary(L"LoadFromSystemDir - loading from \"%ws\"\n", szDLLPath.c_str()); + return LoadLibraryW(szDLLPath.c_str()); + } + + // Loads szModule at the handle given by hModule, then looks for szEntryPoint. + // Will not load a module or entry point twice + void LoadProc(_In_ const std::wstring& szModule, HMODULE& hModule, LPCSTR szEntryPoint, FARPROC& lpfn) + { + if (!szEntryPoint) return; + if (!hModule && !szModule.empty()) + { + hModule = LoadFromSystemDir(szModule); + } + + if (!hModule) return; + + lpfn = GetProcAddress(hModule, szEntryPoint); + if (!lpfn) + { + logLoadLibrary(L"LoadProc: failed to load \"%ws\" from \"%ws\"\n", szEntryPoint, szModule.c_str()); + } + } + + _Check_return_ HMODULE LoadFromOLMAPIDir(_In_ const std::wstring& szDLLName) + { + HMODULE hModRet = nullptr; + + logLoadLibrary(L"LoadFromOLMAPIDir - loading \"%ws\"\n", szDLLName.c_str()); + + for (const auto component : mapistub::g_pszOutlookQualifiedComponents) + { + auto szOutlookMAPIPath = mapistub::GetInstalledOutlookMAPI(component); + if (!szOutlookMAPIPath.empty()) + { + auto szDrive = std::wstring(_MAX_DRIVE, '\0'); + auto szMAPIPath = std::wstring(MAX_PATH, '\0'); + const auto errNo = _wsplitpath_s( + szOutlookMAPIPath.c_str(), + const_cast(szDrive.c_str()), + szDrive.length(), + const_cast(szMAPIPath.c_str()), + szMAPIPath.length(), + nullptr, + NULL, + nullptr, + NULL); + LogError(L"LoadFromOLMAPIDir: _wsplitpath_s", errNo); + + if (errNo == ERROR_SUCCESS) + { + auto szFullPath = szDrive + szMAPIPath + szDLLName; + + logLoadLibrary(L"LoadFromOLMAPIDir - loading from \"%ws\"\n", szFullPath.c_str()); + hModRet = LoadLibraryW(szFullPath.c_str()); + } + } + + if (hModRet) break; + } + + return hModRet; + } + + // From kernel32.dll + HMODULE hModKernel32 = nullptr; + typedef bool(WINAPI GETMODULEHANDLEEXW)(DWORD dwFlags, LPCWSTR lpModuleName, HMODULE* phModule); + GETMODULEHANDLEEXW* pfnGetModuleHandleExW = nullptr; + BOOL WINAPI MyGetModuleHandleExW(DWORD dwFlags, LPCWSTR lpModuleName, HMODULE* phModule) + { + if (!pfnGetModuleHandleExW) + { + FARPROC lpfnFP = {}; + LoadProc(L"kernel32.dll", hModKernel32, "GetModuleHandleExW", lpfnFP); // STRING_OK; + pfnGetModuleHandleExW = reinterpret_cast(lpfnFP); + } + + if (pfnGetModuleHandleExW) return pfnGetModuleHandleExW(dwFlags, lpModuleName, phModule); + *phModule = GetModuleHandleW(lpModuleName); + return *phModule != nullptr; + } + + // From MSI.dll + HMODULE hModMSI = nullptr; + typedef HRESULT(STDMETHODCALLTYPE MSIPROVIDEQUALIFIEDCOMPONENT)( + LPCWSTR szCategory, + LPCWSTR szQualifier, + DWORD dwInstallMode, + LPWSTR lpPathBuf, + LPDWORD pcchPathBuf); + MSIPROVIDEQUALIFIEDCOMPONENT* pfnMsiProvideQualifiedComponent = nullptr; + HRESULT MyMsiProvideQualifiedComponent( + LPCWSTR szCategory, + LPCWSTR szQualifier, + DWORD dwInstallMode, + LPWSTR lpPathBuf, + LPDWORD pcchPathBuf) + { + if (!pfnMsiProvideQualifiedComponent) + { + FARPROC lpfnFP = {}; + LoadProc(L"msi.dll", hModMSI, "MsiProvideQualifiedComponentW", lpfnFP); // STRING_OK; + pfnMsiProvideQualifiedComponent = reinterpret_cast(lpfnFP); + } + + if (pfnMsiProvideQualifiedComponent) + return pfnMsiProvideQualifiedComponent(szCategory, szQualifier, dwInstallMode, lpPathBuf, pcchPathBuf); + return MAPI_E_CALL_FAILED; + } + + const WCHAR WszKeyNameMailClient[] = L"Software\\Clients\\Mail"; + const WCHAR WszValueNameDllPathEx[] = L"DllPathEx"; + const WCHAR WszValueNameDllPath[] = L"DllPath"; + + const WCHAR WszValueNameMSI[] = L"MSIComponentID"; + const WCHAR WszValueNameLCID[] = L"MSIApplicationLCID"; + + const WCHAR WszOutlookMapiClientName[] = L"Microsoft Outlook"; + + const WCHAR WszMAPISystemPath[] = L"%s\\%s"; + const WCHAR WszMAPISystemDrivePath[] = L"%s%s%s"; + const WCHAR szMAPISystemDrivePath[] = L"%hs%hs%ws"; + + static const WCHAR WszOlMAPI32DLL[] = L"olmapi32.dll"; + static const WCHAR WszMSMAPI32DLL[] = L"msmapi32.dll"; + static const WCHAR WszMapi32[] = L"mapi32.dll"; + static const WCHAR WszMapiStub[] = L"mapistub.dll"; + + static const CHAR SzFGetComponentPath[] = "FGetComponentPath"; + + // Sequence number which is incremented every time we set our MAPI handle which will + // cause a re-fetch of all stored function pointers + volatile ULONG g_ulDllSequenceNum = 1; + + // Whether or not we should ignore the system MAPI registration and always try to find + // Outlook and its MAPI DLLs + static bool s_fForceOutlookMAPI = false; + + // Whether or not we should ignore the registry and load MAPI from the system directory + static bool s_fForceSystemMAPI = false; + + static volatile HMODULE g_hinstMAPI = nullptr; + HMODULE g_hModPstPrx32 = nullptr; + + /* + * RegQueryWszExpand + * Wrapper for RegQueryValueExW which automatically expands REG_EXPAND_SZ values + */ + std::wstring RegQueryWszExpand(HKEY hKey, const std::wstring& lpValueName) + { + logLoadMapi(L"Enter RegQueryWszExpand: hKey = %p, lpValueName = %ws\n", hKey, lpValueName.c_str()); + DWORD dwType = 0; + + std::wstring ret; + auto rgchValue = std::wstring(MAX_PATH, '\0'); + auto dwSize = static_cast(rgchValue.length()); + + const auto dwErr = RegQueryValueExW( + hKey, + lpValueName.c_str(), + nullptr, + &dwType, + reinterpret_cast(const_cast(rgchValue.data())), + &dwSize); + + if (dwErr == ERROR_SUCCESS) + { + logLoadMapi(L"RegQueryWszExpand: rgchValue = %ws\n", rgchValue.c_str()); + if (dwType == REG_EXPAND_SZ) + { + const auto szPath = std::wstring(MAX_PATH, '\0'); + // Expand the strings + const auto cch = ExpandEnvironmentStringsW( + rgchValue.c_str(), const_cast(szPath.c_str()), static_cast(szPath.length())); + if (0 != cch && cch < MAX_PATH) + { + logLoadMapi(L"RegQueryWszExpand: rgchValue(expanded) = %ws\n", szPath.c_str()); + ret = szPath; + } + } + else if (dwType == REG_SZ) + { + ret = rgchValue; + } + } + + logLoadMapi(L"Exit RegQueryWszExpand: dwErr = 0x%08X\n", dwErr); + return ret; + } + + std::string wstringTostring(const std::wstring& src) + { + std::string dst; + dst.reserve(src.length()); + std::transform(src.begin(), src.end(), std::back_inserter(dst), [](auto c) { return static_cast(c); }); + return dst; + } + + /* + * GetComponentPath + * Wrapper around mapi32.dll->FGetComponentPath which maps an MSI component ID to + * a DLL location from the default MAPI client registration values + */ + std::wstring GetComponentPath(const std::wstring& szComponent, const std::wstring& szQualifier, bool fInstall) + { + logLoadMapi( + L"Enter GetComponentPath: szComponent = %ws, szQualifier = %ws, fInstall = 0x%08X\n", + szComponent.c_str(), + szQualifier.c_str(), + fInstall); + auto fReturn = false; + std::wstring path; + + typedef bool(STDAPICALLTYPE * FGetComponentPathType)(LPCSTR, LPSTR, LPSTR, DWORD, bool); + + auto hMapiStub = LoadLibraryW(WszMapi32); + if (!hMapiStub) hMapiStub = LoadLibraryW(WszMapiStub); + + if (hMapiStub) + { + const auto pFGetCompPath = + reinterpret_cast(GetProcAddress(hMapiStub, SzFGetComponentPath)); + + if (pFGetCompPath) + { + CHAR lpszPath[MAX_PATH] = {0}; + const constexpr ULONG cchPath = _countof(lpszPath); + + auto szComponentA = wstringTostring(szComponent); + auto szQualifierA = wstringTostring(szQualifier); + fReturn = pFGetCompPath( + szComponentA.c_str(), const_cast(szQualifierA.c_str()), lpszPath, cchPath, fInstall); + auto pathA = std::string(lpszPath); + if (fReturn) path = {pathA.begin(), pathA.end()}; + logLoadMapi(L"GetComponentPath: path = %ws\n", path.c_str()); + } + + FreeLibrary(hMapiStub); + } + + logLoadMapi(L"Exit GetComponentPath: fReturn = 0x%08X\n", fReturn); + return path; + } + + /* + * GetMailClientFromMSIData + * Attempt to locate the MAPI provider DLL via HKLM\Software\Clients\Mail\(provider)\MSIComponentID + */ + std::wstring GetMailClientFromMSIData(HKEY hkeyMapiClient) + { + logLoadMapi(L"Enter GetMailClientFromMSIData\n"); + if (!hkeyMapiClient) return L""; + WCHAR rgchMSIComponentID[MAX_PATH] = {0}; + WCHAR rgchMSIApplicationLCID[MAX_PATH] = {0}; + DWORD dwType = 0; + std::wstring szPath; + + DWORD dwSizeComponentID = _countof(rgchMSIComponentID); + DWORD dwSizeLCID = _countof(rgchMSIApplicationLCID); + + if (ERROR_SUCCESS == RegQueryValueExW( + hkeyMapiClient, + WszValueNameMSI, + nullptr, + &dwType, + reinterpret_cast(&rgchMSIComponentID), + &dwSizeComponentID) && + ERROR_SUCCESS == RegQueryValueExW( + hkeyMapiClient, + WszValueNameLCID, + nullptr, + &dwType, + reinterpret_cast(&rgchMSIApplicationLCID), + &dwSizeLCID)) + { + const auto componentID = std::wstring(rgchMSIComponentID, dwSizeComponentID); + const auto applicationID = std::wstring(rgchMSIApplicationLCID, dwSizeLCID); + szPath = GetComponentPath(componentID, applicationID, false); + } + + logLoadMapi(L"Exit GetMailClientFromMSIData: szPath = %ws\n", szPath.c_str()); + return szPath; + } + + /* + * GetMAPISystemDir + * Fall back for loading System32\Mapi32.dll if all else fails + */ + std::wstring GetMAPISystemDir() { return GetSystemDirectory() + L"\\" + std::wstring(WszMapi32); } + + HKEY GetHKeyMapiClient(const std::wstring& pwzProviderOverride) + { + logLoadMapi(L"Enter GetHKeyMapiClient (%ws)\n", pwzProviderOverride.c_str()); + HKEY hMailKey = nullptr; + + // Open HKLM\Software\Clients\Mail + auto status = RegOpenKeyExW(HKEY_LOCAL_MACHINE, WszKeyNameMailClient, 0, KEY_READ, &hMailKey); + LogError(L"GetHKeyMapiClient: RegOpenKeyExW(HKLM)", status); + if (status != ERROR_SUCCESS) + { + hMailKey = nullptr; + } + + // If a specific provider wasn't specified, load the name of the default MAPI provider + std::wstring defaultClient; + auto pwzProvider = pwzProviderOverride; + if (hMailKey && pwzProvider.empty()) + { + const auto rgchMailClient = std::wstring(MAX_PATH, '\0'); + // Get Outlook application path registry value + DWORD dwSize = MAX_PATH; + DWORD dwType = 0; + status = RegQueryValueExW( + hMailKey, + nullptr, + nullptr, + &dwType, + reinterpret_cast(const_cast(rgchMailClient.c_str())), + &dwSize); + LogError(L"GetHKeyMapiClient: RegQueryValueExW(hMailKey)", status); + if (status == ERROR_SUCCESS) + { + defaultClient = rgchMailClient; + logLoadMapi(L"GetHKeyMapiClient: HKLM\\%ws = %ws\n", WszKeyNameMailClient, defaultClient.c_str()); + } + } + + if (pwzProvider.empty()) pwzProvider = defaultClient; + + HKEY hkeyMapiClient = nullptr; + if (hMailKey && !pwzProvider.empty()) + { + logLoadMapi(L"GetHKeyMapiClient: pwzProvider = %ws\n", pwzProvider.c_str()); + status = RegOpenKeyExW(hMailKey, pwzProvider.c_str(), 0, KEY_READ, &hkeyMapiClient); + LogError(L"GetHKeyMapiClient: RegOpenKeyExW", status); + if (status != ERROR_SUCCESS) + { + hkeyMapiClient = nullptr; + } + } + + logLoadMapi(L"Exit GetHKeyMapiClient.hkeyMapiClient found (%ws)\n", hkeyMapiClient ? L"true" : L"false"); + + if (hMailKey) RegCloseKey(hMailKey); + return hkeyMapiClient; + } + + // Looks up Outlook's path given its qualified component guid + std::wstring GetOutlookPath(_In_ const std::wstring& szCategory, _Out_opt_ bool* lpb64) + { + logLoadMapi(L"Enter GetOutlookPath: szCategory = %ws\n", szCategory.c_str()); + DWORD dwValueBuf = 0; + std::wstring path; + + if (lpb64) *lpb64 = false; + + auto hRes = MyMsiProvideQualifiedComponent( + szCategory.c_str(), + L"outlook.x64.exe", // STRING_OK + static_cast(INSTALLMODE_DEFAULT), + nullptr, + &dwValueBuf); + LogError(L"GetOutlookPath: MsiProvideQualifiedComponent(x64)", hRes); + if (hRes == S_OK) + { + if (lpb64) *lpb64 = true; + } + else + { + hRes = MyMsiProvideQualifiedComponent( + szCategory.c_str(), + L"outlook.exe", // STRING_OK + static_cast(INSTALLMODE_DEFAULT), + nullptr, + &dwValueBuf); + LogError(L"GetOutlookPath: MsiProvideQualifiedComponent(x86)", hRes); + } + + if (hRes == S_OK) + { + dwValueBuf += 1; + const auto lpszTempPath = std::wstring(dwValueBuf, '\0'); + + hRes = MyMsiProvideQualifiedComponent( + szCategory.c_str(), + L"outlook.x64.exe", // STRING_OK + static_cast(INSTALLMODE_DEFAULT), + const_cast(lpszTempPath.c_str()), + &dwValueBuf); + LogError(L"GetOutlookPath: MsiProvideQualifiedComponent(x64)", hRes); + if (hRes != S_OK) + { + hRes = MyMsiProvideQualifiedComponent( + szCategory.c_str(), + L"outlook.exe", // STRING_OK + static_cast(INSTALLMODE_DEFAULT), + const_cast(lpszTempPath.c_str()), + &dwValueBuf); + LogError(L"GetOutlookPath: MsiProvideQualifiedComponent(x86)", hRes); + } + + if (hRes == S_OK) + { + path = lpszTempPath; + logLoadMapi(L"Exit GetOutlookPath: Path = %ws\n", path.c_str()); + } + } + + if (path.empty()) + { + logLoadMapi(L"Exit GetOutlookPath: nothing found\n"); + } + + return path; + } + + std::wstring GetInstalledOutlookMAPI(int iOutlook) + { + logLoadMapi(L"Enter GetInstalledOutlookMAPI(%d)\n", iOutlook); + + auto szPath = GetInstalledOutlookMAPI(g_pszOutlookQualifiedComponents[iOutlook]); + + if (!szPath.empty()) + { + logLoadMapi(L"GetInstalledOutlookMAPI: found %ws\n", szPath.c_str()); + return szPath; + } + + logLoadMapi(L"Exit GetInstalledOutlookMAPI: found nothing\n"); + return L""; + } + + std::wstring GetInstalledOutlookMAPI(const std::wstring component) + { + logLoadMapi(L"Enter GetInstalledOutlookMAPI(%s)\n", component.c_str()); + + auto lpszTempPath = GetOutlookPath(component, nullptr); + + if (!lpszTempPath.empty()) + { + WCHAR szDrive[_MAX_DRIVE] = {0}; + WCHAR szOutlookPath[MAX_PATH] = {0}; + const auto errNo = _wsplitpath_s( + lpszTempPath.c_str(), szDrive, _MAX_DRIVE, szOutlookPath, MAX_PATH, nullptr, NULL, nullptr, NULL); + LogError(L"GetOutlookPath: _wsplitpath_s", errNo); + + if (errNo == ERROR_SUCCESS) + { + const auto szPath = std::wstring(szDrive) + std::wstring(szOutlookPath) + WszOlMAPI32DLL; + + logLoadMapi(L"GetInstalledOutlookMAPI: found %ws\n", szPath.c_str()); + return szPath; + } + } + + logLoadMapi(L"Exit GetInstalledOutlookMAPI: found nothing\n"); + return L""; + } + + std::vector GetInstalledOutlookMAPI() + { + logLoadMapi(L"Enter GetInstalledOutlookMAPI\n"); + auto paths = std::vector(); + + for (const auto compontent : g_pszOutlookQualifiedComponents) + { + auto szPath = GetInstalledOutlookMAPI(compontent); + if (!szPath.empty()) paths.push_back(szPath); + } + + logLoadMapi(L"Exit GetInstalledOutlookMAPI: found %d paths\n", paths.size()); + return paths; + } + + std::vector GetMAPIPaths() + { + auto paths = std::vector(); + std::wstring szPath; + if (s_fForceSystemMAPI) + { + szPath = GetMAPISystemDir(); + if (!szPath.empty()) paths.push_back(szPath); + return paths; + } + + auto hkeyMapiClient = HKEY{}; + if (s_fForceOutlookMAPI) + hkeyMapiClient = GetHKeyMapiClient(WszOutlookMapiClientName); + else + hkeyMapiClient = GetHKeyMapiClient(L""); + + szPath = RegQueryWszExpand(hkeyMapiClient, WszValueNameDllPathEx); + if (!szPath.empty()) paths.push_back(szPath); + + auto outlookPaths = GetInstalledOutlookMAPI(); + paths.insert(end(paths), std::begin(outlookPaths), std::end(outlookPaths)); + + szPath = RegQueryWszExpand(hkeyMapiClient, WszValueNameDllPath); + if (!szPath.empty()) paths.push_back(szPath); + + szPath = GetMailClientFromMSIData(hkeyMapiClient); + if (!szPath.empty()) paths.push_back(szPath); + + if (!s_fForceOutlookMAPI) + { + szPath = GetMAPISystemDir(); + if (!szPath.empty()) paths.push_back(szPath); + } + + if (hkeyMapiClient) RegCloseKey(hkeyMapiClient); + return paths; + } + + HMODULE GetDefaultMapiHandle() + { + logLoadMapi(L"Enter GetDefaultMapiHandle\n"); + HMODULE hinstMapi = nullptr; + + auto paths = GetMAPIPaths(); + for (const auto& szPath : paths) + { + logLoadMapi(L"Trying %ws\n", szPath.c_str()); + hinstMapi = LoadLibraryW(szPath.c_str()); + if (hinstMapi) break; + } + + logLoadMapi(L"Exit GetDefaultMapiHandle: hinstMapi = %p\n", hinstMapi); + return hinstMapi; + } + + /*------------------------------------------------------------------------------ + Attach to wzMapiDll(olmapi32.dll/msmapi32.dll) if it is already loaded in the + current process. + ------------------------------------------------------------------------------*/ + HMODULE AttachToMAPIDll(const WCHAR* wzMapiDll) + { + logLoadMapi(L"Enter AttachToMAPIDll: wzMapiDll = %ws\n", wzMapiDll); + HMODULE hinstPrivateMAPI = nullptr; + MyGetModuleHandleExW(0UL, wzMapiDll, &hinstPrivateMAPI); + logLoadMapi(L"Exit AttachToMAPIDll: hinstPrivateMAPI = %p\n", hinstPrivateMAPI); + return hinstPrivateMAPI; + } + + HMODULE GetMAPIHandle() noexcept { return g_hinstMAPI; } + + void SetMAPIHandle(HMODULE hinstMAPI) + { + logLoadMapi(L"Enter SetMAPIHandle: hinstMAPI = %p\n", hinstMAPI); + HMODULE hinstToFree = nullptr; + + if (hinstMAPI == nullptr) + { + // If we've preloaded pstprx32.dll, unload it before MAPI is unloaded to prevent dependency problems + if (g_hModPstPrx32) + { + FreeLibrary(g_hModPstPrx32); + g_hModPstPrx32 = nullptr; + } + + hinstToFree = static_cast( + InterlockedExchangePointer(reinterpret_cast(&g_hinstMAPI), nullptr)); + } + else + { + // Preload pstprx32 to prevent crash when using autodiscover to build a new profile + if (!g_hModPstPrx32) + { + g_hModPstPrx32 = LoadFromOLMAPIDir(L"pstprx32.dll"); // STRING_OK + } + + // Code Analysis gives us a C28112 error when we use InterlockedCompareExchangePointer, so we instead exchange, check and exchange back + //hinstPrev = (HMODULE)InterlockedCompareExchangePointer(reinterpret_cast(&g_hinstMAPI), hinstMAPI, hinstNULL); + const auto hinstPrev = + InterlockedExchangePointer(reinterpret_cast(&g_hinstMAPI), hinstMAPI); + if (nullptr != hinstPrev) + { + static_cast(InterlockedExchangePointer( + reinterpret_cast(&g_hinstMAPI), static_cast(hinstPrev))); + hinstToFree = hinstMAPI; + } + + // If we've updated our MAPI handle, any previous addressed fetched via GetProcAddress are invalid, so we + // have to increment a sequence number to signal that they need to be re-fetched + InterlockedIncrement(reinterpret_cast(&g_ulDllSequenceNum)); + } + + if (nullptr != hinstToFree) + { + FreeLibrary(hinstToFree); + } + + logLoadMapi(L"Exit SetMAPIHandle\n"); + } + + HMODULE GetPrivateMAPI() + { + logLoadMapi(L"Enter GetPrivateMAPI\n"); + auto hinstPrivateMAPI = GetMAPIHandle(); + + if (nullptr == hinstPrivateMAPI) + { + // First, try to attach to olmapi32.dll if it's loaded in the process + hinstPrivateMAPI = AttachToMAPIDll(WszOlMAPI32DLL); + + // If that fails try msmapi32.dll, for Outlook 11 and below + // Only try this in the static lib, otherwise msmapi32.dll will attach to itself. + if (nullptr == hinstPrivateMAPI) + { + hinstPrivateMAPI = AttachToMAPIDll(WszMSMAPI32DLL); + } + + // If MAPI isn't loaded in the process yet, then find the path to the DLL and + // load it manually. + if (nullptr == hinstPrivateMAPI) + { + hinstPrivateMAPI = GetDefaultMapiHandle(); + } + + if (nullptr != hinstPrivateMAPI) + { + SetMAPIHandle(hinstPrivateMAPI); + } + + // Reason - if for any reason there is an instance already loaded, SetMAPIHandle() + // will free the new one and reuse the old one + // So we fetch the instance from the global again + logLoadMapi(L"Exit GetPrivateMAPI: Returning GetMAPIHandle()\n"); + return GetMAPIHandle(); + } + + logLoadMapi(L"Exit GetPrivateMAPI, hinstPrivateMAPI = %p\n", hinstPrivateMAPI); + return hinstPrivateMAPI; + } + + void UnloadPrivateMAPI() + { + logLoadMapi(L"Enter UnloadPrivateMAPI\n"); + if (GetMAPIHandle() != nullptr) + { + SetMAPIHandle(nullptr); + } + + logLoadMapi(L"Exit UnloadPrivateMAPI\n"); + } + + void ForceOutlookMAPI(bool fForce) + { + logLoadMapi(L"ForceOutlookMAPI: fForce = 0x%08X\n", fForce); + s_fForceOutlookMAPI = fForce; + } + + void ForceSystemMAPI(bool fForce) + { + logLoadMapi(L"ForceSystemMAPI: fForce = 0x%08X\n", fForce); + s_fForceSystemMAPI = fForce; + } +} // namespace mapistub diff --git a/com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.h b/com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.h new file mode 100644 index 000000000..82d4d08cd --- /dev/null +++ b/com/win32comext/mapi/src/MAPIStubLibrary/library/stubutils.h @@ -0,0 +1,52 @@ +#pragma once +#include +#include +#include + +// stubutils.h - Optional header to enable clients to reuse stubutils code +// Not reuqired to build the mapistub library + +namespace mapistub +{ + // Assign callbacks to these to enable logging + extern std::function logLoadMapiCallback; + extern std::function logLoadLibraryCallback; + + std::wstring GetSystemDirectory(); + + _Check_return_ HMODULE LoadFromSystemDir(_In_ const std::wstring& szDLLName); + + extern HMODULE hModKernel32; + extern HMODULE hModMSI; + // Loads szModule at the handle given by hModule, then looks for szEntryPoint. + // Will not load a module or entry point twice + void LoadProc(_In_ const std::wstring& szModule, HMODULE& hModule, LPCSTR szEntryPoint, FARPROC& lpfn); + + extern volatile ULONG g_ulDllSequenceNum; + // Keep this in sync with g_pszOutlookQualifiedComponents + enum officeComponent + { + oqcOffice16 = 0, + oqcOffice15 = 1, + oqcOffice14 = 2, + oqcOffice12 = 3, + oqcOffice11 = 4, + oqcOffice11Debug = 5 + }; + + std::wstring GetComponentPath(const std::wstring& szComponent, const std::wstring& szQualifier, bool fInstall); + extern std::vector g_pszOutlookQualifiedComponents; + std::vector GetMAPIPaths(); + // Looks up Outlook's path given its qualified component guid + std::wstring GetOutlookPath(_In_ const std::wstring& szCategory, _Out_opt_ bool* lpb64); + std::wstring GetInstalledOutlookMAPI(int iOutlook); + std::wstring GetMAPISystemDir(); + + HMODULE GetMAPIHandle() noexcept; + void SetMAPIHandle(HMODULE hinstMAPI); + + HMODULE GetPrivateMAPI(); + void UnloadPrivateMAPI(); + void ForceOutlookMAPI(bool fForce); + void ForceSystemMAPI(bool fForce); +} // namespace mapistub diff --git a/com/win32comext/mapi/src/mapi_headers/extraMAPIDefs.h b/com/win32comext/mapi/src/extraMAPIDefs.h similarity index 86% rename from com/win32comext/mapi/src/mapi_headers/extraMAPIDefs.h rename to com/win32comext/mapi/src/extraMAPIDefs.h index 7550753a7..26e2d08af 100644 --- a/com/win32comext/mapi/src/mapi_headers/extraMAPIDefs.h +++ b/com/win32comext/mapi/src/extraMAPIDefs.h @@ -1,7 +1,7 @@ #pragma once // https://blogs.msdn.microsoft.com/stephen_griffin/2011/10/13/the-elusive-0x81002746-error/ -// https://github.com/stephenegriffin/mfcmapi +// https://github.com/microsoft/mfcmapi/blob/main/core/interpret/errorArray.h #define MAIL_E_NAMENOTFOUND MAKE_SCODE(SEVERITY_ERROR, 0x0100, 10054) #define MAPI_E_STORE_FULL MAKE_MAPI_E(0x60C) #define MAPI_E_LOCKID_LIMIT MAKE_MAPI_E(0x60D) diff --git a/com/win32comext/mapi/src/mapi_headers/extraMAPIGuids.h b/com/win32comext/mapi/src/extraMAPIGuids.h similarity index 100% rename from com/win32comext/mapi/src/mapi_headers/extraMAPIGuids.h rename to com/win32comext/mapi/src/extraMAPIGuids.h diff --git a/com/win32comext/mapi/src/mapi_headers/EdkMdb.h b/com/win32comext/mapi/src/mapi_headers/EdkMdb.h deleted file mode 100644 index 6de385916..000000000 --- a/com/win32comext/mapi/src/mapi_headers/EdkMdb.h +++ /dev/null @@ -1,2400 +0,0 @@ -/* - * EDKMDB.H - * - * Microsoft Exchange Information Store - * Copyright (C) 1986-2002, Microsoft Corporation - * - * Contains declarations of additional properties and interfaces - * offered by Microsoft Exchange Information Store - */ - -#ifndef EDKMDB_INCLUDED -#define EDKMDB_INCLUDED - -/* - * WARNING: Many of the property id values contained within this - * file are subject to change. For best results please use the - * literals declared here instead of the numerical values. - */ - -#define pidStoreNonTransMin 0x0E40 -#define pidExchangeXmitReservedMin 0x3FE0 -#define pidExchangeNonXmitReservedMin 0x65E0 -#define pidProfileMin 0x6600 -#define pidStoreMin 0x6618 -#define pidFolderMin 0x6638 -#define pidMessageReadOnlyMin 0x6640 -#define pidMessageWriteableMin 0x6658 -#define pidAttachReadOnlyMin 0x666C -#define pidSpecialMin 0x6670 -#define pidAdminMin 0x6690 -#define pidSecureProfileMin PROP_ID_SECURE_MIN -#define pidRenMsgFldMin 0x1080 -#define pidLocalStoreInternalMin 0x6500 // Using a portion of the user-defined non-tranmittable prop for local store -#define pidLocalStoreInternalMax 0x65C0 - -/*------------------------------------------------------------------------ - * - * PROFILE properties - * - * These are used in profiles which contain the Exchange Messaging - * Service. These profiles contain a "global section" used to store - * common data, plus individual sections for the transport provider, - * one store provider for the user, one store provider for the public - * store, and one store provider for each additional mailbox the user - * has delegate access to. - * - *-----------------------------------------------------------------------*/ - -/* GUID of the global section */ - -#define pbGlobalProfileSectionGuid "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A" - -/* Properties in the global section */ - -#define PR_PROFILE_VERSION PROP_TAG(PT_LONG, pidProfileMin + 0x00) -#define PR_PROFILE_CONFIG_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x01) -#define PR_PROFILE_HOME_SERVER PROP_TAG(PT_STRING8, pidProfileMin + 0x02) -#define PR_PROFILE_HOME_SERVER_DN PROP_TAG(PT_STRING8, pidProfileMin + 0x12) -#define PR_PROFILE_HOME_SERVER_ADDRS PROP_TAG(PT_MV_STRING8, pidProfileMin + 0x13) -#define PR_PROFILE_USER PROP_TAG(PT_STRING8, pidProfileMin + 0x03) -#define PR_PROFILE_CONNECT_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x04) -#define PR_PROFILE_TRANSPORT_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x05) -#define PR_PROFILE_UI_STATE PROP_TAG(PT_LONG, pidProfileMin + 0x06) -#define PR_PROFILE_UNRESOLVED_NAME PROP_TAG(PT_STRING8, pidProfileMin + 0x07) -#define PR_PROFILE_UNRESOLVED_SERVER PROP_TAG(PT_STRING8, pidProfileMin + 0x08) -#define PR_PROFILE_BINDING_ORDER PROP_TAG(PT_STRING8, pidProfileMin + 0x09) -#define PR_PROFILE_MAX_RESTRICT PROP_TAG(PT_LONG, pidProfileMin + 0x0D) -#define PR_PROFILE_AB_FILES_PATH PROP_TAG(PT_STRING8, pidProfileMin + 0xE) -#define PR_PROFILE_OFFLINE_STORE_PATH PROP_TAG(PT_STRING8, pidProfileMin + 0x10) -#define PR_PROFILE_OFFLINE_INFO PROP_TAG(PT_BINARY, pidProfileMin + 0x11) -#define PR_PROFILE_ADDR_INFO PROP_TAG(PT_BINARY, pidSpecialMin + 0x17) -#define PR_PROFILE_OPTIONS_DATA PROP_TAG(PT_BINARY, pidSpecialMin + 0x19) -#define PR_PROFILE_SECURE_MAILBOX PROP_TAG(PT_BINARY, pidSecureProfileMin + 0) -#define PR_DISABLE_WINSOCK PROP_TAG(PT_LONG, pidProfileMin + 0x18) -#define PR_PROFILE_AUTH_PACKAGE PROP_TAG(PT_LONG, pidProfileMin + 0x19) // dup tag of PR_USER_ENTRYID -#define PR_PROFILE_RECONNECT_INTERVAL PROP_TAG(PT_LONG, pidProfileMin + 0x1a) // dup tag of PR_USER_NAME -#define PR_PROFILE_SERVER_VERSION PROP_TAG(PT_LONG, pidProfileMin + 0x1b) - -/* SE 233155 - MarkH: EMSABP DCR /* -/* Properties in the abp section - I got these values from AlecDun (Outlook team) */ -#define PR_PROFILE_ABP_ALLOW_RECONNECT PROP_TAG(PT_LONG, pidProfileMin + 0x39) -#define PR_PROFILE_ABP_MTHREAD_TIMEOUT_SECS PROP_TAG(PT_LONG, pidProfileMin + 0x3A) - -/* Properties passed through the Service Entry to the OST */ -#define PR_OST_ENCRYPTION PROP_TAG(PT_LONG, 0x6702) - -/* Values for PR_OST_ENCRYPTION */ -#define OSTF_NO_ENCRYPTION ((DWORD)0x80000000) -#define OSTF_COMPRESSABLE_ENCRYPTION ((DWORD)0x40000000) -#define OSTF_BEST_ENCRYPTION ((DWORD)0x20000000) - -/* Properties in each profile section */ - -#define PR_PROFILE_OPEN_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x09) -#define PR_PROFILE_TYPE PROP_TAG(PT_LONG, pidProfileMin + 0x0A) -#define PR_PROFILE_MAILBOX PROP_TAG(PT_STRING8, pidProfileMin + 0x0B) -#define PR_PROFILE_SERVER PROP_TAG(PT_STRING8, pidProfileMin + 0x0C) -#define PR_PROFILE_SERVER_DN PROP_TAG(PT_STRING8, pidProfileMin + 0x14) - -/* Properties in the Public Folders section */ - -#define PR_PROFILE_FAVFLD_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin + 0x0F) -#define PR_PROFILE_FAVFLD_COMMENT PROP_TAG(PT_STRING8, pidProfileMin + 0x15) -#define PR_PROFILE_ALLPUB_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin + 0x16) -#define PR_PROFILE_ALLPUB_COMMENT PROP_TAG(PT_STRING8, pidProfileMin + 0x17) - -/* Properties for Multiple Offline Address Book support (MOAB) */ - -#define PR_PROFILE_MOAB PROP_TAG(PT_STRING8, pidSpecialMin + 0x0B) -#define PR_PROFILE_MOAB_GUID PROP_TAG(PT_STRING8, pidSpecialMin + 0x0C) -#define PR_PROFILE_MOAB_SEQ PROP_TAG(PT_LONG, pidSpecialMin + 0x0D) - -// Property for setting a list of prop_ids to be excluded -// from the GetProps(NULL) call. -#define PR_GET_PROPS_EXCLUDE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidSpecialMin + 0x0E) - -// Current value for PR_PROFILE_VERSION -#define PROFILE_VERSION ((ULONG)0x501) - -// Bit values for PR_PROFILE_CONFIG_FLAGS - -#define CONFIG_SERVICE ((ULONG)0x00000001) -#define CONFIG_SHOW_STARTUP_UI ((ULONG)0x00000002) -#define CONFIG_SHOW_CONNECT_UI ((ULONG)0x00000004) -#define CONFIG_PROMPT_FOR_CREDENTIALS ((ULONG)0x00000008) -#define CONFIG_NO_AUTO_DETECT ((ULONG)0x00000010) -#define CONFIG_OST_CACHE_ONLY ((ULONG)0x00000020) - -// Bit values for PR_PROFILE_CONNECT_FLAGS - -#define CONNECT_USE_ADMIN_PRIVILEGE ((ULONG)1) -#define CONNECT_NO_RPC_ENCRYPTION ((ULONG)2) -#define CONNECT_USE_SEPARATE_CONNECTION ((ULONG)4) -#define CONNECT_NO_UNDER_COVER_CONNECTION ((ULONG)8) -#define CONNECT_ANONYMOUS_ACCESS ((ULONG)16) -#define CONNECT_NO_NOTIFICATIONS ((ULONG)32) -#define CONNECT_NO_TABLE_NOTIFICATIONS ((ULONG)32) /* BUGBUG: TEMPORARY */ -#define CONNECT_NO_ADDRESS_RESOLUTION ((ULONG)64) -#define CONNECT_RESTORE_DATABASE ((ULONG)128) - -// Bit values for PR_PROFILE_TRANSPORT_FLAGS - -#define TRANSPORT_DOWNLOAD ((ULONG)1) -#define TRANSPORT_UPLOAD ((ULONG)2) - -// Bit values for PR_PROFILE_OPEN_FLAGS - -#define OPENSTORE_USE_ADMIN_PRIVILEGE ((ULONG)0x00000001) -#define OPENSTORE_PUBLIC ((ULONG)0x00000002) -#define OPENSTORE_HOME_LOGON ((ULONG)0x00000004) -#define OPENSTORE_TAKE_OWNERSHIP ((ULONG)0x00000008) -#define OPENSTORE_OVERRIDE_HOME_MDB ((ULONG)0x00000010) -#define OPENSTORE_TRANSPORT ((ULONG)0x00000020) -#define OPENSTORE_REMOTE_TRANSPORT ((ULONG)0x00000040) -#define OPENSTORE_INTERNET_ANONYMOUS ((ULONG)0x00000080) -#define OPENSTORE_ALTERNATE_SERVER ((ULONG)0x00000100) /* reserved for internal use */ -#define OPENSTORE_IGNORE_HOME_MDB ((ULONG)0x00000200) /* reserved for internal use */ -#define OPENSTORE_NO_MAIL ((ULONG)0x00000400) /* reserved for internal use */ -#define OPENSTORE_OVERRIDE_LAST_MODIFIER ((ULONG)0x00000800) -#define OPENSTORE_CALLBACK_LOGON ((ULONG)0x00001000) /* reserved for internal use */ -#define OPENSTORE_LOCAL ((ULONG)0x00002000) -#define OPENSTORE_FAIL_IF_NO_MAILBOX ((ULONG)0x00004000) /* reserved for internal use */ -#define OPENSTORE_CACHE_EXCHANGE ((ULONG)0x00008000) -#define OPENSTORE_CLI_WITH_NAMEDPROP_FIX ((ULONG)0x00010000) /* reserved for internal use */ -#define OPENSTORE_ENABLE_LAZY_LOGGING ((ULONG)0x00020000) /* reserved for internal use */ -#define OPENSTORE_CLI_WITH_REPLID_GUID_MAPPING_FIX ((ULONG)0x00040000) /* reserved for internal use */ -#define OPENSTORE_NO_LOCALIZATION ((ULONG)0x00080000) /* reserved for internal use */ -#define OPENSTORE_RESTORE_DATABASE ((ULONG)0x00100000) -#define OPENSTORE_XFOREST_MOVE ((ULONG)0x00200000) /* reserved for internal use */ - -// Values for PR_PROFILE_TYPE - -#define PROFILE_PRIMARY_USER ((ULONG)1) -#define PROFILE_DELEGATE ((ULONG)2) -#define PROFILE_PUBLIC_STORE ((ULONG)3) -#define PROFILE_SUBSCRIPTION ((ULONG)4) - -/*------------------------------------------------------------------------ - * - * MDB object properties - * - *-----------------------------------------------------------------------*/ - -/* PR_MDB_PROVIDER GUID in stores table */ - -#define pbExchangeProviderPrimaryUserGuid "\x54\x94\xA1\xC0\x29\x7F\x10\x1B\xA5\x87\x08\x00\x2B\x2A\x25\x17" -#define pbExchangeProviderDelegateGuid "\x9e\xb4\x77\x00\x74\xe4\x11\xce\x8c\x5e\x00\xaa\x00\x42\x54\xe2" -#define pbExchangeProviderPublicGuid "\x78\xb2\xfa\x70\xaf\xf7\x11\xcd\x9b\xc8\x00\xaa\x00\x2f\xc4\x5a" -#define pbExchangeProviderXportGuid "\xa9\x06\x40\xe0\xd6\x93\x11\xcd\xaf\x95\x00\xaa\x00\x4a\x35\xc3" -#define pbExchangeProviderLocalStoreGuid "\x2D\xE5\x6B\xA1\x64\x6E\x11\xd2\x8D\x4E\x00\xC0\x4F\xAE\x23\x71" -#define pbExchangeProviderPersistStoreGuid "\x98\xA2\x3D\x67\x62\xCF\x4d\x34\x82\x79\xDB\xFA\x6A\x50\x8B\x31" - -// All properties in this section are readonly - -// Identity of store -// All stores -#define PR_USER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x01) -#define PR_USER_NAME PROP_TAG(PT_STRING8, pidStoreMin + 0x02) - -// All mailbox stores -#define PR_MAILBOX_OWNER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x03) -#define PR_MAILBOX_OWNER_NAME PROP_TAG(PT_STRING8, pidStoreMin + 0x04) -#define PR_OOF_STATE PROP_TAG(PT_BOOLEAN, pidStoreMin + 0x05) - -// Bug#255023 Provide quota information to MAPI clients to avoid large emails from ever reaching the server -#define PR_MAX_SUBMIT_MESSAGE_SIZE PROP_TAG(PT_LONG, 0x666D) -#define PR_PROHIBIT_SEND_QUOTA PROP_TAG(PT_LONG, 0x666E) - -// Public stores -- name of hierarchy server -#define PR_HIERARCHY_SERVER PROP_TAG(PT_TSTRING, pidStoreMin + 0x1B) - -// Entryids of special folders -// All mailbox stores -#define PR_SCHEDULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x06) - -// All mailbox and gateway stores -#define PR_IPM_DAF_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x07) - -// Public store -#define PR_NON_IPM_SUBTREE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x08) -#define PR_EFORMS_REGISTRY_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x09) -#define PR_SPLUS_FREE_BUSY_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0A) -#define PR_OFFLINE_ADDRBOOK_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0B) -#define PR_NNTP_CONTROL_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0x1B) -#define PR_EFORMS_FOR_LOCALE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0C) -#define PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0D) -#define PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0E) -#define PR_NEWSGROUP_ROOT_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0x1C) -#define PR_OFFLINE_MESSAGE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0F) -#define PR_IPM_FAVORITES_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x18) -#define PR_IPM_PUBLIC_FOLDERS_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x19) -#define PR_FAVORITES_DEFAULT_NAME PROP_TAG(PT_STRING8, pidStoreMin + 0x1D) -#define PR_SYS_CONFIG_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x1E) -#define PR_NNTP_ARTICLE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0x1A) -#define PR_EVENTS_ROOT_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0xA) - -// Gateway stores -#define PR_GW_MTSIN_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x10) -#define PR_GW_MTSOUT_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x11) -#define PR_TRANSFER_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreMin + 0x12) - -// This property is preinitialized to 256 bytes of zeros -// GetProp on this property is guaranteed to RPC. May be used -// to determine line speed of connection to server. -#define PR_TEST_LINE_SPEED PROP_TAG(PT_BINARY, pidStoreMin + 0x13) - -// Used with OpenProperty to get interface, also on folders -#define PR_HIERARCHY_SYNCHRONIZER PROP_TAG(PT_OBJECT, pidStoreMin + 0x14) -#define PR_CONTENTS_SYNCHRONIZER PROP_TAG(PT_OBJECT, pidStoreMin + 0x15) -#define PR_COLLECTOR PROP_TAG(PT_OBJECT, pidStoreMin + 0x16) - -// Used with OpenProperty to get interface for folders, messages, attachmentson -#define PR_FAST_TRANSFER PROP_TAG(PT_OBJECT, pidStoreMin + 0x17) - -// Used with OpenProperty to get interface for store object -#define PR_CHANGE_ADVISOR PROP_TAG(PT_OBJECT, pidStoreMin + 0x1C) - -// used to set the ics notification suppression guid -#define PR_CHANGE_NOTIFICATION_GUID PROP_TAG(PT_CLSID, pidStoreMin + 0x1F) - -// This property is available on mailbox and public stores. If it exists -// and its value is TRUE, the store is connected to the offline store provider. -#define PR_STORE_OFFLINE PROP_TAG(PT_BOOLEAN, pidStoreMin + 0x1A) - -// In transit state for store object. This state is -// set when mail is being moved and it pauses mail delivery -// to the mail box -#define PR_IN_TRANSIT PROP_TAG(PT_BOOLEAN, pidStoreMin) - -// Writable only with Admin rights, available on public stores and folders -#define PR_REPLICATION_STYLE PROP_TAG(PT_LONG, pidAdminMin) -#define PR_REPLICATION_SCHEDULE PROP_TAG(PT_BINARY, pidAdminMin + 0x01) -#define PR_REPLICATION_MESSAGE_PRIORITY PROP_TAG(PT_LONG, pidAdminMin + 0x02) - -// Writable only with Admin rights, available on public stores -#define PR_OVERALL_MSG_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x03) -#define PR_REPLICATION_ALWAYS_INTERVAL PROP_TAG(PT_LONG, pidAdminMin + 0x04) -#define PR_REPLICATION_MSG_SIZE PROP_TAG(PT_LONG, pidAdminMin + 0x05) - -// default replication style=always interval (minutes) -#define STYLE_ALWAYS_INTERVAL_DEFAULT (ULONG)15 - -// default replication message size limit (KB) -#define REPLICATION_MESSAGE_SIZE_LIMIT_DEFAULT (ULONG)300 - -// Values for PR_REPLICATION_STYLE -#define STYLE_NEVER (ULONG)0 // never replicate -#define STYLE_NORMAL (ULONG)1 // use 84 byte schedule TIB -#define STYLE_ALWAYS (ULONG)2 // replicate at fastest rate -#define STYLE_DEFAULT (ULONG) - 1 // default value - -/*------------------------------------------------------------------------ - * - * INCREMENTAL CHANGE SYNCHRONIZATION - * folder and message properties - * - *-----------------------------------------------------------------------*/ - -#define PR_SOURCE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x0) -#define PR_PARENT_SOURCE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x1) -#define PR_CHANGE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x2) -#define PR_PREDECESSOR_CHANGE_LIST PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x3) - -// msg-folder only property -// actual FID for a msg-folder row -// ptagFID for message rows -// ptagInstanceID for subfolder rows -#define PR_SOURCE_FID PROP_TAG(PT_I8, pidStoreNonTransMin + 0x1F) - -/*------------------------------------------------------------------------ - * - * FOLDER object properties - * - *-----------------------------------------------------------------------*/ - -// folders table property used by PKM to define the catalog guid for content -// indexing and searching; doubles as index enable/disable -#define PR_CATALOG PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x1B) - -// Is CI searching enabled on this folder? -#define PR_CI_SEARCH_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin + 0x1C) - -// Is notification-based indexing enabled on this folder? -#define PR_CI_NOTIFICATION_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin + 0x1D) - -// Max number of cached view allowed -#define PR_MAX_CACHED_VIEWS PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x28) - -// Max number of indices allowed -// Review : this ptag is used for PR_MIME_HANDLER_CLASSIDS, but because the context -// is different I am reusing it here. -#define PR_MAX_INDICES PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x1E) - -// folders table property containing list of guid/restriction pairs -#define PR_IMPLIED_RESTRICTIONS PROP_TAG(PT_MV_BINARY, pidSpecialMin + 0x0F) - -// Read only, available on all folders -#define PR_FOLDER_CHILD_COUNT PROP_TAG(PT_LONG, pidFolderMin) -#define PR_RIGHTS PROP_TAG(PT_LONG, pidFolderMin + 0x01) -#define PR_ACL_TABLE PROP_TAG(PT_OBJECT, pidExchangeXmitReservedMin) -#define PR_RULES_TABLE PROP_TAG(PT_OBJECT, pidExchangeXmitReservedMin + 0x1) -#define PR_HAS_RULES PROP_TAG(PT_BOOLEAN, pidFolderMin + 0x02) -#define PR_HAS_MODERATOR_RULES PROP_TAG(PT_BOOLEAN, pidFolderMin + 0x07) - -// Read only, available only for public folders -#define PR_ADDRESS_BOOK_ENTRYID PROP_TAG(PT_BINARY, pidFolderMin + 0x03) - -// Writable, available on folders in all stores -#define PR_ACL_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin) -#define PR_RULES_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x1) -#define PR_EXTENDED_ACL_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x1E) -#define PR_FOLDER_DESIGN_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x2) -#define PR_DESIGN_IN_PROGRESS PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x4) -#define PR_SECURE_ORIGINATION PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x5) - -// Writable, available only for public folders -#define PR_PUBLISH_IN_ADDRESS_BOOK PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x6) -#define PR_RESOLVE_METHOD PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x7) -#define PR_ADDRESS_BOOK_DISPLAY_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x8) - -// Writable, used to indicate locale id for eforms registry subfolders -#define PR_EFORMS_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x9) - -// Writable only with Admin rights, available only for public folders -#define PR_REPLICA_LIST PROP_TAG(PT_BINARY, pidAdminMin + 0x8) -#define PR_OVERALL_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x9) - -// Newsgroup related properties. Writable only with Admin rights. -#define PR_IS_NEWSGROUP_ANCHOR PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x06) -#define PR_IS_NEWSGROUP PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x07) -#define PR_NEWSGROUP_COMPONENT PROP_TAG(PT_STRING8, pidAdminMin + 0x15) -#define PR_INTERNET_NEWSGROUP_NAME PROP_TAG(PT_STRING8, pidAdminMin + 0x17) -#define PR_NEWSFEED_INFO PROP_TAG(PT_BINARY, pidAdminMin + 0x16) - -// Newsgroup related property. -#define PR_PREVENT_MSG_CREATE PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x14) - -// IMAP internal date -#define PR_IMAP_INTERNAL_DATE PROP_TAG(PT_SYSTIME, pidExchangeNonXmitReservedMin + 0x15) - -// Virtual properties to refer to Newsfeed DNs. Cannot get/set these on -// any object. Supported currently only in specifying restrictions. -#define PR_INBOUND_NEWSFEED_DN PROP_TAG(PT_STRING8, pidSpecialMin + 0x1D) -#define PR_OUTBOUND_NEWSFEED_DN PROP_TAG(PT_STRING8, pidSpecialMin + 0x1E) - -// Used for controlling content conversion in NNTP -#define PR_INTERNET_CHARSET PROP_TAG(PT_TSTRING, pidAdminMin + 0xA) - -// PR_RESOLVE_METHOD values -#define RESOLVE_METHOD_DEFAULT ((LONG)0) // default handling attach conflicts -#define RESOLVE_METHOD_LAST_WRITER_WINS ((LONG)1) // the last writer will win conflict -#define RESOLVE_METHOD_NO_CONFLICT_NOTIFICATION ((LONG)2) // no conflict notif - -// Read only, available only for public folder favorites -#define PR_PUBLIC_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidFolderMin + 0x04) - -// Read only. changes everytime a subfolder is created or deleted -#define PR_HIERARCHY_CHANGE_NUM PROP_TAG(PT_LONG, pidFolderMin + 0x06) - -// For IFS/OLEDB to set and get user sid in LOGON -#define PR_USER_SID PROP_TAG(PT_BINARY, PROP_ID(ptagSearchState)) // pidInternalNoAccessNonTransMin+0x23) -#define PR_CREATOR_TOKEN PR_USER_SID - -/*------------------------------------------------------------------------ - * - * MESSAGE object properties - * - *-----------------------------------------------------------------------*/ - -// Read only, automatically set on all messages in all stores -#define PR_HAS_NAMED_PROPERTIES PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x0A) - -// Read only but outside the provider specific range for replication thru GDK-GWs -#define PR_CREATOR_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x18) -#define PR_CREATOR_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x19) -#define PR_LAST_MODIFIER_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x1A) -#define PR_LAST_MODIFIER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x1B) -#define PR_REPLY_RECIPIENT_SMTP_PROXIES PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x1C) - -// Read only, appears on messages which have DAM's pointing to them -#define PR_HAS_DAMS PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x0A) -#define PR_RULE_TRIGGER_HISTORY PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x12) -#define PR_MOVE_TO_STORE_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x13) -#define PR_MOVE_TO_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x14) - -// Read only, available only on messages in the public store -#define PR_REPLICA_SERVER PROP_TAG(PT_TSTRING, pidMessageReadOnlyMin + 0x04) -#define PR_REPLICA_VERSION PROP_TAG(PT_I8, pidMessageReadOnlyMin + 0x0B) - -// SID versions of standard messaging properties -#define PR_CREATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x18) -#define PR_LAST_MODIFIER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x19) -#define PR_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x0d) -#define PR_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x0e) -#define PR_ORIGINAL_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x0f) -#define PR_ORIGINAL_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x10) -#define PR_READ_RECEIPT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x11) -#define PR_REPORT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x12) -#define PR_ORIGINATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x13) -#define PR_REPORT_DESTINATION_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x14) -#define PR_ORIGINAL_AUTHOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x15) -#define PR_RECEIVED_BY_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x16) -#define PR_RCVD_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x17) - -#define PR_TRUST_SENDER_NO 0x00000000L -#define PR_TRUST_SENDER_YES 0x00000001L -#define PR_TRUST_SENDER PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x39) - -// XML versions of SID properties -#define PR_CREATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2C) -#define PR_LAST_MODIFIER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2D) -#define PR_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2E) -#define PR_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2F) -#define PR_ORIGINAL_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x30) -#define PR_ORIGINAL_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x31) -#define PR_READ_RECEIPT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x32) -#define PR_REPORT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x33) -#define PR_ORIGINATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x34) -#define PR_REPORT_DESTINATION_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x35) -#define PR_ORIGINAL_AUTHOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x36) -#define PR_RECEIVED_BY_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x37) -#define PR_RCVD_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x38) - -// those two are pseudo-properties on folder. calling OFOLD::EcGetProps(PR_RESERVE_RANGE_OF_IDS) is -// equivalent to calling EcGetLocalRepIdsOp(), calling OFOLD::EcSetProps(PR_MERGE_MIDSET_DELETED) -// is equivalen to calling OFOLD::EcSetLocalRepMidsetDeleted() -#define PR_MERGE_MIDSET_DELETED PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x3a) // 0x0E7A0102 -#define PR_RESERVE_RANGE_OF_IDS PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x3b) // 0x0E7B0102 - -// computed message property (read only) -// 44 byte binary property - used by PKM as globally unique message key -// 22 bytes of global ID for FID -// 22 bytes of global ID for VID -#define PR_FID_VID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x0C) -#define PR_FID_MID PR_FID_VID // NSK : temporary to allow transition - -// message property - read only, xref ID in global ID format - used by PKM -#define PR_ORIGIN_ID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x0D) - -// computed message property used in search folders to determine quality of -// search hit match -// NOTE: ptag.h consumers, see also ptagMsgFolderTemplateRes3 -#define PR_RANK PROP_TAG(PT_LONG, pidAdminMin + 0x82) - -// msg-folder property, read only -// value is PR_MSG_DELIVERY_TIME if it exists, else PR_CREATION_TIME -// used as the default sort time when subfolder rows are returned in views -#define PR_MSG_FOLD_TIME PROP_TAG(PT_SYSTIME, pidMessageReadOnlyMin + 0x14) -#define PR_ICS_CHANGE_KEY PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x15) - -#define PR_DEFERRED_SEND_NUMBER PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xB) -#define PR_DEFERRED_SEND_UNITS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xC) -#define PR_EXPIRY_NUMBER PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xD) -#define PR_EXPIRY_UNITS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xE) - -// Writeable, deferred send time -#define PR_DEFERRED_SEND_TIME PROP_TAG(PT_SYSTIME, pidExchangeXmitReservedMin + 0xF) - -// Writeable, intended for both folders and messages in gateway mailbox -#define PR_GW_ADMIN_OPERATIONS PROP_TAG(PT_LONG, pidMessageWriteableMin) - -// Writeable, used for DMS messages -#define PR_P1_CONTENT PROP_TAG(PT_BINARY, 0x1100) -#define PR_P1_CONTENT_TYPE PROP_TAG(PT_BINARY, 0x1101) - -// Properties on deferred action messages -#define PR_CLIENT_ACTIONS PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x5) -#define PR_DAM_ORIGINAL_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x6) -#define PR_DAM_BACK_PATCHED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x7) - -// Properties on deferred action error messages -#define PR_RULE_ERROR PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x8) -#define PR_RULE_ACTION_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x9) -#define PR_RULE_ACTION_NUMBER PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x10) -#define PR_RULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x11) - -// Mime representation of a message. -// Defined as 3 different types for convenience. Will be stored as file handle -// internally. -#define PR_INTERNET_CONTENT PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x1) -#define PR_INTERNET_CONTENT_HANDLE PROP_TAG(PT_FILE_HANDLE, pidMessageWriteableMin + 0x1) -#define PR_INTERNET_CONTENT_EA PROP_TAG(PT_FILE_EA, pidMessageWriteableMin + 0x1) - -// Dot-stuff state property on message -#define PR_DOTSTUFF_STATE PROP_TAG(PT_LONG, pidUserNonTransmitMin + 0x1) - -// Raw byte count of mime stream, if mime exists. -#define PR_MIME_SIZE PROP_TAG(PT_LONG, 0x6746) -#define PR_MIME_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6746) - -// Raw byte count of ptagInternetContent, whether it is a mime message -// or freedoc using OURL -#define PR_FILE_SIZE PROP_TAG(PT_LONG, 0x6747) -#define PR_FILE_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6747) - -// Sender's editor format -#define PR_MSG_EDITOR_FORMAT PROP_TAG(PT_LONG, 0x5909) - -#define EDITOR_FORMAT_DONTKNOW ((ULONG)0) -#define EDITOR_FORMAT_PLAINTEXT ((ULONG)1) -#define EDITOR_FORMAT_HTML ((ULONG)2) -#define EDITOR_FORMAT_RTF ((ULONG)3) - -#ifdef pidInternalWriteableNonTransMin -#if pidInternalWritableNonTranMin - 0x6740 -#pragma error("pidInternalWritableNonTransMin definition has changed, must change definition of PR_MIME_SIZE") -#endif -#endif - -// State of this inid as far as conversion is concerned. -// Reusing mailbox table property -#define PR_CONVERSION_STATE PROP_TAG(PT_LONG, PROP_ID(ptagAdminNickName)) - -// Property to represent native html content - assumed to be in the internet -// codepage as determined by PR_INTERNET_CPID -// -#define PR_HTML PROP_TAG(PT_BINARY, PROP_ID(PR_BODY_HTML)) - -// computed property used for moderated folder rule -// it's an EntryId whose value is: -// ptagSenderEntryId on delivery -// LOGON::PbUserEntryId() for all other cases (move/copy/post) -#define PR_ACTIVE_USER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x12) - -// Property on conflict notification indicating entryid of conflicting object -#define PR_CONFLICT_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x10) - -// Property on messages to indicate the language client used to create this message -#define PR_MESSAGE_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x11) -#define PR_MESSAGE_CODEPAGE PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x1D) - -// Properties on Quota warning messages to indicate Storage quota and Excess used -#define PR_STORAGE_QUOTA_LIMIT PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x15) -#define PR_EXCESS_STORAGE_USED PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x16) -#define PR_SVR_GENERATING_QUOTA_MSG PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x17) - -// Property affixed by delegation rule and deleted on forwards -#define PR_DELEGATED_BY_RULE PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x3) - -// Message status bit used to indicate message is in conflict -#define MSGSTATUS_IN_CONFLICT ((ULONG)0x800) - -// Message status bit used to indicate the IMAP4 $MDNSent flag -#define MSGSTATUS_MDNSENT ((ULONG)0x4000) - -// used to indicate how much X400 private extension data is present: none, just the -// message level, or both the message and recipient levels -// !!The high order byte of this ULONG is reserved.!! -#define ENV_BLANK ((ULONG)0x00000000) -#define ENV_RECIP_NUM ((ULONG)0x00000001) -#define ENV_MSG_EXT ((ULONG)0x00000002) -#define ENV_RECIP_EXT ((ULONG)0x00000004) - -#define PR_X400_ENVELOPE_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x13) -#define X400_ENV_PLAIN (ENV_BLANK) // no extension -#define X400_ENV_VALID_RECIP (ENV_RECIP_NUM | ENV_MSG_EXT) // just the message level extension -#define X400_ENV_FULL_EXT (ENV_RECIP_NUM | ENV_MSG_EXT | ENV_RECIP_EXT) // both message and recipient levels - -// -// bitmask that indicates whether RN, NRN, DR, NDR, OOF, Auto-Reply should be suppressed -// -#define AUTO_RESPONSE_SUPPRESS_DR ((ULONG)0x00000001) -#define AUTO_RESPONSE_SUPPRESS_NDR ((ULONG)0x00000002) -#define AUTO_RESPONSE_SUPPRESS_RN ((ULONG)0x00000004) -#define AUTO_RESPONSE_SUPPRESS_NRN ((ULONG)0x00000008) -#define AUTO_RESPONSE_SUPPRESS_OOF ((ULONG)0x00000010) -#define AUTO_RESPONSE_SUPPRESS_AUTO_REPLY ((ULONG)0x00000020) - -// raid 91101 - Flag indicates No RFC821 From field -#define AUTO_RESPONSE_SUPPRESS_NORFC821FROM ((ULONG)0x00000040) - -#define PR_AUTO_RESPONSE_SUPPRESS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x01) -#define PR_INTERNET_CPID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x02) - -#define PR_SYNCEVENT_FIRED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x0F) - -/*------------------------------------------------------------------------ - * - * ATTACHMENT object properties - * - *-----------------------------------------------------------------------*/ - -// Appears on attachments to a message marked to be in conflict. Identifies -// those attachments which are conflicting versions of the top level message -#define PR_IN_CONFLICT PROP_TAG(PT_BOOLEAN, pidAttachReadOnlyMin) - -/*------------------------------------------------------------------------ - * - * DUMPSTER properties - * - *-----------------------------------------------------------------------*/ - -// Indicates when a message, folder, or mailbox has been deleted. -// (Read only, non transmittable property). -#define PR_DELETED_ON PROP_TAG(PT_SYSTIME, pidSpecialMin + 0x1F) - -// Read-only folder properties which indicate the number of messages, and child folders -// that have been "soft" deleted in this folder (and the time the first message was deleted). -#define PR_DELETED_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x08) -#define PR_DELETED_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x0B) -#define PR_DELETED_FOLDER_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x09) -#define PR_OLDEST_DELETED_ON PROP_TAG(PT_SYSTIME, pidFolderMin + 0x0A) - -// Total size of all soft deleted messages -#define PR_DELETED_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0xB) - -// Total size of all normal soft deleted messages -#define PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0xC) - -// Total size of all associated soft deleted messages -#define PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0xD) - -// This property controls the retention age limit (minutes) for the Private/Public MDB, -// Mailbox (private only), or Folder (public). -// Note - the Folder/Mailbox retention, if set, overrides the MDB retention. -#define PR_RETENTION_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x34) - -// This property controls if we maintain per user read/unread for a public -// folder. By default (if this property is missing or set to FALSE) we will -// maintain per user read/unread. -#define PR_DISABLE_PERUSER_READ PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x35) - -// This property is set by JET after a full backup has occurred. -// It is used to determine whether or not messages and folders can be "hard" deleted -// before a full backup has captured the last modification to the object. -#define PR_LAST_FULL_BACKUP PROP_TAG(PT_SYSTIME, pidSpecialMin + 0x15) - -/*------------------------------------------------------------------------ - * URL related properties - *-----------------------------------------------------------------------*/ -// This is read only property. -#define PR_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x77) // 0x6707 -#define PR_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x77) -#define PR_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x77) - -// This is a read-write property. -#define PR_URL_COMP_NAME PROP_TAG(PT_TSTRING, pidRenMsgFldMin + 0x73) -#define PR_URL_COMP_NAME_A PROP_TAG(PT_STRING8, pidRenMsgFldMin + 0x73) -#define PR_URL_COMP_NAME_W PROP_TAG(PT_UNICODE, pidRenMsgFldMin + 0x73) - -// this is a read-only property -#define PR_PARENT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x7D) // 0x670d -#define PR_PARENT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x7D) -#define PR_PARENT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x7D) - -// read-only property -#define PR_FLAT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x7E) // 0x670e -#define PR_FLAT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x7E) -#define PR_FLAT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x7E) - -// read-only property -#define PR_SRC_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x7F) // 0x670f -#define PR_SRC_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x7F) -#define PR_SRC_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x7F) - -// Constant wstring to specify URL with fid encoded directly in the URL -// For example, URL L"/~FlatUrlSpace/1-401" will refer to folder with FID 1-401 -// and URL L"/~FlatUrlSpace/1-401/2-8fb" will refer to message with MID 2-8fb -// in that folder. -// But remember that the FID/MID have to be long term, i.e GUID-Globcnt, -// the replid used above is simply to explain the idea simpler. -#define WSZ_URL_FLAT_FOLDER_SPACE L"/-FlatUrlSpace-/" -#define cwchUrlFlatFolderSpace 16 - -// Property that defines whether a folder is secure or not -#define PR_SECURE_IN_SITE PROP_TAG(PT_BOOLEAN, pidAdminMin + 0xE) - -// PR_LOCAL_COMMIT_TIME is maintained on folders and messages. It is the -// FileTime when the object was modified last on the given MDB. It is updated -// any time the object is modified (including replicated in change).This is -// strictly computed, non-transmittable and non-copyable. -#define PR_LOCAL_COMMIT_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x79) - -// PR_LOCAL_COMMIT_TIME_MAX is maintained on folders only. -// It is >= PR_LOCAL_COMMIT_TIME of all messages in the folder. It is updated -// any time any message in the folder is modified. This is strictly computed, -// non-transmittable and non-copyable. -#define PR_LOCAL_COMMIT_TIME_MAX PROP_TAG(PT_SYSTIME, pidAdminMin + 0x7a) - -// PR_DELETED_COUNT_TOTAL is maintained on folders only. -// It is the total number of messages deleted in this folder from the beginning -// of time (well, rather from the time this feature is checked-in, folders from -// old servers that are upgraded will start with 0). If the count overflows the -// 4 bytes, it will start again at 0. This is updated whenever a message in the -// folder is deleted. This is strictly computed, non-transmitabble and -// non-copyable. -#define PR_DELETED_COUNT_TOTAL PROP_TAG(PT_LONG, pidAdminMin + 0x7b) - -// PR_AUTO_RESET is maintained on messages only. It's PT_MV_CLSID and is deleted -// (by the store) anytime a message is saved, if it has not been -// explicitly set on the message between the time it was opened and saved -// (by the user/app that opened and later saved the message). -// It is intended to be used by async callback agents. -#define PR_AUTO_RESET PROP_TAG(PT_MV_CLSID, pidAdminMin + 0x7c) - -/*------------------------------------------------------------------------ - * - * TABLE object properties - * - * Id Range: 0x662F-0x662F - * - *-----------------------------------------------------------------------*/ - -// This property can be used in a contents table to get PR_ENTRYID returned -// as a long term entryid instead of a short term entryid. -#define PR_LONGTERM_ENTRYID_FROM_TABLE PROP_TAG(PT_BINARY, pidSpecialMin) - -// This is read only property that is used for contents tables that include -// subfolder entries. -#define PR_SUBFOLDER PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x78) - -/*------------------------------------------------------------------------ - * - * Gateway "MTE" ENVELOPE properties - * - * Id Range: 0x66E0-0x66FF - * - *-----------------------------------------------------------------------*/ - -#define PR_ORIGINATOR_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0x3) -#define PR_ORIGINATOR_ADDR PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0x4) -#define PR_ORIGINATOR_ADDRTYPE PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0x5) -#define PR_ORIGINATOR_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x6) -#define PR_ARRIVAL_TIME PROP_TAG(PT_SYSTIME, pidMessageWriteableMin + 0x7) -#define PR_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x8) -#define PR_INTERNAL_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x12) -#define PR_SUBJECT_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x9) -#define PR_RECIPIENT_NUMBER PROP_TAG(PT_LONG, pidMessageWriteableMin + 0xA) -#define PR_MTS_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xB) -#define PR_REPORT_DESTINATION_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0xC) -#define PR_REPORT_DESTINATION_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xD) -#define PR_CONTENT_SEARCH_KEY PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xE) -#define PR_FOREIGN_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xF) -#define PR_FOREIGN_REPORT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x10) -#define PR_FOREIGN_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x11) -#define PR_PROMOTE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x13) -#define PR_MTS_ID PR_MESSAGE_SUBMISSION_ID -#define PR_MTS_REPORT_ID PR_MESSAGE_SUBMISSION_ID - -/*------------------------------------------------------------------------ - * - * Trace properties format - * PR_TRACE_INFO - * PR_INTERNAL_TRACE_INFO - * - *-----------------------------------------------------------------------*/ - -#define MAX_ADMD_NAME_SIZ 17 -#define MAX_PRMD_NAME_SIZ 17 -#define MAX_COUNTRY_NAME_SIZ 4 -#define MAX_MTA_NAME_SIZ 33 - -#define ADMN_PAD 3 -#define PRMD_PAD 3 -#define COUNTRY_PAD 0 -#define MTA_PAD 3 -#define PRMD_PAD_FOR_ACTIONS 2 -#define MTA_PAD_FOR_ACTIONS 2 - -typedef struct { - LONG lAction; // The routing action the tracing site - // took.(1984 actions only) - FILETIME ftArrivalTime; // The time at which the communique - // entered the tracing site. - FILETIME ftDeferredTime; // The time are which the tracing site - // released the message. - char rgchADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // ADMD - char rgchCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Country - char rgchPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD]; // PRMD - char rgchAttADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // Attempted ADMD - char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Attempted Country - char rgchAttPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD_FOR_ACTIONS]; // Attempted PRMD - BYTE bAdditionalActions; // 1998 additional actions -} TRACEENTRY, FAR *LPTRACEENTRY; - -typedef struct { - ULONG cEntries; // Number of trace entries - TRACEENTRY rgtraceentry[MAPI_DIM]; // array of trace entries -} TRACEINFO, FAR *LPTRACEINFO; - -typedef struct { - LONG lAction; // The 1984 routing action the tracing domain took. - FILETIME ftArrivalTime; // The time at which the communique entered the tracing domain. - FILETIME ftDeferredTime; // The time are which the tracing domain released the message. - char rgchADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // ADMD - char rgchCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Country - char rgchPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD]; // PRMD - char rgchAttADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // Attempted ADMD - char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Attempted Country - char rgchAttPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD]; // Attempted PRMD - char rgchMTAName[MAX_MTA_NAME_SIZ + MTA_PAD]; // MTA Name - char rgchAttMTAName[MAX_MTA_NAME_SIZ + MTA_PAD_FOR_ACTIONS]; // Attempted MTA Name - BYTE bAdditionalActions; // 1988 additional actions -} INTTRACEENTRY, *PINTTRACEENTRY; - -typedef struct { - ULONG cEntries; // Number of trace entries - INTTRACEENTRY rgIntTraceEntry[MAPI_DIM]; // array of internal trace entries -} INTTRACEINFO, *PINTTRACEINFO; - -/*------------------------------------------------------------------------ - * - * "IExchangeModifyTable" Interface Declaration - * - * Used for get/set rules and access control on folders. - * - *-----------------------------------------------------------------------*/ - -/* ulRowFlags */ -#define ROWLIST_REPLACE ((ULONG)1) - -#define ROW_ADD ((ULONG)1) -#define ROW_MODIFY ((ULONG)2) -#define ROW_REMOVE ((ULONG)4) -#define ROW_EMPTY (ROW_ADD | ROW_REMOVE) - -typedef struct _ROWENTRY { - ULONG ulRowFlags; - ULONG cValues; - LPSPropValue rgPropVals; -} ROWENTRY, FAR *LPROWENTRY; - -typedef struct _ROWLIST { - ULONG cEntries; - ROWENTRY aEntries[MAPI_DIM]; -} ROWLIST, FAR *LPROWLIST; - -#define EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetTable) \ - (THIS_ ULONG ulFlags, LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(ModifyTable) \ - (THIS_ ULONG ulFlags, LPROWLIST lpMods) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeModifyTable -DECLARE_MAPI_INTERFACE_(IExchangeModifyTable, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeModifyTable, LPEXCHANGEMODIFYTABLE); - -/* Special flag bit for GetContentsTable, GetHierarchyTable and - OpenEntry. - Supported by > 5.x servers - If set in GetContentsTable and GetHierarchyTable - we will show only items that are soft deleted, i.e deleted - by user but not yet purged from the system. If set in OpenEntry - we will open this item even if it is soft deleted */ -/* Flag bits must not collide by existing definitions in Mapi */ -/****** MAPI_UNICODE ((ULONG) 0x80000000) above */ -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ -/****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */ -/****** CONVENIENT_DEPTH ((ULONG) 0x00000001) */ -#define SHOW_SOFT_DELETES ((ULONG)0x00000002) -#define SHOW_SUBFOLDERS ((ULONG)0x00000004) - -// reserved flag bit(s) - do not set -#define MAPI_RESERVED1 ((ULONG)0x00010000) - -// Do not block this OpenMessage (MAPI's OpenEntry) -#define MDB_OPEN_MSG_NO_BLOCK ((ULONG)0x00000020) - -// Unlock a MID at SaveChanges -/****** KEEP_OPEN_READONLY ((ULONG) 0x00000001) */ -/****** KEEP_OPEN_READWRITE ((ULONG) 0x00000002) */ -/****** FORCE_SAVE ((ULONG) 0x00000004) */ -/****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) */ -#define MDB_SAVE_MSG_UNLOCK ((ULONG)0x00000040) - -/* Special flag bit for DeleteFolder - Supported by > 5.x servers - If set the server will hard delete the folder (i.e it will not be - retained for later recovery) */ -/* Flag bits must not collide by existing definitions in Mapi */ -/* DeleteFolder */ -/***** #define DEL_MESSAGES ((ULONG) 0x00000001) */ -/***** #define FOLDER_DIALOG ((ULONG) 0x00000002) */ -/***** #define DEL_FOLDERS ((ULONG) 0x00000004) */ -/* EmptyFolder */ -/***** #define DEL_ASSOCIATED ((ULONG) 0x00000008) */ - -#define DELETE_HARD_DELETE ((ULONG)0x00000010) - -/* Access Control Specifics */ - -// Properties -#define PR_MEMBER_ID PROP_TAG(PT_I8, pidSpecialMin + 0x01) -#define PR_MEMBER_NAME PROP_TAG(PT_TSTRING, pidSpecialMin + 0x02) -#define PR_MEMBER_ENTRYID PR_ENTRYID -#define PR_MEMBER_RIGHTS PROP_TAG(PT_LONG, pidSpecialMin + 0x03) - -// Security bits -typedef DWORD RIGHTS; -#define frightsReadAny 0x0000001L -#define frightsCreate 0x0000002L -#define frightsEditOwned 0x0000008L -#define frightsDeleteOwned 0x0000010L -#define frightsEditAny 0x0000020L -#define frightsDeleteAny 0x0000040L -#define frightsCreateSubfolder 0x0000080L -#define frightsOwner 0x0000100L -#define frightsContact 0x0000200L // NOTE: not part of rightsAll -#define frightsVisible 0x0000400L -#define rightsNone 0x00000000 -#define rightsReadOnly frightsReadAny -#define rightsReadWrite (frightsReadAny | frightsEditAny) -#define rightsAll 0x00005FBL - -// -// Mailbox specific access rights. -// - -// -// Note that the sdpermUser rights do NOT exist in any security descriptor, they -// are maintained on the mailbox object in the store, and initialized from the -// user object in the DS. -// -#define fsdpermUserDeleteMailbox DELETE -#define fsdpermUserMailboxOwner 0x00000001 -#define fsdpermUserSendAs 0x00000002 -#define fsdpermUserPrimaryUser 0x00000004 - -#define sdpermUserGenericRead (STANDARD_RIGHTS_READ) - -// generic execute -#define sdpermUserGenericExecute (STANDARD_RIGHTS_EXECUTE) -// generic write -#define sdpermUserGenericWrite (STANDARD_RIGHTS_WRITE | fsdpermUserDeleteMailbox) - -// generic all -#define sdpermUserGenericAll \ - (STANDARD_RIGHTS_ALL | fsdpermUserMailboxOwner | fsdpermUserSendAs | fsdpermUserPrimaryUser) - -// -// Message specific rights. -// -typedef DWORD SDRIGHTS; - -#define fsdrightReadBody 0x00000001 //** ONLY ON MESSAGES, SAME AS FILE_READ_DATA -#define fsdrightListContents 0x00000001 //** ONLY ON FOLDERS, SAME AS FILE_LIST_DATA - IGNORED -#define fsdrightWriteBody 0x00000002 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA -#define fsdrightCreateItem 0x00000002 //** ONLY ON FOLDERs, SAME AS FILE_ADD_FILE - -#define fsdrightAppendMsg 0x00000004 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA. ENFORCED BY IFS. -#define fsdrightCreateContainer 0x00000004 //** ONLY ON FOLDERS, SAME AS FILE_ADD_FILE - -#define fsdrightReadProperty 0x00000008 //** SAME AS FILE_READ_EA -#define fsdrightWriteProperty 0x00000010 //** SAME AS FILE_WRITE_EA - -#define fsdrightExecute 0x00000020 // Same as FILE_EXECUTE/FILE_TRAVERSE. ENFORCED BY IFS -#define fsdrightReserved1 0x00000040 // Same as FILE_DELETE_CHILD.. Currently unused -#define fsdrightReadAttributes 0x00000080 // Same as FILE_READ_ATTRIBUTES. Currently unused -#define fsdrightWriteAttributes 0x00000100 // Same as FILE_WRITE_ATTRIBUTES. Currently unused - -#define fsdrightWriteOwnProperty 0x00000200 //** ONLY ON MESSAGES -#define fsdrightDeleteOwnItem 0x00000400 //** ONLY ON MESSAGES -#define fsdrightViewItem 0x00000800 -#define fsdrightOwner 0x00004000 //** ONLY ON FOLDERS -#define fsdrightContact 0x00008000 //** ONLY ON FOLDERS - -// -// Standard NT rights. -// -#define fsdrightWriteSD WRITE_DAC -#define fsdrightDelete DELETE -#define fsdrightWriteOwner WRITE_OWNER -#define fsdrightReadControl READ_CONTROL -#define fsdrightSynchronize SYNCHRONIZE - -#define sdrightsNone 0x00000000 -#define sdrightsBestAccess MAXIMUM_ALLOWED -#define sdrightsReadOnly GENERIC_READ -#define sdrightsReadWrite GENERIC_READ | GENERIC_WRITE - -#define sdrightsGenericRead \ - (fsdrightReadControl | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | fsdrightViewItem | \ - fsdrightSynchronize) -#define sdrightsGenericWrite \ - (fsdrightReadControl | fsdrightWriteBody | fsdrightWriteAttributes | fsdrightWriteProperty | fsdrightAppendMsg | \ - fsdrightCreateItem | fsdrightDelete | fsdrightCreateContainer | fsdrightOwner | fsdrightSynchronize | \ - fsdrightWriteSD | fsdrightWriteOwner) - -#define sdrightsGenericExecute \ - (fsdrightReadControl | fsdrightReadAttributes | fsdrightExecute | fsdrightViewItem | fsdrightSynchronize) - -#define sdrightsGenericAll \ - (fsdrightDelete | fsdrightReadProperty | fsdrightWriteProperty | fsdrightCreateItem | fsdrightCreateContainer | \ - fsdrightReadControl | fsdrightWriteSD | fsdrightWriteOwner | fsdrightReadControl | fsdrightViewItem | \ - fsdrightOwner | fsdrightWriteOwnProperty | fsdrightDeleteOwnItem | fsdrightSynchronize | fsdrightExecute | \ - fsdrightReserved1 | fsdrightReadAttributes | fsdrightWriteAttributes | fsdrightReadBody | fsdrightWriteBody | \ - fsdrightSynchronize | fsdrightContact) - -// -// SDRights that together make up rightsOwner. -// -#define sdrightsFolderOwner \ - (fsdrightWriteProperty | fsdrightOwner | fsdrightWriteSD | fsdrightDelete | fsdrightWriteOwner | \ - fsdrightWriteAttributes) - -// -// Rights that are valid on folders. -// -#define sdrightsFolders \ - (fsdrightDelete | fsdrightReadProperty | fsdrightReadAttributes | fsdrightWriteProperty | \ - fsdrightWriteAttributes | fsdrightWriteOwner | fsdrightReadControl | fsdrightWriteSD | fsdrightExecute | \ - fsdrightCreateContainer | fsdrightViewItem | fsdrightOwner | fsdrightContact | fsdrightCreateItem | \ - fsdrightSynchronize | fsdrightListContents | fsdrightReserved1) - -// -// Rights that are valid on messages. -// -// -// NB: fsdrightWriteOwnProperty/fsdrightDeleteOwnItem are NOT in this list. -// -#define sdrightsItems \ - (fsdrightDelete | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | fsdrightWriteProperty | \ - fsdrightWriteBody | fsdrightWriteAttributes | fsdrightReadControl | fsdrightWriteOwner | fsdrightWriteSD | \ - fsdrightViewItem | fsdrightWriteOwnProperty | fsdrightDeleteOwnItem | fsdrightSynchronize | fsdrightExecute | \ - fsdrightAppendMsg) - -// -// These access rights are ignored in the determination of a canonical ACL. Since the exchange store ignores -// these rights, their presence or absense doesn't make an ACL canonical. -// - -#define sdrightsIgnored (fsdrightExecute | fsdrightAppendMsg | fsdrightContact | fsdrightReserved1) - -// -// Backwards Compatible rights definitions. -// -#define msgrightsGenericRead (sdrightsGenericRead & sdrightsItems) -#define msgrightsGenericWrite (sdrightsGenericWrite & sdrightsItems) -#define msgrightsGenericExecute (sdrightsGenericExecute & sdrightsItems) -#define msgrightsGenericAll (sdrightsGenericAll & sdrightsItems) - -#define fldrightsGenericRead (sdrightsGenericRead & sdrightsFolders) -#define fldrightsGenericWrite (sdrightsGenericWrite & sdrightsFolders) -#define fldrightsGenericExecute (sdrightsGenericExecute & sdrightsFolders) -#define fldrightsGenericAll (sdrightsGenericAll & sdrightsFolders) - -// -// If set in the RM control field of an NTSD, allows -// an administrator to explicitly set the SD on an object. -// -#define EXCHANGE_RM_SET_EXPLICIT_SD 0x01 - -// -// Retrieve the property ID from the guid - -#define GUID_PROP_ID(pguid) ((pguid)->Data1 & 0xffff) -#define GUID_SUB_PROP_ID(pguid) ((pguid)->Data1 >> 16 & 0xffff) - -#define SET_GUID_PROP_ID(pguid, ptag) (pguid)->Data1 = PROP_ID(ptag) -#define SET_GUID_SUB_PROP_ID(pguid, ptag, subptag) (pguid)->Data1 = (PROP_ID(ptag) | PROP_ID(subptag) << 16) - -#define PROPERTY_GUID(ptag) \ - { \ - PROP_ID(ptag), 0x6585, 0x11d3, { 0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30 } \ - } - -#define SUB_PROPERTY_GUID(ptag, subptag) \ - { \ - PROP_ID(subptag) << 16 | PROP_ID(ptag), 0x6585, 0x11d3, { 0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30 } \ - } - -// -// Transfer version for PR_NT_SECURITY_DESCRIPTOR. -// -// When retrieving the security descriptor for an object, the SD returned is -// actually composed of the following structure: -// -// 2 BYTES Padding data length (including version) -// 2 BYTES Version -// 4 BYTES Security Information (for SetPrivateObjectSecurity) -// <0 or more> -// 2 BYTES Property Tag -// 16 BYTES Named Property GUID -// 1 BYTE Named property "kind" -// if (kind == MNID_ID) -// 4 BYTES Named property ID -// else -// -// Actual Security Descriptor -// -// To determine the security descriptor from PR_NT_SECURITY_DESCRIPTOR, -// use the SECURITY_DESCRIPTOR_OF macro. -// -// To determine the version of the security descriptor, use the SECURITY_DESCRIPTOR_VERSION macro. -// -// -// Please note that OLEDB/DAV reserves the even numbers of the transfer version, so it must ALWAYS be an odd number. -// -#define SECURITY_DESCRIPTOR_TRANSFER_VERSION 0x0003 - -#define SECURITY_DESCRIPTOR_OF(pb) (((BYTE *)(pb)) + *((WORD *)(pb))) -#define SECURITY_DESCRIPTOR_VERSION(pb) (*((WORD *)((pb) + sizeof(WORD)))) -#define SECURITY_INFORMATION_OF(pb) (*((DWORD *)((pb) + sizeof(WORD) + sizeof(WORD)))) -#define CbSecurityDescriptorHeader(pb) (*((WORD *)(pb))) - -// -// To check to see if the security descriptor version matches the currently compiled -// version. -// -#define FCheckSecurityDescriptorVersion(pb) (SECURITY_DESCRIPTOR_VERSION(pb) == SECURITY_DESCRIPTOR_TRANSFER_VERSION) - -// -// Role scopes -// -typedef BYTE ROLESCOPE; -#define ROLESCOPE_OBJECT 0x00 // Roles will be read from the object (folder or item) itself -#define ROLESCOPE_FOLDER 0x01 // Roles will be read from the folder itself, or the containing folder if it is an item -#define ROLESCOPE_MAX ROLESCOPE_FOLDER - -// -// Security authority used for role sids -// -#define SECURITY_EXCHANGE_AUTHORITY {0, 0, 0, 0, 0, 8} - -// -// Application role properties -// -#define PR_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY, 0x3d25) -#define PR_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING, 0x3d25) -#define PR_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY, 0x3d26) -#define PR_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING, 0x3d26) -#define PR_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY, 0x3d27) -#define PR_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING, 0x3d27) -#define PR_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY, 0x3d28) -#define PR_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING, 0x3d28) -#define PR_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY, 0x3d29) -#define PR_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING, 0x3d29) -#define PR_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY, 0x3d2A) -#define PR_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING, 0x3d2A) -#define PR_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY, 0x3d2B) -#define PR_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING, 0x3d2B) -#define PR_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY, 0x3d2C) -#define PR_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING, 0x3d2C) -#define PR_NON_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY, 0x0E7C) -#define PR_NON_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING, 0x0E7C) -#define PR_NON_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY, 0x0E7D) -#define PR_NON_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING, 0x0E7D) -#define PR_NON_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY, 0x0E7E) -#define PR_NON_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING, 0x0E7E) -#define PR_NON_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY, 0x0E7F) -#define PR_NON_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING, 0x0E7F) -#define PR_NON_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY, 0x0E80) -#define PR_NON_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING, 0x0E80) -#define PR_NON_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY, 0x0E81) -#define PR_NON_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING, 0x0E81) -#define PR_NON_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY, 0x0E82) -#define PR_NON_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING, 0x0E82) -#define PR_NON_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY, 0x0E83) -#define PR_NON_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING, 0x0E83) - -/* Rules specifics */ - -// Property types -#define PT_SRESTRICTION ((ULONG)0x00FD) -#define PT_ACTIONS ((ULONG)0x00FE) - -/*----------------------------------------------------------------------- - * PT_FILE_HANDLE: real data is in file specified by handle. - * prop.Value.l has file handle - * PT_FILE_EA: real data is in file specified by extended attribute - * prop.Value.bin has binary EA data - * PT_VIRTUAL: real data is computed on the fly. - * prop.Value.bin has raw binary virtual property blob that has - * information to do conversion. This is internal to the store and - * is not supported for outside calls. - *-----------------------------------------------------------------------*/ - -#define PT_FILE_HANDLE ((ULONG)0x0103) -#define PT_FILE_EA ((ULONG)0x0104) -#define PT_VIRTUAL ((ULONG)0x0105) - -#define FVirtualProp(ptag) (PROP_TYPE(ptag) == PT_VIRTUAL) -#define FFileHandleProp(ptag) (PROP_TYPE(ptag) == PT_FILE_HANDLE || PROP_TYPE(ptag) == PT_FILE_EA) - -// Properties in rule table -#define PR_RULE_ID PROP_TAG(PT_I8, pidSpecialMin + 0x04) -#define PR_RULE_IDS PROP_TAG(PT_BINARY, pidSpecialMin + 0x05) -#define PR_RULE_SEQUENCE PROP_TAG(PT_LONG, pidSpecialMin + 0x06) -#define PR_RULE_STATE PROP_TAG(PT_LONG, pidSpecialMin + 0x07) -#define PR_RULE_USER_FLAGS PROP_TAG(PT_LONG, pidSpecialMin + 0x08) -#define PR_RULE_CONDITION PROP_TAG(PT_SRESTRICTION, pidSpecialMin + 0x09) -#define PR_RULE_ACTIONS PROP_TAG(PT_ACTIONS, pidSpecialMin + 0x10) -#define PR_RULE_PROVIDER PROP_TAG(PT_STRING8, pidSpecialMin + 0x11) -#define PR_RULE_NAME PROP_TAG(PT_TSTRING, pidSpecialMin + 0x12) -#define PR_RULE_LEVEL PROP_TAG(PT_LONG, pidSpecialMin + 0x13) -#define PR_RULE_PROVIDER_DATA PROP_TAG(PT_BINARY, pidSpecialMin + 0x14) - -#define PR_EXTENDED_RULE_ACTIONS PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x59) -#define PR_EXTENDED_RULE_CONDITION PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x5a) -#define PR_EXTENDED_RULE_SIZE_LIMIT PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x5b) - -// moved to ptag.h (scottno) - still needed for 2.27 upgrader -// #define PR_RULE_VERSION PROP_TAG( PT_I2, pidSpecialMin+0x1D) - -// PR_STATE property values -#define ST_DISABLED 0x0000 -#define ST_ENABLED 0x0001 -#define ST_ERROR 0x0002 -#define ST_ONLY_WHEN_OOF 0x0004 -#define ST_KEEP_OOF_HIST 0x0008 -#define ST_EXIT_LEVEL 0x0010 -#define ST_SKIP_IF_SCL_IS_SAFE 0x0020 -#define ST_RULE_PARSE_ERROR 0x0040 -#define ST_CLEAR_OOF_HIST 0x80000000 - -// Empty restriction -#define NULL_RESTRICTION 0xff - -// special RELOP for Member of DL -#define RELOP_MEMBER_OF_DL 100 - -// Action types -typedef enum { - OP_MOVE = 1, - OP_COPY, - OP_REPLY, - OP_OOF_REPLY, - OP_DEFER_ACTION, - OP_BOUNCE, - OP_FORWARD, - OP_DELEGATE, - OP_TAG, - OP_DELETE, - OP_MARK_AS_READ, - -} ACTTYPE; - -// provider name for moderator rules -#define szProviderModeratorRule "MSFT:MR" -#define wszProviderModeratorRule L"MSFT:MR" - -// action flavors - -// for OP_REPLY -#define DO_NOT_SEND_TO_ORIGINATOR 1 -#define STOCK_REPLY_TEMPLATE 2 - -// for OP_FORWARD -#define FWD_PRESERVE_SENDER 1 -#define FWD_DO_NOT_MUNGE_MSG 2 -#define FWD_AS_ATTACHMENT 4 - -// scBounceCode values -#define BOUNCE_MESSAGE_SIZE_TOO_LARGE (SCODE) MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD -#define BOUNCE_FORMS_MISMATCH (SCODE) MAPI_DIAG_RENDITION_UNSUPPORTED -#define BOUNCE_ACCESS_DENIED (SCODE) MAPI_DIAG_MAIL_REFUSED - -// Message class prefix for Reply and OOF Reply templates -#define szReplyTemplateMsgClassPrefix "IPM.Note.Rules.ReplyTemplate." -#define szOofTemplateMsgClassPrefix "IPM.Note.Rules.OofTemplate." - -// Action structure -typedef struct _action { - ACTTYPE acttype; - - // to indicate which flavor of the action. - ULONG ulActionFlavor; - - // Action restriction - // currently unused and must be set to NULL - LPSRestriction lpRes; - - // currently unused and must be set to NULL. - LPSPropTagArray lpPropTagArray; - - // User defined flags - ULONG ulFlags; - - // padding to align the union on 8 byte boundary - ULONG dwAlignPad; - - union { - // used for OP_MOVE and OP_COPY actions - struct { - ULONG cbStoreEntryId; - LPENTRYID lpStoreEntryId; - ULONG cbFldEntryId; - LPENTRYID lpFldEntryId; - } actMoveCopy; - - // used for OP_REPLY and OP_OOF_REPLY actions - struct { - ULONG cbEntryId; - LPENTRYID lpEntryId; - GUID guidReplyTemplate; - } actReply; - - // used for OP_DEFER_ACTION action - struct { - ULONG cbData; - BYTE *pbData; - } actDeferAction; - - // Error code to set for OP_BOUNCE action - SCODE scBounceCode; - - // list of address for OP_FORWARD and OP_DELEGATE action - LPADRLIST lpadrlist; - - // prop value for OP_TAG action - SPropValue propTag; - }; -} ACTION, FAR *LPACTION; - -// Rules version -#define EDK_RULES_VERSION 1 - -// Array of actions -typedef struct _actions { - ULONG ulVersion; // use the #define above - UINT cActions; - LPACTION lpAction; -} ACTIONS; - -#ifdef __cplusplus -extern "C" { -#endif -HRESULT WINAPI HrSerializeSRestriction(IMAPIProp *pprop, LPSRestriction prest, BYTE **ppbRest, ULONG *pcbRest); - -HRESULT WINAPI HrDeserializeSRestriction(IMAPIProp *pprop, BYTE *pbRest, ULONG cbRest, LPSRestriction *pprest); - -HRESULT WINAPI HrSerializeActions(IMAPIProp *pprop, ACTIONS *pActions, BYTE **ppbActions, ULONG *pcbActions); - -HRESULT WINAPI HrDeserializeActions(IMAPIProp *pprop, BYTE *pbActions, ULONG cbActions, ACTIONS **ppActions); -#ifdef __cplusplus -} // extern "C" -#endif - -// message class definitions for Deferred Action and Deffered Error messages -#define szDamMsgClass "IPC.Microsoft Exchange 4.0.Deferred Action" -#define szDemMsgClass "IPC.Microsoft Exchange 4.0.Deferred Error" - -#define szExRuleMsgClass "IPM.ExtendedRule.Message" -#define wszExRuleMsgClass L"IPM.ExtendedRule.Message" - -/* - * Rule error codes - * Values for PR_RULE_ERROR - */ -#define RULE_ERR_UNKNOWN 1 // general catchall error -#define RULE_ERR_LOAD 2 // unable to load folder rules -#define RULE_ERR_DELIVERY 3 // unable to deliver message temporarily -#define RULE_ERR_PARSING 4 // error while parsing -#define RULE_ERR_CREATE_DAE 5 // error creating DAE message -#define RULE_ERR_NO_FOLDER 6 // folder to move/copy doesn't exist -#define RULE_ERR_NO_RIGHTS 7 // no rights to move/copy into folder -#define RULE_ERR_CREATE_DAM 8 // error creating DAM -#define RULE_ERR_NO_SENDAS 9 // can not send as another user -#define RULE_ERR_NO_TEMPLATE 10 // reply template is missing -#define RULE_ERR_EXECUTION 11 // error in rule execution -#define RULE_ERR_QUOTA_EXCEEDED 12 // mailbox quota size exceeded -#define RULE_ERR_TOO_MANY_RECIPS 13 // number of recips exceded upper limit - -#define RULE_ERR_FIRST RULE_ERR_UNKNOWN -#define RULE_ERR_LAST RULE_ERR_TOO_MANY_RECIPS - -/*------------------------------------------------------------------------ - * - * "IExchangeRuleAction" Interface Declaration - * - * Used for get actions from a Deferred Action Message. - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGERULEACTION_METHODS(IPURE) \ - MAPIMETHOD(ActionCount) \ - (THIS_ ULONG FAR * lpcActions) IPURE; \ - MAPIMETHOD(GetAction) \ - (THIS_ ULONG ulActionNumber, LARGE_INTEGER * lpruleid, LPACTION FAR * lppAction) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeRuleAction -DECLARE_MAPI_INTERFACE_(IExchangeRuleAction, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGERULEACTION_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeRuleAction, LPEXCHANGERULEACTION); - -/*------------------------------------------------------------------------ - * - * "IExchangeManageStore" Interface Declaration - * - * Used for store management functions. - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(IPURE) \ - MAPIMETHOD(CreateStoreEntryID) \ - (THIS_ LPSTR lpszMsgStoreDN, LPSTR lpszMailboxDN, ULONG ulFlags, ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(EntryIDFromSourceKey) \ - (THIS_ ULONG cFolderKeySize, BYTE FAR * lpFolderSourceKey, ULONG cMessageKeySize, BYTE FAR * lpMessageSourceKey, \ - ULONG FAR * lpcbEntryID, LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(GetRights) \ - (THIS_ ULONG cbUserEntryID, LPENTRYID lpUserEntryID, ULONG cbEntryID, LPENTRYID lpEntryID, ULONG FAR * lpulRights) \ - IPURE; \ - MAPIMETHOD(GetMailboxTable) \ - (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetPublicFolderTable) \ - (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore -DECLARE_MAPI_INTERFACE_(IExchangeManageStore, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore, LPEXCHANGEMANAGESTORE); - -/*------------------------------------------------------------------------ - * - * "IExchangeManageStore2" Interface Declaration - * - * Used for store management functions. - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(IPURE) \ - MAPIMETHOD(CreateNewsgroupNameEntryID) \ - (THIS_ LPSTR lpszNewsgroupName, ULONG FAR * lpcbEntryID, LPENTRYID FAR * lppEntryID) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore2 -DECLARE_MAPI_INTERFACE_(IExchangeManageStore2, IUnknown){MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore2, LPEXCHANGEMANAGESTORE2); - -/*------------------------------------------------------------------------ - * - * "IExchangeManageStore3" Interface Declaration - * - * Used for store management functions. - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(IPURE) \ - MAPIMETHOD(GetMailboxTableOffset) \ - (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags, UINT uOffset) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore3 -DECLARE_MAPI_INTERFACE_(IExchangeManageStore3, IUnknown){ - MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore3, LPEXCHANGEMANAGESTORE3); - -/*------------------------------------------------------------------------ - * - * "IExchangeManageStore4" Interface Declaration - * - * Used for store management functions. - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(IPURE) \ - MAPIMETHOD(GetPublicFolderTableOffset) \ - (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags, UINT uOffset) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore4 -DECLARE_MAPI_INTERFACE_(IExchangeManageStore4, IUnknown){ - MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore4, LPEXCHANGEMANAGESTORE4); - -/*------------------------------------------------------------------------ - * - * "IExchangeNntpNewsfeed" Interface Declaration - * - * Used for Nntp pull newsfeed. - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(IPURE) \ - MAPIMETHOD(Configure) \ - (THIS_ LPSTR lpszNewsfeedDN, ULONG cValues, LPSPropValue lpIMailPropArray) IPURE; \ - MAPIMETHOD(CheckMsgIds) \ - (THIS_ LPSTR lpszMsgIds, ULONG FAR * lpcfWanted, BYTE FAR * *lppfWanted) IPURE; \ - MAPIMETHOD(OpenArticleStream) \ - (THIS_ LPSTREAM FAR * lppStream) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeNntpNewsfeed -DECLARE_MAPI_INTERFACE_(IExchangeNntpNewsfeed, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeNntpNewsfeed, LPEXCHANGENNTPNEWSFEED); - -// Properties for GetMailboxTable -#define PR_NT_USER_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x10) -// -// PR_LOCALE_ID definition has been moved down and combined with other -// locale-specific properties. It is still being returned through the -// mailbox table. -// -// #define PR_LOCALE_ID PROP_TAG( PT_LONG, pidAdminMin+0x11 ) -#define PR_LAST_LOGON_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x12) -#define PR_LAST_LOGOFF_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x13) -#define PR_STORAGE_LIMIT_INFORMATION PROP_TAG(PT_LONG, pidAdminMin + 0x14) -// property on disabling message read (unread) receipt -// reusing Folders table property (pidAdminMin+0x15) - -#define PR_INTERNET_MDNS PROP_TAG(PT_BOOLEAN, PROP_ID(PR_NEWSGROUP_COMPONENT)) - -// properties for mailbox quota info - reusing properties from folder table - -// folder pathname, owner, and contacts re-used. -#define PR_QUOTA_WARNING_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin + 0x91) -#define PR_QUOTA_SEND_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin + 0x92) -#define PR_QUOTA_RECEIVE_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin + 0x93) - -// Properties for GetPublicFolderTable -#define PR_FOLDER_FLAGS PROP_TAG(PT_LONG, pidAdminMin + 0x18) -#define PR_LAST_ACCESS_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x19) -#define PR_RESTRICTION_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1A) -#define PR_CATEG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1B) -#define PR_CACHED_COLUMN_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1C) -#define PR_NORMAL_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1D) -#define PR_ASSOC_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1E) -#define PR_RECIPIENT_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1F) -#define PR_RECIPIENT_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x20) -#define PR_ATTACH_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x21) -#define PR_ATTACH_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x22) -#define PR_NORMAL_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin + 0x23) -#define PR_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0x23) -#define PR_ASSOC_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin + 0x24) -#define PR_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0x24) -#define PR_FOLDER_PATHNAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x25) -#define PR_OWNER_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x26) -#define PR_CONTACT_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x27) - -/* the absolute size limitation of a public folder */ -#define PR_PF_OVER_HARD_QUOTA_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x91) -/* the size limit of a message in a public folder */ -#define PR_PF_MSG_SIZE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x92) - -// Do not inherit expiry settings from the MDB wide settings and instead use folder specific ones -// (if folder specific is not set, it will still not get from MDB and remain with no expiry at all) -#define PR_PF_DISALLOW_MDB_WIDE_EXPIRY PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x93) - -// Locale-specific properties -#define PR_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin + 0x11) -#define PR_CODE_PAGE_ID PROP_TAG(PT_LONG, pidAdminMin + 0x33) -#define PR_SORT_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin + 0x75) - -// PT_I8 version of PR_MESSAGE_SIZE defined in mapitags.h -#define PR_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, PROP_ID(PR_MESSAGE_SIZE)) - -/* Bits in PR_FOLDER_FLAGS */ -#define MDB_FOLDER_IPM 0x1 -#define MDB_FOLDER_SEARCH 0x2 -#define MDB_FOLDER_NORMAL 0x4 -#define MDB_FOLDER_RULES 0x8 - -/* Bits used in ulFlags in GetPublicFolderTable() */ -#define MDB_NON_IPM 0x10 -#define MDB_IPM 0x20 - -/* Bits in PR_STORAGE_LIMIT_INFORMATION */ -#define MDB_LIMIT_BELOW 0x1 -#define MDB_LIMIT_ISSUE_WARNING 0x2 -#define MDB_LIMIT_PROHIBIT_SEND 0x4 -#define MDB_LIMIT_NO_CHECK 0x8 -#define MDB_LIMIT_DISABLED 0x10 - -/* A define for "no quota infomation" when retrieving the quota information */ -#define MDB_QUOTA_NOQUOTA 0xFFFFFFFF - -/*------------------------------------------------------------------------ - * - * "IExchangeFastTransfer" Interface Declaration - * - * Used for fast transfer interface used to - * implement CopyTo, CopyProps, CopyFolder, and - * CopyMessages. - * - *-----------------------------------------------------------------------*/ - -// Transfer flags -// Use MAPI_MOVE for move option - -// Transfer methods -#define TRANSFER_COPYTO 1 -#define TRANSFER_COPYPROPS 2 -#define TRANSFER_COPYMESSAGES 3 -#define TRANSFER_COPYFOLDER 4 - -#define EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(IPURE) \ - MAPIMETHOD(Config) \ - (THIS_ ULONG ulFlags, ULONG ulTransferMethod) IPURE; \ - MAPIMETHOD(TransferBuffer) \ - (THIS_ ULONG cb, LPBYTE lpb, ULONG * lpcbProcessed) IPURE; \ - STDMETHOD_(BOOL, IsInterfaceOk) \ - (THIS_ ULONG ulTransferMethod, REFIID refiid, LPSPropTagArray lpptagList, ULONG ulFlags) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeFastTransfer -DECLARE_MAPI_INTERFACE_(IExchangeFastTransfer, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeFastTransfer, LPEXCHANGEFASTTRANSFER); - -/*------------------------------------------------------------------------ - * - * "IExchangeExportChanges" Interface Declaration - * - * Used for Incremental Synchronization - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, ULONG ulFlags, LPUNKNOWN lpUnk, LPSRestriction lpRestriction, \ - LPSPropTagArray lpIncludeProps, LPSPropTagArray lpExcludeProps, ULONG ulBufferSize) IPURE; \ - MAPIMETHOD(Synchronize) \ - (THIS_ ULONG FAR * lpulSteps, ULONG FAR * lpulProgress) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeExportChanges -DECLARE_MAPI_INTERFACE_(IExchangeExportChanges, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges, LPEXCHANGEEXPORTCHANGES); - -/*------------------------------------------------------------------------ - * - * "IExchangeExportChanges2" Interface Declaration - * - * Used for Incremental Synchronization - * Has the Config2 method for configuring for internet format conversion streams - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(IPURE) \ - MAPIMETHOD(ConfigForConversionStream) \ - (THIS_ LPSTREAM lpStream, ULONG ulFlags, LPUNKNOWN lpUnk, LPSRestriction lpRestriction, ULONG cValuesConversion, \ - LPSPropValue lpPropArrayConversion, ULONG ulBufferSize) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeExportChanges2 -DECLARE_MAPI_INTERFACE_(IExchangeExportChanges2, IExchangeExportChanges){ - MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges2, LPEXCHANGEEXPORTCHANGES2); - -/*------------------------------------------------------------------------ - * - * "IExchangeExportChanges3" Interface Declaration - * - * Used for Incremental Synchronization - * Has the Config3 method for configuring for selective message download - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(IPURE) \ - MAPIMETHOD(ConfigForSelectiveSync) \ - (THIS_ LPSTREAM lpStream, ULONG ulFlags, LPUNKNOWN lpUnk, LPENTRYLIST lpMsgList, LPSRestriction lpRestriction, \ - LPSPropTagArray lpIncludeProps, LPSPropTagArray lpExcludeProps, ULONG ulBufferSize) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeExportChanges3 -DECLARE_MAPI_INTERFACE_(IExchangeExportChanges3, IExchangeExportChanges2){ - MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges3, LPEXCHANGEEXPORTCHANGES3); - -typedef struct _ReadState { - ULONG cbSourceKey; - BYTE *pbSourceKey; - ULONG ulFlags; -} READSTATE, *LPREADSTATE; - -/*------------------------------------------------------------------------ - * - * "IExchangeImportContentsChanges" Interface Declaration - * - * Used for Incremental Synchronization of folder contents (i.e. messages) - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, ULONG ulFlags) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; \ - MAPIMETHOD(ImportMessageChange) \ - (THIS_ ULONG cpvalChanges, LPSPropValue ppvalChanges, ULONG ulFlags, LPMESSAGE * lppmessage) IPURE; \ - MAPIMETHOD(ImportMessageDeletion) \ - (THIS_ ULONG ulFlags, LPENTRYLIST lpSrcEntryList) IPURE; \ - MAPIMETHOD(ImportPerUserReadStateChange) \ - (THIS_ ULONG cElements, LPREADSTATE lpReadState) IPURE; \ - MAPIMETHOD(ImportMessageMove) \ - (THIS_ ULONG cbSourceKeySrcFolder, BYTE FAR * pbSourceKeySrcFolder, ULONG cbSourceKeySrcMessage, \ - BYTE FAR * pbSourceKeySrcMessage, ULONG cbPCLMessage, BYTE FAR * pbPCLMessage, ULONG cbSourceKeyDestMessage, \ - BYTE FAR * pbSourceKeyDestMessage, ULONG cbChangeNumDestMessage, BYTE FAR * pbChangeNumDestMessage) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeImportContentsChanges -DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges, LPEXCHANGEIMPORTCONTENTSCHANGES); - -/*------------------------------------------------------------------------ - * - * "IExchangeImportContentsChanges2" Interface Declaration - * - * Used for Incremental Synchronization of folder contents (i.e. messages) - * This interface allows you to import message changes as an internet - * format conversion stream - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(IPURE) \ - MAPIMETHOD(ConfigForConversionStream) \ - (THIS_ LPSTREAM lpStream, ULONG ulFlags, ULONG cValuesConversion, LPSPropValue lpPropArrayConversion) IPURE; \ - MAPIMETHOD(ImportMessageChangeAsAStream) \ - (THIS_ ULONG cpvalChanges, LPSPropValue ppvalChanges, ULONG ulFlags, LPSTREAM * lppstream) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeImportContentsChanges2 -DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges2, IExchangeImportContentsChanges){ - MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE) - EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges2, LPEXCHANGEIMPORTCONTENTSCHANGES2); - -/*------------------------------------------------------------------------ - * - * "IExchangeImportHierarchyChanges" Interface Declaration - * - * Used for Incremental Synchronization of folder hierarchy - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, ULONG ulFlags) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; \ - MAPIMETHOD(ImportFolderChange) \ - (THIS_ ULONG cpvalChanges, LPSPropValue ppvalChanges) IPURE; \ - MAPIMETHOD(ImportFolderDeletion) \ - (THIS_ ULONG ulFlags, LPENTRYLIST lpSrcEntryList) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeImportHierarchyChanges -DECLARE_MAPI_INTERFACE_(IExchangeImportHierarchyChanges, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeImportHierarchyChanges, LPEXCHANGEIMPORTHIERARCHYCHANGES); - -#define ulHierChanged (0x01) - -#define EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(IPURE) \ - MAPIMETHOD_(ULONG, OnNotify) \ - (THIS_ ULONG ulFlags, LPENTRYLIST lpEntryList) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeChangeAdviseSink -DECLARE_MAPI_INTERFACE_(IExchangeChangeAdviseSink, IUnknown){BEGIN_INTERFACE MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdviseSink, LPEXCHANGECHANGEADVISESINK); - -#define EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, LPGUID lpGUID, LPEXCHANGECHANGEADVISESINK lpAdviseSink, ULONG ulFlags) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; \ - MAPIMETHOD(AddKeys) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; \ - MAPIMETHOD(RemoveKeys) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeChangeAdvisor -DECLARE_MAPI_INTERFACE_(IExchangeChangeAdvisor, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdvisor, LPEXCHANGECHANGEADVISOR); - -/*-------------------------------------------------------------------- - * - * "IExchangeBadItemCallback" Interface Declaration - * - * Used to report bad items during move mailbox - * - *--------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(IPURE) \ - MAPIMETHOD(BadItem) \ - (THIS_ HRESULT hResult, ULONG ulFlags, LPWSTR lpwszFolderName, LPSBinary lpsbFolderEid, ULONG cValues, \ - LPSPropValue lpPropArray) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeBadItemCallback -DECLARE_MAPI_INTERFACE_(IExchangeBadItemCallback, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeBadItemCallback, LPEXCHANGEBADITEMCALLBACK); - -/*-------------------------------------------------------------------- - * - * "IExchangeMoveUserProgress" Interface Declaration - * - * Used to report per folder progress during move mailbox - * - *--------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(IPURE) \ - MAPIMETHOD(NextFolder) \ - (THIS_ ULONG ulFlags, LPWSTR lpwszFolderName) IPURE; \ - MAPIMETHOD(Progress) \ - (THIS_ ULONG ulFlags, ULONG ulCount, ULONG ulTotal) IPURE; \ - MAPIMETHOD(Restart) \ - (THIS_ ULONG ulFlags) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeMoveUserProgress -DECLARE_MAPI_INTERFACE_(IExchangeMoveUserProgress, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, LPEXCHANGEMOVEUSERPROGRESS); - -// Internal flag for IMsgStore::CopyTo which tells the move user processing -// that there are potential extended callback objects hanhing off of the -// IMAPIProgress object. -#define MAPI_EXTENDEDCALLBACKS ((ULONG)0x00000400) - -/*------------------------------------------------------------------------ - * - * Errors returned by Exchange Incremental Change Synchronization Interface - * - *-----------------------------------------------------------------------*/ - -#define MAKE_SYNC_E(err) (MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, err)) -#define MAKE_SYNC_W(warn) (MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, warn)) - -#define SYNC_E_UNKNOWN_FLAGS MAPI_E_UNKNOWN_FLAGS -#define SYNC_E_INVALID_PARAMETER E_INVALIDARG -#define SYNC_E_ERROR E_FAIL -#define SYNC_E_OBJECT_DELETED MAKE_SYNC_E(0x800) -#define SYNC_E_IGNORE MAKE_SYNC_E(0x801) -#define SYNC_E_CONFLICT MAKE_SYNC_E(0x802) -#define SYNC_E_NO_PARENT MAKE_SYNC_E(0x803) -#define SYNC_E_CYCLE MAKE_SYNC_E(0x804) -#define SYNC_E_UNSYNCHRONIZED MAKE_SYNC_E(0x805) - -#define SYNC_W_PROGRESS MAKE_SYNC_W(0x820) -#define SYNC_W_CLIENT_CHANGE_NEWER MAKE_SYNC_W(0x821) - -/*------------------------------------------------------------------------ - * - * Flags used by Exchange Incremental Change Synchronization Interface - * - *-----------------------------------------------------------------------*/ - -#define SYNC_UNICODE 0x01 -#define SYNC_NO_DELETIONS 0x02 -#define SYNC_NO_SOFT_DELETIONS 0x04 -#define SYNC_READ_STATE 0x08 -#define SYNC_ASSOCIATED 0x10 -#define SYNC_NORMAL 0x20 -#define SYNC_NO_CONFLICTS 0x40 -#define SYNC_ONLY_SPECIFIED_PROPS 0x80 -#define SYNC_NO_FOREIGN_KEYS 0x100 -#define SYNC_LIMITED_IMESSAGE 0x200 -#define SYNC_CATCHUP 0x400 -#define SYNC_NEW_MESSAGE 0x800 // only applicable to ImportMessageChange() -#define SYNC_MSG_SELECTIVE 0x1000 // Used internally. Will reject if used by clients. -#define SYNC_BEST_BODY 0x2000 -#define SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED 0x4000 -#define SYNC_PROGRESS_MODE 0x8000 // AirMapi progress mode -#define SYNC_FXRECOVERMODE 0x10000 -#define SYNC_DEFER_CONFIG 0x20000 -#define SYNC_FORCE_UNICODE 0x40000 // Forces server to return Unicode properties - -/*------------------------------------------------------------------------ - * - * Flags used by ImportMessageDeletion and ImportFolderDeletion methods - * - *-----------------------------------------------------------------------*/ - -#define SYNC_SOFT_DELETE 0x01 -#define SYNC_EXPIRY 0x02 - -/*------------------------------------------------------------------------ - * - * Flags used by ImportPerUserReadStateChange method - * - *-----------------------------------------------------------------------*/ - -#define SYNC_READ 0x01 - -/*------------------------------------------------------------------------ - * - * Extended Flags used by CopyMessages method - * - *-----------------------------------------------------------------------*/ - -#define MESSAGE_BEST_BODY 0x10 -#define MESSAGE_SEND_ENTRYID 0x20 - -/*------------------------------------------------------------------------ - * - * Extended Flags used by GetHierarchyTable method - * - *-----------------------------------------------------------------------*/ - -#define SUPRESS_NOTIFICATIONS_ON_MY_ACTIONS 0x01000 - -/*------------------------------------------------------------------------ - * - * "IExchangeFavorites" Interface Declaration - * - * Used for adding or removing favorite folders from the public store. - * This interface is obtained by calling QueryInterface on the folder - * whose EntryID is specified by PR_IPM_FAVORITES_ENTRYID on the public - * store. - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEFAVORITES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(AddFavorites) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; \ - MAPIMETHOD(DelFavorites) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeFavorites -DECLARE_MAPI_INTERFACE_(IExchangeFavorites, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEFAVORITES_METHODS(PURE)}; - -DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES); - -/*------------------------------------------------------------------------ - * - * Properties used by the Favorites Folders API - * - *-----------------------------------------------------------------------*/ - -#define PR_AUTO_ADD_NEW_SUBS PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x5) -#define PR_NEW_SUBS_GET_AUTO_ADD PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x6) -/*------------------------------------------------------------------------ - * - * Properties used by the Offline Folders API - * - *-----------------------------------------------------------------------*/ - -#define PR_OFFLINE_FLAGS PROP_TAG(PT_LONG, pidFolderMin + 0x5) -#define PR_SYNCHRONIZE_FLAGS PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin + 0x4) - -/*------------------------------------------------------------------------ - * - * Flags used by the Offline Folders API - * - *-----------------------------------------------------------------------*/ - -#define OF_AVAILABLE_OFFLINE ((ULONG)0x00000001) -#define OF_FORCE ((ULONG)0x80000000) - -#define SF_DISABLE_STARTUP_SYNC ((ULONG)0x00000001) - -/*------------------------------------------------------------------------ - * - * "IExchangeMessageConversion" Interface Declaration - * - * Used to configure message conversion streams - * - *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(IPURE) \ - MAPIMETHOD(OpenStream) \ - (THIS_ ULONG cValues, LPSPropValue lpPropArray, LPSTREAM FAR * lppStream) IPURE; -#undef INTERFACE -#define INTERFACE IExchangeMessageConversion -DECLARE_MAPI_INTERFACE_(IExchangeMessageConversion, - IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(PURE)}; -#undef IMPL -#define IMPL - -DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSION); - -#define PR_MESSAGE_SITE_NAME PROP_TAG(PT_TSTRING, pidExchangeNonXmitReservedMin + 0x7) -#define PR_MESSAGE_SITE_NAME_A PROP_TAG(PT_STRING8, pidExchangeNonXmitReservedMin + 0x7) -#define PR_MESSAGE_SITE_NAME_W PROP_TAG(PT_UNICODE, pidExchangeNonXmitReservedMin + 0x7) - -#define PR_MESSAGE_PROCESSED PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x8) - -#define PR_MSG_BODY_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x03) - -#define PR_BILATERAL_INFO PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin - 0x04) -#define PR_DL_REPORT_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x05) - -#define PRIV_DL_HIDE_MEMBERS 0x00000001 -#define PRIV_DL_REPORT_TO_ORIG 0x00000002 -#define PRIV_DL_REPORT_TO_OWNER 0x00000004 -#define PRIV_DL_ALLOW_OOF 0x00000008 - -/*--------------------------------------------------------------------------------- - * - * PR_PREVIEW is a folder contents property that is either PR_ABSTRACT - * or the first 255 characters of PR_BODY. - * PR_PREVIEW_UNREAD is a folder contents property that is either PR_PREVIEW - * if the message is not read, or NULL if it is read. - * - *---------------------------------------------------------------------------------*/ -#define PR_ABSTRACT PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin - 0x06) -#define PR_ABSTRACT_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin - 0x06) -#define PR_ABSTRACT_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin - 0x06) - -#define PR_PREVIEW PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin - 0x07) -#define PR_PREVIEW_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin - 0x07) -#define PR_PREVIEW_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin - 0x07) - -#define PR_PREVIEW_UNREAD PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin - 0x08) -#define PR_PREVIEW_UNREAD_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin - 0x08) -#define PR_PREVIEW_UNREAD_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin - 0x08) - -// -// Informs IMAIL that full fidelity should be discarded for this message. -// -#define PR_DISABLE_FULL_FIDELITY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x72) - -// file attributes for messages / folders -// need to be in REN property range in order to replicate -#define PR_ATTR_HIDDEN PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x74) -#define PR_ATTR_SYSTEM PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x75) -#define PR_ATTR_READONLY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x76) - -// Flag indicating whether msg has been read or not (read-only prop for now - not replicated). -#define PR_READ PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin + 0x29) - -// Administrative security descriptor for a folder, if present. -// -#define PR_ADMIN_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d21) -// -// Win32 compatible representation of folder/message security descriptor -// -#define PR_WIN32_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d22) -// -// TRUE if PR_NT_SECURITY_DESCRIPTOR describes non Win32 ACL semantics. -// If this is set, components that use PR_WIN32_SECURITY_DESCRIPTOR cannot -// allow modification of PR_NT_SECURITY_DESCRIPTOR (or PR_DEFAULT_MESSAGE_SD). -// -#define PR_NON_WIN32_ACL PROP_TAG(PT_BOOLEAN, 0x3d23) - -// -// TRUE if any items in the folder contain item level ACLs -// -#define PR_ITEM_LEVEL_ACL PROP_TAG(PT_BOOLEAN, 0x3d24) - -#define PR_DAV_TRANSFER_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x0E84) -// -// XML formatted versions of the NT SECURITY DESCRIPTOR properties -#define PR_NT_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2A) -#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x2A) -#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x2A) -#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2B) -#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x2B) -#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x2B) - -/*------------------------------------------------------------------------------------ - * - * OWA Info Property - * - *------------------------------------------------------------------------------------*/ -#define PR_OWA_URL PROP_TAG(PT_STRING8, pidRenMsgFldMin + 0x71) - -//$ The value of this property ID will change in the future. Do not rely on -//$ its current value. Rely on the define only. -#define PR_STORE_SLOWLINK PROP_TAG(PT_BOOLEAN, 0x7c0a) - -/* - * Registry locations of settings - */ -#if defined(WIN32) && !defined(MAC) -#define SZ_HPC_V2 "Software\\Microsoft\\Windows CE Services" -#define SZ_HPC_V2_MAJOR "MajorVersion" // = 2 -#define SZ_HPC_V2_MINOR "MinorVersion" // = 0 or 1 - -#define SZ_HPC_V1 "Software\\Microsoft\\Pegasus" -#define SZ_HPC_V1_MAJOR "MajorVersion" // = 1 Major and Minor numbers didn't appear -#define SZ_HPC_V1_MINOR "MinorVersion" // = 1 until after v1.0 was released -#define SZ_HPC_V1_0 "InstalledDir" // present for v1.0 - -#define SZ_OUTL_OST_OPTIONS "Software\\Microsoft\\Office\\8.0\\Outlook\\OST" -#define SZ_NO_OST "NoOST" -#define NO_OST_FLAG_ALLOWED 0 // OST's are allowed on the machine -#define NO_OST_FLAG_CACHE_ONLY 1 // OST can only be used as a cache -#define NO_OST_FLAG_NOT_ALLOWED 2 // OST's are not allowed on the machine -#define NO_OST_FLAG_NO_CACHE 3 // OST's are not allowed as a cache -#define NO_OST_DEFAULT NO_OST_FLAG_ALLOWED -#endif - -/* - * Special GUID property for suppressing sync events for folders. If - * this property is set on a folder (any GIUD value), sync events will - * be suppressed for that folder. The caller can then selectively enable - * sync events for that folder by specifying the corresponding GUID in - * the NEWLOGON object. - */ -#define PR_SYNCEVENT_SUPPRESS_GUID PROP_TAG(PT_BINARY, 0x3880) - -/* - * The following are the well-known GUIDS for the different special folders. - * By default, sync events are suppressed for these folders. You can insert - * GUIDs into your NEWLOGON object to selectively enable sync events for - * each folder. - */ -// {B2DC5B57-AF2D-4915-BAE3-90E5BDFB0070} -// static const GUID guidOutboxSyncEvents = -//{ -// 0xb2dc5b57, 0xaf2d, 0x4915, -// { -// 0xba, 0xe3, 0x90, 0xe5, 0xbd, 0xfb, 0x0, 0x70 -// } -//}; -// -// {2185EE91-28CD-4d9b-BFB4-BC49BB1DD8C0} -// static const GUID guidMTSInSyncEvents = -//{ -// 0x2185ee91, 0x28cd, 0x4d9b, -// { -// 0xbf, 0xb4, 0xbc, 0x49, 0xbb, 0x1d, 0xd8, 0xc0 -// } -//}; -// -// {1BDBAFD3-1384-449b-A200-DE4745B07839} -// static const GUID guidMTSOutSyncEvents = -//{ -// 0x1bdbafd3, 0x1384, 0x449b, -// { -// 0xa2, 0x0, 0xde, 0x47, 0x45, 0xb0, 0x78, 0x39 -// } -//}; -// -// {221ED74D-0B5C-4c0e-8807-23AFDD8AC2FF} -// static const GUID guidTransportTempFolderSyncEvents = -//{ -// 0x221ed74d, 0xb5c, 0x4c0e, -// { -// 0x88, 0x7, 0x23, 0xaf, 0xdd, 0x8a, 0xc2, 0xff -// } -//}; - -/* - * Lock properties - */ -// REVIEW:: some of these definitions appear both in MAPITAGS.H and EDKMDB.H -// one set of definitions should be removed -#define PR_LOCK_BRANCH_ID PROP_TAG(PT_I8, 0x3800) -#define PR_LOCK_RESOURCE_FID PROP_TAG(PT_I8, 0x3801) -#define PR_LOCK_RESOURCE_DID PROP_TAG(PT_I8, 0x3802) -#define PR_LOCK_RESOURCE_VID PROP_TAG(PT_I8, 0x3803) -#define PR_LOCK_ENLISTMENT_CONTEXT PROP_TAG(PT_BINARY, 0x3804) -#define PR_LOCK_TYPE PROP_TAG(PT_SHORT, 0x3805) -#define PR_LOCK_SCOPE PROP_TAG(PT_SHORT, 0x3806) -#define PR_LOCK_TRANSIENT_ID PROP_TAG(PT_BINARY, 0x3807) -#define PR_LOCK_DEPTH PROP_TAG(PT_LONG, 0x3808) -#define PR_LOCK_TIMEOUT PROP_TAG(PT_LONG, 0x3809) -#define PR_LOCK_EXPIRY_TIME PROP_TAG(PT_SYSTIME, 0x380a) -#define PR_LOCK_GLID PROP_TAG(PT_BINARY, 0x380b) -#define PR_LOCK_NULL_URL_W PROP_TAG(PT_UNICODE, 0x380c) - -/* - * Lock flags - */ -#define LOCK_NON_PERSISTENT 0x00000001 -#define LOCK_BLOCKING_MID_LOCK 0x00000002 -#define LOCK_NULL_RESOURCE 0x00000004 -#define LOCK_READ_ACCESS_CHECK_ONLY 0x00000008 -#define LOCK_WRITE_THROUGH_GOP 0x00010000 -// This bit is reserved and must not be set! -#define LOCK_RESERVED 0x80000000 - -/* - * Unlock flags - */ -#define UNLOCK_CHECKIN_ABORT 0x00000001 -#define UNLOCK_CHECKIN_KEEP_LOCKED 0x00000002 -#define UNLOCK_BLOCKING_MID_LOCK_ALL 0x00000004 -#define UNLOCK_BLOCKING_MID_LOCK_LOGON_ONLY 0x00000008 -#define UNLOCK_NULL_RESOURCE 0x00000010 -#define UNLOCK_WRITE_THROUGH_GOP 0x00010000 - -/* - * Versioning flags for folder - */ -#define wNonVersionedFolder ((WORD)0x0000) -#define wVersionedFolderSimple ((WORD)0x0001) -#define wVersionedFolderAuto ((WORD)0x0002) // When you auto version it is simple versioned as well. - -/* - * Versioning operation codes for version rows in ptagVersionedOperation - */ -#define fVersionedDelete ((ULONG)0x01) -#define fVersionedUnDelete ((ULONG)0x02) -#define fVersionedPin ((ULONG)0x04) -#define fVersionedUnPin ((ULONG)0x08) -#define fVersionedMoveIn ((ULONG)0x10) -#define fVersionedMoveOut ((ULONG)0x20) - -/*------------------------------------------------------------------------ - * - * LocalStore specific internal properties - * - * These are properties that will be used internally by local store. - * Properties that are listed here are used in components other than the local store - *-----------------------------------------------------------------------*/ -#define pidLISMsgFolderPropMin pidLocalStoreInternalMin + 0xa0 // 0x65a0 -#define pidLISMsgFolderPropMax pidLocalStoreInternalMin + 0xc0 // 0x65c0 - -#define pidLISErrorCodeMin pidLISMsgFolderPropMin + 0xa // 0x65aa -#define pidLISErrorCodeMax pidLISMsgFolderPropMin + 0x10 // 0x65b0 - -#define pidLISInterfacePropMin pidLocalStoreInternalMin + 0xd0 // 0x65d0 -#define pidLISInterfacePropMax pidLocalStoreInternalMin + 0xe0 // 0x65e0 - -#define ptagLISSubfolders PROP_TAG(PT_BOOLEAN, pidLocalStoreInternalMin + 0x0) -#define ptagLISUnreadCount PROP_TAG(PT_LONG, pidLocalStoreInternalMin + 0x1) - -#define ptagLISErrorCode PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x0) // PROP_TAG(PT_LONG, 0x65aa) -#define ptagLISErrorItemType PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x1) // PROP_TAG(PT_LONG, 0x65ab) -#define ptagLISErrorOperation PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x2) // PROP_TAG(PT_LONG, 0x65ac) -#define ptagLISErrorItemUrl PROP_TAG(PT_UNICODE, pidLISErrorCodeMin + 0x3) // PROP_TAG(PT_UNICODE, 0x65ad) -#define ptagLISErrorSourceUrl PROP_TAG(PT_UNICODE, pidLISErrorCodeMin + 0x4) // PROP_TAG(PT_UNICODE, 0x65ae) -#define ptagLISModifiedPropertyList PROP_TAG(PT_UNICODE, pidLISErrorCodeMin + 0x5) // PROP_TAG(PT_UNICODE, 0x65af) -#define ptagLISExtendedErrorinfo PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x6) // PROP_TAG(PT_LONG, 0x65b0) - -// Not in msgfolder prop range -#define ptagLISErrorLogUrl PROP_TAG(PT_UNICODE, pidLocalStoreInternalMin + 0x70) // PROP_TAG(PT_UNICODE, 0x6570) - -// Ptags used between EXOLEDB and LSCache on client machine to pass -// along the actual client SQL query from EXOLEDB to LSCache in the RES_COMMENT -// prop val array of an SRestriction. These ptags are never actually sent accross the -// wire or stored as properties on objects in the cache. -// -// ptagSql = The identifying property for the SQL restriction. -// The value will be the original complete clause. -#define ptagSql PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x0) -#define ptagSqlSelect PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x1) -#define ptagSqlFrom PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x2) -#define ptagSqlWhere PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x3) -#define ptagSqlOrder PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x4) -#define ptagSqlGroup PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x5) - -#define PR_RULE_SERVER_RULE_ID PROP_TAG(PT_I8, pidLISMsgFolderPropMin + 0x0) // Corresponding server RUID for LIS - -// this is a hackish property to be used by sync event code to say that changes -// need client refresh. The only valid value is TRUE. See #168797 for more info -#define PR_FORCE_CLIENT_REFRESH PROP_TAG(PT_BOOLEAN, pidLISMsgFolderPropMin + 0x1) - -/*------------------------------------------------------------------------ - * - * Anti-Virus products integration support - * - * All properties are read-only. - *-----------------------------------------------------------------------*/ - -// Name and version of anti-virus product that performed the last scan of an item. -#define PR_ANTIVIRUS_VENDOR PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x45) // 0x0E85001E -#define PR_ANTIVIRUS_VERSION PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x46) // 0x0E860003 - -// Results ot the last scan of an item. -#define PR_ANTIVIRUS_SCAN_STATUS PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x47) // 0x0E870003 - -// List of virus identification strings of all viruses found by the last scan, if virus has been cleaned -// or detected, separated by commans. Empty string if no virus has been found. -#define PR_ANTIVIRUS_SCAN_INFO PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x48) // 0x0E88001F - -/* - * Possible values of PR_ANTIVIRUS_SCAN_STATUS - */ -// Anti-virus product has completed scanning of an item, and found no virus. -#define ANTIVIRUS_SCAN_NO_VIRUS 0 - -// Anti-virus product has detected a virus in an item, or assumed the item may contain a virus -// based on item's properties, like filename or content type. -#define ANTIVIRUS_SCAN_VIRUS_PRESENT 1 - -// Anti-virus product has detected a virus in an item, and applied changes to remove the virus. -// The item should be safe to use after modifications. -#define ANTIVIRUS_SCAN_VIRUS_CLEANED 2 - -// Anti-virus product has detected a virus in an item, and has requested that the message be -// deleted. This item shouldn't be allowed to be opened. -#define ANTIVIRUS_SCAN_VIRUS_DELETED 3 - -// Presents the same list as PR_DISPLAY_TO except uses the format "[addrtype1:addr1]; [addrtype2:addr2]" -#define PR_ADDR_TO PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x57) // 0x0E97 -#define PR_ADDR_TO_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x57) -#define PR_ADDR_TO_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x57) - -// Presents the same list as PR_DISPLAY_CC except uses the format "[addrtype1:addr1]; [addrtype2:addr2]" -#define PR_ADDR_CC PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x58) // 0x0E98 -#define PR_ADDR_CC_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x58) -#define PR_ADDR_CC_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x58) - -// This property IS NO LONGER USED. I've left it here to avoid possible build break. -#define ptagLISNewMail PROP_TAG(PT_BOOLEAN, 0x65c5) - -#endif // EDKMDB_INCLUDED diff --git a/com/win32comext/mapi/src/mapi_headers/README.md b/com/win32comext/mapi/src/mapi_headers/README.md deleted file mode 100644 index ae2ce2566..000000000 --- a/com/win32comext/mapi/src/mapi_headers/README.md +++ /dev/null @@ -1,61 +0,0 @@ -These MAPI headers were downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=12905 -and enable us to build the MAPI extension in Python 2.7 and up. - -The terms for these headers are below: - -MICROSOFT SOFTWARE LICENSE TERMS -MICROSOFT OUTLOOK 2010 MAPI HEADER FILES - -These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft - • updates, - • supplements, - • Internet-based services, and - • support services -for this software, unless other terms accompany those items. If so, those terms apply. - -BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. - -If you comply with these license terms, you have the rights below. -1. INSTALLATION AND USE RIGHTS. You may install and use any number of copies of the software on your devices. -2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS. - a. Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below. - i. Right to Use and Distribute. The code and text files listed below are “Distributable Code.” - • Sample Code. You may modify, copy, and distribute the source and object code form of code marked as “sample.” - • Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs. - ii. Distribution Requirements. For any Distributable Code you distribute, you must - • add significant primary functionality to it in your programs; - • require distributors and external end users to agree to terms that protect it at least as much as this agreement; - • display your valid copyright notice on your programs; and - • indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your programs. - iii. Distribution Restrictions. You may not - • alter any copyright, trademark or patent notice in the Distributable Code; - • use Microsoft’s trademarks in your programs’ names or in a way that suggests your programs come from or are endorsed by Microsoft; - • distribute Distributable Code to run on a platform other than the Windows platform; - • include Distributable Code in malicious, deceptive or unlawful programs; or - • modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that - • the code be disclosed or distributed in source code form; or - • others have the right to modify it. -3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not - • work around any technical limitations in the software; - • reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation; - • make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation; - • publish the software for others to copy; - • rent, lease or lend the software; or - • use the software for commercial software hosting services. -4. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software. -5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes. -6. TRANSFER TO ANOTHER DEVICE. You may uninstall the software and install it on another device for your use. You may not do so to share this license between devices. -7. TRANSFER TO A THIRD PARTY. The first user of the software may transfer it and this agreement directly to a third party. Before the transfer, that party must agree that this agreement applies to the transfer and use of the software. The first user must uninstall the software before transferring it separately from the device. The first user may not retain any copies. -8. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting. -9. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it. -10. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services. -11. APPLICABLE LAW. - a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort. - b. Outside the United States. If you acquired the software in any other country, the laws of that country apply. -12. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so. -13. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -14. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES. -This limitation applies to - • anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and - • claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law. -It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages. diff --git a/com/win32comext/mapi/src/mapi_stub_library/MapiStubLibrary.cpp b/com/win32comext/mapi/src/mapi_stub_library/MapiStubLibrary.cpp deleted file mode 100644 index 455d78264..000000000 --- a/com/win32comext/mapi/src/mapi_stub_library/MapiStubLibrary.cpp +++ /dev/null @@ -1,1219 +0,0 @@ -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -// Check that we have the Outlook 2010 MAPI headers or higher -// We do this by checking for the presence of a macro not present in the older headers -#ifndef MAPIFORM_CPU_X64 -#pragma message("Compilation requires Outlook 2010 MAPI headers or higher") -#pragma message("Go to the following URL") -#pragma message( \ - " http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f8d01fc8-f7b5-4228-baa3-817488a66db1&displaylang=en") -#pragma message("and follow the instructions to install the Outlook 2010 MAPI headers") -#pragma message("Then go to Tools\\Options\\Projects and Solutions\\VC++ Directories and ensure the headers include") -#pragma message("directory precedes the Visual Studio include directories.") -#pragma message(" ") -#error Outlook 2010 MAPI headers or higher must be installed -#endif - -#if defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64) -#define ExpandFunction(fn, c) #fn -#elif defined(_M_IX86) -#define ExpandFunction(fn, c) #fn "@" #c -#else -#error "Unsupported Platform" -#endif - -#if _MSC_VER < 1600 -#define nullptr NULL -#endif - -// Forward declarations for types not documented in MAPI headers - -struct MAPIOFFLINE_CREATEINFO; -struct IMAPIOfflineMgr; -struct RTF_WCSINFO; -struct RTF_WCSRETINFO; - -#define LINKAGE_EXTERN_C extern "C" -#define LINKAGE_NO_EXTERN_C /* */ - -// Forward declares from MapiStubUtil.cpp -HMODULE GetMAPIHandle(); -HMODULE GetPrivateMAPI(); -void UnloadPrivateMAPI(); -extern volatile ULONG g_ulDllSequenceNum; - -#define DEFINE_STUB_FUNCTION_V0(_linkage, _modifiers, _name, _lookup) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(void); \ - \ - _linkage void _modifiers _name(void) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_V0(_linkage, _modifiers, _name, _ordinal) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(void); \ - \ - _linkage void _modifiers _name(void) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_0(_linkage, _ret_type, _modifiers, _name, _lookup, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(void); \ - \ - _linkage _ret_type _modifiers _name(void) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_0(_linkage, _ret_type, _modifiers, _name, _ordinal, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(void); \ - \ - _linkage _ret_type _modifiers _name(void) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_V1(_linkage, _modifiers, _name, _lookup, _param1_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type); \ - \ - _linkage void _modifiers _name(_param1_type a) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_V1(_linkage, _modifiers, _name, _ordinal, _param1_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type); \ - \ - _linkage void _modifiers _name(_param1_type a) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_1(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_1(_linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_V2(_linkage, _modifiers, _name, _lookup, _param1_type, _param2_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type); \ - \ - _linkage void _modifiers _name(_param1_type a, _param2_type b) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_V2(_linkage, _modifiers, _name, _ordinal, _param1_type, _param2_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type); \ - \ - _linkage void _modifiers _name(_param1_type a, _param2_type b) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_2(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_2(_linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _param2_type, \ - _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_V3(_linkage, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type); \ - \ - _linkage void _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b, c); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_V3(_linkage, _modifiers, _name, _ordinal, _param1_type, _param2_type, _param3_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type); \ - \ - _linkage void _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b, c); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_3(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_3(_linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _param2_type, \ - _param3_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_V4(_linkage, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type, \ - _param4_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type) \ - \ - _linkage void _modifiers \ - _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b, c, d); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_4(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_4(_linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _param2_type, \ - _param3_type, _param4_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_5(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_5(_linkage, _ret_type, _modifiers, _name, _ordinal, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_6(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _param6_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e, _param6_type f) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e, f); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_V7(_linkage, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type, \ - _param4_type, _param5_type, _param6_type, _param7_type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type); \ - \ - _linkage void _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, _param5_type e, \ - _param6_type f, _param7_type g) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b, c, d, e, f, g); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_7(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _param6_type, _param7_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e, _param6_type f, _param7_type g) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e, f, g); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_8(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _param6_type, _param7_type, _param8_type, \ - _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type, _param8_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e, _param6_type f, _param7_type g, _param8_type h) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e, f, g, h); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_9(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e, _param6_type f, _param7_type g, _param8_type h, \ - _param9_type i) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e, f, g, h, i); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_10(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e, _param6_type f, _param7_type g, _param8_type h, \ - _param9_type i, _param10_type j) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e, f, g, h, i, j); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_11(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _param11Type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _param11Type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e, _param6_type f, _param7_type g, _param8_type h, \ - _param9_type i, _param10_type j, _param11Type k) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e, f, g, h, i, j, k); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_12(_linkage, _ret_type, _modifiers, _name, _lookup, _param1_type, _param2_type, \ - _param3_type, _param4_type, _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _param11Type, _param12Type, _default) \ - \ - _linkage typedef _ret_type(_modifiers *_name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _param11Type, _param12Type); \ - \ - _linkage _ret_type _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, \ - _param5_type e, _param6_type f, _param7_type g, _param8_type h, \ - _param9_type i, _param10_type j, _param11Type k, _param12Type l) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - return _name##VAR(a, b, c, d, e, f, g, h, i, j, k, l); \ - } \ - else { \ - return _default; \ - } \ - } - -#define DEFINE_STUB_FUNCTION_V12(_linkage, _modifiers, _name, _lookup, _param1_type, _param2_type, _param3_type, \ - _param4_type, _param5_type, _param6_type, _param7_type, _param8_type, _param9_type, \ - _param10_type, _param11Type, _param12Type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _param11Type, _param12Type); \ - \ - _linkage void _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, _param5_type e, \ - _param6_type f, _param7_type g, _param8_type h, _param9_type i, _param10_type j, \ - _param11Type k, _param11Type l) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), _lookup); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b, c, d, e, f, g, h, i, j, k, l); \ - } \ - } - -#define DEFINE_STUB_FUNCTION_ORD_V12(_linkage, _modifiers, _name, _ordinal, _param1_type, _param2_type, _param3_type, \ - _param4_type, _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _param11Type, _param12Type) \ - \ - _linkage typedef void(_modifiers * _name##TYPE)(_param1_type, _param2_type, _param3_type, _param4_type, \ - _param5_type, _param6_type, _param7_type, _param8_type, \ - _param9_type, _param10_type, _param11Type, _param12Type); \ - \ - _linkage void _modifiers _name(_param1_type a, _param2_type b, _param3_type c, _param4_type d, _param5_type e, \ - _param6_type f, _param7_type g, _param8_type h, _param9_type i, _param10_type j, \ - _param11Type k, _param11Type l) \ - { \ - static _name##TYPE _name##VAR = nullptr; \ - static UINT ulDllSequenceNum = 0; \ - \ - if ((ulDllSequenceNum != g_ulDllSequenceNum) || (nullptr == GetMAPIHandle())) { \ - _name##VAR = (_name##TYPE)::GetProcAddress(GetPrivateMAPI(), (LPSTR)(_ordinal)); \ - ulDllSequenceNum = g_ulDllSequenceNum; \ - } \ - \ - if ((nullptr != _name##VAR) && (nullptr != GetMAPIHandle())) { \ - _name##VAR(a, b, c, d, e, f, g, h, i, j, k, l); \ - } \ - } - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, MAPILogonEx, ExpandFunction(MAPILogonEx, 20), - ULONG_PTR, LPTSTR, LPTSTR, ULONG, LPMAPISESSION *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_V0(LINKAGE_EXTERN_C, STDAPICALLTYPE, MAPIUninitialize, ExpandFunction(MAPIUninitialize, 0)) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, SCODE, STDMETHODCALLTYPE, MAPIAllocateBuffer, - ExpandFunction(MAPIAllocateBuffer, 8), ULONG, LPVOID FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDMETHODCALLTYPE, MAPIAllocateMore, - ExpandFunction(MAPIAllocateMore, 12), ULONG, LPVOID, LPVOID FAR *, (SCODE)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, MAPIReallocateBuffer, - ExpandFunction(MAPIReallocateBuffer, 12), LPVOID, ULONG, LPVOID *, (SCODE)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, HRESULT, STDMETHODCALLTYPE, MAPIAdminProfiles, - ExpandFunction(MAPIAdminProfiles, 8), ULONG, LPPROFADMIN FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, MAPIInitialize, ExpandFunction(MAPIInitialize, 4), - LPVOID, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, LaunchWizard, ExpandFunction(LaunchWizard, 20), HWND, - ULONG, LPCSTR FAR *, ULONG, LPSTR, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, MAPIOpenFormMgr, ExpandFunction(MAPIOpenFormMgr, 8), - LPMAPISESSION, LPMAPIFORMMGR FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, MAPIOpenLocalFormContainer, - ExpandFunction(MAPIOpenLocalFormContainer, 4), LPMAPIFORMCONTAINER FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScInitMapiUtil, ExpandFunction(ScInitMapiUtil, 4), - ULONG, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_V0(LINKAGE_EXTERN_C, STDAPICALLTYPE, DeinitMapiUtil, ExpandFunction(DeinitMapiUtil, 0)) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrAllocAdviseSink, - ExpandFunction(HrAllocAdviseSink, 12), LPNOTIFCALLBACK, LPVOID, LPMAPIADVISESINK FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrThisThreadAdviseSink, - ExpandFunction(HrThisThreadAdviseSink, 8), LPMAPIADVISESINK, LPMAPIADVISESINK FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrDispatchNotifications, - ExpandFunction(HrDispatchNotifications, 4), ULONG, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScBinFromHexBounded, - ExpandFunction(ScBinFromHexBounded, 12), LPTSTR, LPBYTE, ULONG, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FBinFromHex, ExpandFunction(FBinFromHex, 8), LPTSTR, - LPBYTE, FALSE) - -DEFINE_STUB_FUNCTION_V3(LINKAGE_EXTERN_C, STDAPICALLTYPE, HexFromBin, ExpandFunction(HexFromBin, 12), LPBYTE, int, - LPTSTR) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrGetAutoDiscoverXML, - ExpandFunction(HrGetAutoDiscoverXML, 20), LPCWSTR, LPCWSTR, HANDLE, ULONG, IStream **, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_10(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, BuildDisplayTable, - ExpandFunction(BuildDisplayTable, 40), LPALLOCATEBUFFER, LPALLOCATEMORE, LPFREEBUFFER, LPMALLOC, - HINSTANCE, UINT, LPDTPAGE, ULONG, LPMAPITABLE *, LPTABLEDATA *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, MAPIInitIdle, ExpandFunction(MAPIInitIdle, 4), LPVOID, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_V0(LINKAGE_EXTERN_C, STDAPICALLTYPE, MAPIDeinitIdle, ExpandFunction(MAPIDeinitIdle, 0)) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, FTG, STDAPICALLTYPE, FtgRegisterIdleRoutine, - ExpandFunction(FtgRegisterIdleRoutine, 20), PFNIDLE, LPVOID, short, ULONG, USHORT, nullptr) - -DEFINE_STUB_FUNCTION_V2(LINKAGE_EXTERN_C, STDAPICALLTYPE, EnableIdleRoutine, ExpandFunction(EnableIdleRoutine, 8), FTG, - BOOL) - -DEFINE_STUB_FUNCTION_V1(LINKAGE_EXTERN_C, STDAPICALLTYPE, DeregisterIdleRoutine, - ExpandFunction(DeregisterIdleRoutine, 4), FTG) - -DEFINE_STUB_FUNCTION_V7(LINKAGE_EXTERN_C, STDAPICALLTYPE, ChangeIdleRoutine, ExpandFunction(ChangeIdleRoutine, 28), FTG, - PFNIDLE, LPVOID, short, ULONG, USHORT, USHORT) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, CreateIProp, ExpandFunction(CreateIProp, 24), LPCIID, - ALLOCATEBUFFER FAR *, ALLOCATEMORE FAR *, FREEBUFFER FAR *, LPVOID, LPPROPDATA FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_9(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, CreateTable, ExpandFunction(CreateTable, 36), LPCIID, - ALLOCATEBUFFER FAR *, ALLOCATEMORE FAR *, FREEBUFFER FAR *, LPVOID, ULONG, ULONG, - LPSPropTagArray, LPTABLEDATA FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, int, WINAPI, MNLS_lstrlenW, ExpandFunction(MNLS_lstrlenW, 4), LPCWSTR, 0) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, int, WINAPI, MNLS_lstrcmpW, ExpandFunction(MNLS_lstrcmpW, 8), LPCWSTR, LPCWSTR, - 0) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, LPWSTR, WINAPI, MNLS_lstrcpyW, ExpandFunction(MNLS_lstrcpyW, 8), LPWSTR, - LPCWSTR, nullptr) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, int, WINAPI, MNLS_CompareStringW, ExpandFunction(MNLS_CompareStringW, 24), - LCID, DWORD, LPCWSTR, int, LPCWSTR, int, 0) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, int, WINAPI, MNLS_MultiByteToWideChar, - ExpandFunction(MNLS_MultiByteToWideChar, 24), UINT, DWORD, LPCSTR, int, LPWSTR, int, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_8(LINKAGE_EXTERN_C, int, WINAPI, MNLS_WideCharToMultiByte, - ExpandFunction(MNLS_WideCharToMultiByte, 32), UINT, DWORD, LPCWSTR, int, LPSTR, int, LPCSTR, - BOOL FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, BOOL, WINAPI, MNLS_IsBadStringPtrW, ExpandFunction(MNLS_IsBadStringPtrW, 8), - LPCWSTR, UINT, TRUE) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FEqualNames, ExpandFunction(FEqualNames, 8), - LPMAPINAMEID, LPMAPINAMEID, FALSE) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, WrapStoreEntryID, - ExpandFunction(WrapStoreEntryID, 24), ULONG, LPTSTR, ULONG, LPENTRYID, ULONG *, LPENTRYID *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, BOOL, WINAPI, IsBadBoundedStringPtr, ExpandFunction(IsBadBoundedStringPtr, 8), - const void FAR *, UINT, FALSE) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrQueryAllRows, ExpandFunction(HrQueryAllRows, 24), - LPMAPITABLE, LPSPropTagArray, LPSRestriction, LPSSortOrderSet, LONG, LPSRowSet FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScCreateConversationIndex, - ExpandFunction(ScCreateConversationIndex, 16), ULONG, LPBYTE, ULONG FAR *, LPBYTE FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, PropCopyMore, ExpandFunction(PropCopyMore, 16), - LPSPropValue, LPSPropValue, ALLOCATEMORE *, LPVOID, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, UlPropSize, ExpandFunction(UlPropSize, 4), LPSPropValue, - 0) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FPropContainsProp, ExpandFunction(FPropContainsProp, 12), - LPSPropValue, LPSPropValue, ULONG, FALSE) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FPropCompareProp, ExpandFunction(FPropCompareProp, 12), - LPSPropValue, ULONG, LPSPropValue, FALSE) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, LONG, STDAPICALLTYPE, LPropCompareProp, ExpandFunction(LPropCompareProp, 8), - LPSPropValue, LPSPropValue, 0) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrAddColumns, ExpandFunction(HrAddColumns, 16), - LPMAPITABLE, LPSPropTagArray, LPALLOCATEBUFFER, LPFREEBUFFER, MAPI_E_CALL_FAILED) - -typedef void(FAR *HrAddColumnsEx5ParamType)(LPSPropTagArray); - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrAddColumnsEx, ExpandFunction(HrAddColumnsEx, 20), - LPMAPITABLE, LPSPropTagArray, LPALLOCATEBUFFER, LPFREEBUFFER, HrAddColumnsEx5ParamType, - MAPI_E_CALL_FAILED) - -const FILETIME ZERO_FILETIME = {0, 0}; - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, FILETIME, STDAPICALLTYPE, FtMulDwDw, ExpandFunction(FtMulDwDw, 8), DWORD, - DWORD, ZERO_FILETIME) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, FILETIME, STDAPICALLTYPE, FtAddFt, ExpandFunction(FtAddFt, 16), FILETIME, - FILETIME, ZERO_FILETIME) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, FILETIME, STDAPICALLTYPE, FtAdcFt, ExpandFunction(FtAdcFt, 20), FILETIME, - FILETIME, WORD FAR *, ZERO_FILETIME) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, FILETIME, STDAPICALLTYPE, FtSubFt, ExpandFunction(FtSubFt, 16), FILETIME, - FILETIME, ZERO_FILETIME) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, FILETIME, STDAPICALLTYPE, FtMulDw, ExpandFunction(FtMulDw, 12), DWORD, - FILETIME, ZERO_FILETIME) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, FILETIME, STDAPICALLTYPE, FtNegFt, ExpandFunction(FtNegFt, 8), FILETIME, - ZERO_FILETIME) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, UlAddRef, ExpandFunction(UlAddRef, 4), LPVOID, 1) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, UlRelease, ExpandFunction(UlRelease, 4), LPVOID, 1) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, LPTSTR, STDAPICALLTYPE, SzFindCh, ExpandFunction(SzFindCh, 8), LPCTSTR, USHORT, - nullptr) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, LPTSTR, STDAPICALLTYPE, SzFindLastCh, ExpandFunction(SzFindLastCh, 8), LPCTSTR, - USHORT, nullptr) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, LPTSTR, STDAPICALLTYPE, SzFindSz, ExpandFunction(SzFindSz, 8), LPCTSTR, - LPCTSTR, nullptr) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, unsigned int, STDAPICALLTYPE, UFromSz, ExpandFunction(UFromSz, 4), LPCTSTR, 0) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrGetOneProp, ExpandFunction(HrGetOneProp, 12), - LPMAPIPROP, ULONG, LPSPropValue FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrSetOneProp, ExpandFunction(HrSetOneProp, 8), - LPMAPIPROP, LPSPropValue, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FPropExists, ExpandFunction(FPropExists, 8), LPMAPIPROP, - ULONG, FALSE) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, LPSPropValue, STDAPICALLTYPE, PpropFindProp, ExpandFunction(PpropFindProp, 12), - LPSPropValue, ULONG, ULONG, nullptr) - -DEFINE_STUB_FUNCTION_V1(LINKAGE_EXTERN_C, STDAPICALLTYPE, FreePadrlist, ExpandFunction(FreePadrlist, 4), LPADRLIST) - -DEFINE_STUB_FUNCTION_V1(LINKAGE_EXTERN_C, STDAPICALLTYPE, FreeProws, ExpandFunction(FreeProws, 4), LPSRowSet) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrSzFromEntryID, ExpandFunction(HrSzFromEntryID, 12), - ULONG, LPENTRYID, LPTSTR FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrEntryIDFromSz, ExpandFunction(HrEntryIDFromSz, 12), - LPTSTR, ULONG FAR *, LPENTRYID FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_7(LINKAGE_NO_EXTERN_C, HRESULT, STDAPICALLTYPE, HrComposeEID, ExpandFunction(HrComposeEID, 28), - LPMAPISESSION, ULONG, LPBYTE, ULONG, LPENTRYID, ULONG FAR *, LPENTRYID FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_7(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrDecomposeEID, ExpandFunction(HrDecomposeEID, 28), - LPMAPISESSION, ULONG, LPENTRYID, ULONG FAR *, LPENTRYID FAR *, ULONG FAR *, LPENTRYID FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrComposeMsgID, ExpandFunction(HrComposeMsgID, 24), - LPMAPISESSION, ULONG, LPBYTE, ULONG, LPENTRYID, LPTSTR FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrDecomposeMsgID, - ExpandFunction(HrDecomposeMsgID, 24), LPMAPISESSION, LPTSTR, ULONG FAR *, LPENTRYID FAR *, - ULONG FAR *, LPENTRYID FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, HRESULT, STDMETHODCALLTYPE, OpenStreamOnFile, - ExpandFunction(OpenStreamOnFile, 24), LPALLOCATEBUFFER, LPFREEBUFFER, ULONG, LPCTSTR, LPCTSTR, - LPSTREAM FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_7(LINKAGE_EXTERN_C, HRESULT, STDMETHODCALLTYPE, OpenTnefStream, ExpandFunction(OpenTnefStream, 28), - LPVOID, LPSTREAM, LPTSTR, ULONG, LPMESSAGE, WORD, LPITNEF FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_8(LINKAGE_EXTERN_C, HRESULT, STDMETHODCALLTYPE, OpenTnefStreamEx, - ExpandFunction(OpenTnefStreamEx, 32), LPVOID, LPSTREAM, LPTSTR, ULONG, LPMESSAGE, WORD, - LPADRBOOK, LPITNEF FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDMETHODCALLTYPE, GetTnefStreamCodepage, - ExpandFunction(GetTnefStreamCodepage, 12), LPSTREAM, ULONG FAR *, ULONG FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, UlFromSzHex, ExpandFunction(UlFromSzHex, 4), LPCTSTR, 0) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScCountNotifications, - ExpandFunction(ScCountNotifications, 12), int, LPNOTIFICATION, ULONG FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScCopyNotifications, - ExpandFunction(ScCopyNotifications, 16), int, LPNOTIFICATION, LPVOID, ULONG FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScRelocNotifications, - ExpandFunction(ScRelocNotifications, 20), int, LPNOTIFICATION, LPVOID, LPVOID, ULONG FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScCountProps, ExpandFunction(ScCountProps, 12), int, - LPSPropValue, ULONG FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScCopyProps, ExpandFunction(ScCopyProps, 16), int, - LPSPropValue, LPVOID, ULONG FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScRelocProps, ExpandFunction(ScRelocProps, 20), int, - LPSPropValue, LPVOID, LPVOID, ULONG FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, LPSPropValue, STDAPICALLTYPE, LpValFindProp, ExpandFunction(LpValFindProp, 12), - ULONG, ULONG, LPSPropValue, nullptr) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScDupPropset, ExpandFunction(ScDupPropset, 16), int, - LPSPropValue, LPALLOCATEBUFFER, LPSPropValue FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FBadRglpszW, ExpandFunction(FBadRglpszW, 8), - LPWSTR FAR *, ULONG, TRUE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FBadRowSet, ExpandFunction(FBadRowSet, 4), LPSRowSet, - TRUE) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FBadRglpNameID, ExpandFunction(FBadRglpNameID, 8), - LPMAPINAMEID FAR *, ULONG, TRUE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, FBadPropTag, ExpandFunction(FBadPropTag, 4), ULONG, - TRUE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, FBadRow, ExpandFunction(FBadRow, 4), LPSRow, TRUE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, FBadProp, ExpandFunction(FBadProp, 4), LPSPropValue, - TRUE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, FBadColumnSet, ExpandFunction(FBadColumnSet, 4), - LPSPropTagArray, TRUE) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, RTFSync, ExpandFunction(RTFSync, 12), LPMESSAGE, - ULONG, BOOL FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, WrapCompressedRTFStream, - ExpandFunction(WrapCompressedRTFStream, 12), LPSTREAM, ULONG, LPSTREAM FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, __ValidateParameters, - ExpandFunction(__ValidateParameters, 8), METHODS, void *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, __CPPValidateParameters, - ExpandFunction(__CPPValidateParameters, 8), METHODS, const LPVOID, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_2(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrValidateParameters, - ExpandFunction(HrValidateParameters, 8), METHODS, LPVOID FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, FBadSortOrderSet, ExpandFunction(FBadSortOrderSet, 4), - LPSSortOrderSet, TRUE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, BOOL, STDAPICALLTYPE, FBadEntryList, ExpandFunction(FBadEntryList, 4), - LPENTRYLIST, TRUE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, FBadRestriction, ExpandFunction(FBadRestriction, 4), - LPSRestriction, TRUE) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScUNCFromLocalPath, - ExpandFunction(ScUNCFromLocalPath, 12), LPSTR, LPSTR, UINT, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, ScLocalPathFromUNC, - ExpandFunction(ScLocalPathFromUNC, 12), LPSTR, LPSTR, UINT, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrIStorageFromStream, - ExpandFunction(HrIStorageFromStream, 16), LPUNKNOWN, LPCIID, ULONG, LPSTORAGE FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrValidateIPMSubtree, - ExpandFunction(HrValidateIPMSubtree, 20), LPMDB, ULONG, ULONG FAR *, LPSPropValue FAR *, - LPMAPIERROR FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, OpenIMsgSession, ExpandFunction(OpenIMsgSession, 12), - LPMALLOC, ULONG, LPMSGSESS FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_V1(LINKAGE_EXTERN_C, STDAPICALLTYPE, CloseIMsgSession, ExpandFunction(CloseIMsgSession, 4), - LPMSGSESS) - -DEFINE_STUB_FUNCTION_11(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, OpenIMsgOnIStg, ExpandFunction(OpenIMsgOnIStg, 44), - LPMSGSESS, LPALLOCATEBUFFER, LPALLOCATEMORE, LPFREEBUFFER, LPMALLOC, LPVOID, LPSTORAGE, - MSGCALLRELEASE FAR *, ULONG, ULONG, LPMESSAGE FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, SetAttribIMsgOnIStg, - ExpandFunction(SetAttribIMsgOnIStg, 16), LPVOID, LPSPropTagArray, LPSPropAttrArray, - LPSPropProblemArray FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, GetAttribIMsgOnIStg, - ExpandFunction(GetAttribIMsgOnIStg, 12), LPVOID, LPSPropTagArray, LPSPropAttrArray FAR *, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, SCODE, STDAPICALLTYPE, MapStorageSCode, ExpandFunction(MapStorageSCode, 4), - SCODE, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, SCODE, STDMETHODCALLTYPE, ScMAPIXFromSMAPI, "ScMAPIXFromSMAPI", LHANDLE, ULONG, - LPCIID, LPMAPISESSION FAR *, MAPI_E_CALL_FAILED); - -DEFINE_STUB_FUNCTION_11(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPIAddress, "MAPIAddress", LHANDLE, ULONG_PTR, LPSTR, - ULONG, LPSTR, ULONG, lpMapiRecipDesc, FLAGS, ULONG, LPULONG, lpMapiRecipDesc FAR *, - (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPIReadMail, "MAPIReadMail", LHANDLE, ULONG_PTR, LPSTR, - FLAGS, ULONG, lpMapiMessage FAR *, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPIResolveName, "MAPIResolveName", LHANDLE, ULONG_PTR, - LPSTR, FLAGS, ULONG, lpMapiRecipDesc FAR *, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPISendDocuments, "MAPISendDocuments", ULONG_PTR, LPSTR, - LPSTR, LPSTR, ULONG, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPILogon, "MAPILogon", ULONG_PTR, LPSTR, LPSTR, FLAGS, - ULONG, LPLHANDLE, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPILogoff, "MAPILogoff", LHANDLE, ULONG_PTR, FLAGS, ULONG, - (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPISendMail, "MAPISendMail", LHANDLE, ULONG_PTR, - lpMapiMessage, FLAGS, ULONG, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPISaveMail, "MAPISaveMail", LHANDLE, ULONG_PTR, - lpMapiMessage, FLAGS, ULONG, LPSTR, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_7(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPIFindNext, "MAPIFindNext", LHANDLE, ULONG_PTR, LPSTR, - LPSTR, FLAGS, ULONG, LPSTR, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPIDeleteMail, "MAPIDeleteMail", LHANDLE, ULONG_PTR, LPSTR, - FLAGS, ULONG, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, ULONG, FAR PASCAL, MAPIDetails, "MAPIDetails", LHANDLE, ULONG_PTR, - lpMapiRecipDesc, FLAGS, ULONG, (ULONG)MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_V1(LINKAGE_EXTERN_C, STDAPICALLTYPE, MAPICrashRecovery, ExpandFunction(MAPICrashRecovery, 4), - ULONG) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, ULONG, STDAPICALLTYPE, MAPIFreeBuffer, ExpandFunction(MAPIFreeBuffer, 4), - LPVOID, 0) - -DEFINE_STUB_FUNCTION_0(LINKAGE_EXTERN_C, LPMALLOC, STDAPICALLTYPE, MAPIGetDefaultMalloc, - ExpandFunction(MAPIGetDefaultMalloc, 0), nullptr) - -DEFINE_STUB_FUNCTION_6(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, OpenStreamOnFileW, - ExpandFunction(OpenStreamOnFileW, 24), LPALLOCATEBUFFER, LPFREEBUFFER, ULONG, LPWSTR, LPWSTR, - LPSTREAM FAR *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_7(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrCreateNewWrappedObject, - ExpandFunction(HrCreateNewWrappedObject, 28), void *, ULONG, ULONG, const IID *, const ULONG *, - BOOL, void **, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrOpenOfflineObj, - ExpandFunction(HrOpenOfflineObj, 20), ULONG, LPCWSTR, const GUID *, const GUID *, - IMAPIOfflineMgr **, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_3(LINKAGE_EXTERN_C, HRESULT, STDAPICALLTYPE, HrCreateOfflineObj, - ExpandFunction(HrCreateOfflineObj, 12), ULONG, MAPIOFFLINE_CREATEINFO *, IMAPIOfflineMgr **, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_4(LINKAGE_EXTERN_C, HRESULT, STDMETHODCALLTYPE, WrapCompressedRTFStreamEx, - ExpandFunction(WrapCompressedRTFStreamEx, 16), LPSTREAM, CONST RTF_WCSINFO *, LPSTREAM *, - RTF_WCSRETINFO *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, BOOL, WINAPI, GetDefCachedMode, ExpandFunction(GetDefCachedMode, 4), BOOL *, - FALSE) - -DEFINE_STUB_FUNCTION_1(LINKAGE_EXTERN_C, BOOL, WINAPI, GetDefCachedModeDownloadPubFoldFavs, - ExpandFunction(GetDefCachedModeDownloadPubFoldFavs, 4), BOOL *, FALSE) - -DEFINE_STUB_FUNCTION_9(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrOpenABEntryWithExchangeContext, - ExpandFunction(HrOpenABEntryWithExchangeContext, 36), LPMAPISESSION, LPMAPIUID, LPADRBOOK, ULONG, - LPENTRYID, LPCIID, ULONG, ULONG *, LPUNKNOWN *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_12(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrDoABDetailsWithExchangeContext, - ExpandFunction(HrDoABDetailsWithExchangeContext, 48), LPMAPISESSION, LPMAPIUID, LPADRBOOK, - ULONG_PTR *, LPFNDISMISS, LPVOID, ULONG, LPENTRYID, LPFNBUTTON, LPVOID, LPSTR, ULONG, - MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_11(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrDoABDetailsWithProviderUID, - ExpandFunction(HrDoABDetailsWithProviderUID, 44), LPMAPIUID, LPADRBOOK, ULONG_PTR *, - LPFNDISMISS, LPVOID, ULONG, LPENTRYID, LPFNBUTTON, LPVOID, LPSTR, ULONG, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_8(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrOpenABEntryUsingDefaultContext, - ExpandFunction(HrOpenABEntryUsingDefaultContext, 32), LPMAPISESSION, LPADRBOOK, ULONG, LPENTRYID, - LPCIID, ULONG, ULONG *, LPUNKNOWN *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_8(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrOpenABEntryWithProviderUID, - ExpandFunction(HrOpenABEntryWithProviderUID, 32), LPMAPIUID, LPADRBOOK, ULONG, LPENTRYID, LPCIID, - ULONG, ULONG *, LPUNKNOWN *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_8(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrOpenABEntryWithProviderUIDSupport, - ExpandFunction(HrOpenABEntryWithProviderUIDSupport, 32), LPMAPIUID, LPMAPISUP, ULONG, LPENTRYID, - LPCIID, ULONG, ULONG *, LPUNKNOWN *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_8(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrOpenABEntryWithResolvedRow, - ExpandFunction(HrOpenABEntryWithResolvedRow, 32), LPSRow, LPADRBOOK, ULONG, LPENTRYID, LPCIID, - ULONG, ULONG *, LPUNKNOWN *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_9(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrCompareABEntryIDsWithExchangeContext, - ExpandFunction(HrCompareABEntryIDsWithExchangeContext, 36), LPMAPISESSION, LPMAPIUID, LPADRBOOK, - ULONG, LPENTRYID, ULONG, LPENTRYID, ULONG, ULONG *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_7(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrOpenABEntryWithSupport, - ExpandFunction(HrOpenABEntryWithSupport, 28), LPMAPISUP, ULONG, LPENTRYID, LPCIID, ULONG, - ULONG *, LPUNKNOWN *, MAPI_E_CALL_FAILED) - -DEFINE_STUB_FUNCTION_5(LINKAGE_EXTERN_C, HRESULT, WINAPI, HrGetGALFromEmsmdbUID, - ExpandFunction(HrGetGALFromEmsmdbUID, 20), LPMAPISESSION, LPADRBOOK, LPMAPIUID, ULONG *, - LPENTRYID *, MAPI_E_CALL_FAILED) diff --git a/com/win32comext/mapi/src/mapi_stub_library/StubUtils.cpp b/com/win32comext/mapi/src/mapi_stub_library/StubUtils.cpp deleted file mode 100644 index 898a73fed..000000000 --- a/com/win32comext/mapi/src/mapi_stub_library/StubUtils.cpp +++ /dev/null @@ -1,330 +0,0 @@ -#include -#include -#include -#include -#include - -#if _MSC_VER < 1600 -#define nullptr NULL -#endif - -/* - * MAPI Stub Utilities - * - * Public Functions: - * - * GetPrivateMAPI() - * Obtain a handle to the MAPI DLL. This function will load the MAPI DLL - * if it hasn't already been loaded - * - * UnloadPrivateMAPI() - * Forces the MAPI DLL to be unloaded. This can cause problems if the code - * still has outstanding allocated MAPI memory, or unmatched calls to - * MAPIInitialize/MAPIUninitialize - * - * ForceOutlookMAPI() - * Instructs the stub code to always try loading the Outlook version of MAPI - * on the system, instead of respecting the system MAPI registration - * (HKLM\Software\Clients\Mail). This call must be made prior to any MAPI - * function calls. - */ -HMODULE GetPrivateMAPI(); -void UnloadPrivateMAPI(); -void ForceOutlookMAPI(); - -const WCHAR WszKeyNameMailClient[] = L"Software\\Clients\\Mail"; -const WCHAR WszValueNameDllPathEx[] = L"DllPathEx"; -const WCHAR WszValueNameDllPath[] = L"DllPath"; - -const CHAR SzValueNameMSI[] = "MSIComponentID"; -const CHAR SzValueNameLCID[] = "MSIApplicationLCID"; - -const WCHAR WszOutlookMapiClientName[] = L"Microsoft Outlook"; - -const WCHAR WszMAPISystemPath[] = L"%s\\%s"; - -static const WCHAR WszOlMAPI32DLL[] = L"olmapi32.dll"; -static const WCHAR WszMSMAPI32DLL[] = L"msmapi32.dll"; -static const WCHAR WszMapi32[] = L"mapi32.dll"; -static const WCHAR WszMapiStub[] = L"mapistub.dll"; - -static const CHAR SzFGetComponentPath[] = "FGetComponentPath"; - -// Sequence number which is incremented every time we set our MAPI handle which will -// cause a re-fetch of all stored function pointers -volatile ULONG g_ulDllSequenceNum = 1; - -// Whether or not we should ignore the system MAPI registration and always try to find -// Outlook and its MAPI DLLs -static bool s_fForceOutlookMAPI = false; - -static volatile HMODULE g_hinstMAPI = nullptr; - -HMODULE GetMAPIHandle() { return g_hinstMAPI; } - -void SetMAPIHandle(HMODULE hinstMAPI) -{ - const HMODULE hinstNULL = nullptr; - HMODULE hinstToFree = nullptr; - - if (hinstMAPI == nullptr) { - hinstToFree = static_cast(InterlockedExchangePointer( - const_cast(reinterpret_cast(&g_hinstMAPI)), static_cast(hinstNULL))); - } - else { - // Set the value only if the global is nullptr - const HMODULE hinstPrev = static_cast(InterlockedExchangePointer( - const_cast(reinterpret_cast(&g_hinstMAPI)), static_cast(hinstMAPI))); - if (nullptr != hinstPrev) { - hinstToFree = hinstMAPI; - } - - // If we've updated our MAPI handle, any previous addressed fetched via GetProcAddress are invalid, so we - // have to increment a sequence number to signal that they need to be re-fetched - InterlockedIncrement(reinterpret_cast(&g_ulDllSequenceNum)); - } - if (nullptr != hinstToFree) { - FreeLibrary(hinstToFree); - } -} - -/* - * RegQueryWszExpand - * Wrapper for RegQueryValueExW which automatically expands REG_EXPAND_SZ values - */ -DWORD RegQueryWszExpand(HKEY hKey, LPCWSTR lpValueName, LPWSTR lpValue, DWORD cchValueLen) -{ - DWORD dwType = 0; - - WCHAR rgchValue[MAX_PATH] = {0}; - DWORD dwSize = sizeof rgchValue; - - DWORD dwErr = RegQueryValueExW(hKey, lpValueName, nullptr, &dwType, reinterpret_cast(&rgchValue), &dwSize); - - if (dwErr == ERROR_SUCCESS) { - if (dwType == REG_EXPAND_SZ) { - // Expand the strings - DWORD cch = ExpandEnvironmentStringsW(rgchValue, lpValue, cchValueLen); - if ((0 == cch) || (cch > cchValueLen)) { - dwErr = ERROR_INSUFFICIENT_BUFFER; - } - } - else if (dwType == REG_SZ) { - wcscpy_s(lpValue, cchValueLen, rgchValue); - } - } - - return dwErr; -} - -/* - * GetComponentPath - * Wrapper around mapi32.dll->FGetComponentPath which maps an MSI component ID to - * a DLL location from the default MAPI client registration values - * - */ -bool GetComponentPath(LPCSTR szComponent, LPSTR szQualifier, LPSTR szDllPath, DWORD cchBufferSize, bool fInstall) -{ - bool fReturn = false; - - typedef bool(STDAPICALLTYPE * FGetComponentPathType)(LPCSTR, LPSTR, LPSTR, DWORD, bool); - - HMODULE hMapiStub = LoadLibraryW(WszMapi32); - if (!hMapiStub) - hMapiStub = LoadLibraryW(WszMapiStub); - - if (hMapiStub) { - const FGetComponentPathType pFGetCompPath = - reinterpret_cast(GetProcAddress(hMapiStub, SzFGetComponentPath)); - - fReturn = pFGetCompPath(szComponent, szQualifier, szDllPath, cchBufferSize, fInstall); - - FreeLibrary(hMapiStub); - } - - return fReturn; -} - -/* - * LoadMailClientFromMSIData - * Attempt to locate the MAPI provider DLL via HKLM\Software\Clients\Mail\(provider)\MSIComponentID - */ -HMODULE LoadMailClientFromMSIData(HKEY hkeyMapiClient) -{ - HMODULE hinstMapi = nullptr; - CHAR rgchMSIComponentID[MAX_PATH] = {0}; - CHAR rgchMSIApplicationLCID[MAX_PATH] = {0}; - CHAR rgchComponentPath[MAX_PATH] = {0}; - DWORD dwType = 0; - - DWORD dwSizeComponentID = sizeof rgchMSIComponentID; - DWORD dwSizeLCID = sizeof rgchMSIApplicationLCID; - - if (ERROR_SUCCESS == RegQueryValueExA(hkeyMapiClient, SzValueNameMSI, nullptr, &dwType, - reinterpret_cast(&rgchMSIComponentID), &dwSizeComponentID) && - ERROR_SUCCESS == RegQueryValueExA(hkeyMapiClient, SzValueNameLCID, nullptr, &dwType, - reinterpret_cast(&rgchMSIApplicationLCID), &dwSizeLCID)) { - if (GetComponentPath(rgchMSIComponentID, rgchMSIApplicationLCID, rgchComponentPath, _countof(rgchComponentPath), - false)) { - hinstMapi = LoadLibraryA(rgchComponentPath); - } - } - return hinstMapi; -} - -/* - * LoadMAPIFromSystemDir - * Fall back for loading System32\mapi32.dll if all else fails - */ -HMODULE LoadMAPIFromSystemDir() -{ - WCHAR szSystemDir[MAX_PATH] = {0}; - - if (GetSystemDirectoryW(szSystemDir, MAX_PATH)) { - WCHAR szDLLPath[MAX_PATH] = {0}; - swprintf_s(szDLLPath, _countof(szDLLPath), WszMAPISystemPath, szSystemDir, WszMapi32); - return LoadLibraryW(szDLLPath); - } - - return nullptr; -} - -/* - * LoadMailClientFromDllPath - * Attempt to locate the MAPI provider DLL via HKLM\Software\Clients\Mail\(provider)\DllPathEx - */ -HMODULE LoadMailClientFromDllPath(HKEY hkeyMapiClient) -{ - HMODULE hinstMapi = nullptr; - WCHAR rgchDllPath[MAX_PATH]; - - DWORD dwSizeDllPath = _countof(rgchDllPath); - - if (ERROR_SUCCESS == RegQueryWszExpand(hkeyMapiClient, WszValueNameDllPathEx, rgchDllPath, dwSizeDllPath)) { - hinstMapi = LoadLibraryW(rgchDllPath); - } - - if (!hinstMapi) { - dwSizeDllPath = _countof(rgchDllPath); - if (ERROR_SUCCESS == RegQueryWszExpand(hkeyMapiClient, WszValueNameDllPath, rgchDllPath, dwSizeDllPath)) { - hinstMapi = LoadLibraryW(rgchDllPath); - } - } - return hinstMapi; -} - -/* - * LoadRegisteredMapiClient - * Read the registry to discover the registered MAPI client and attempt to load its MAPI DLL. - * - * If wzOverrideProvider is specified, this function will load that MAPI Provider instead of the - * currently registered provider - */ -HMODULE LoadRegisteredMapiClient(LPCWSTR pwzProviderOverride) -{ - HMODULE hinstMapi = nullptr; - DWORD dwType; - HKEY hkey = nullptr, hkeyMapiClient = nullptr; - WCHAR rgchMailClient[MAX_PATH]; - LPCWSTR pwzProvider = pwzProviderOverride; - - // Open HKLM\Software\Clients\Mail - if (ERROR_SUCCESS == RegOpenKeyExW(HKEY_LOCAL_MACHINE, WszKeyNameMailClient, 0, KEY_READ, &hkey)) { - // If a specific provider wasn't specified, load the name of the default MAPI provider - if (!pwzProvider) { - // Get Outlook application path registry value - DWORD dwSize = sizeof(rgchMailClient); - if SUCCEEDED (RegQueryValueExW(hkey, nullptr, 0, &dwType, (LPBYTE)&rgchMailClient, &dwSize)) - - if (dwType != REG_SZ) - goto Error; - - pwzProvider = rgchMailClient; - } - - if (pwzProvider) { - if SUCCEEDED (RegOpenKeyExW(hkey, pwzProvider, 0, KEY_READ, &hkeyMapiClient)) { - hinstMapi = LoadMailClientFromMSIData(hkeyMapiClient); - - if (!hinstMapi) - hinstMapi = LoadMailClientFromDllPath(hkeyMapiClient); - } - } - } - -Error: - return hinstMapi; -} - -HMODULE GetDefaultMapiHandle() -{ - HMODULE hinstMapi = nullptr; - - // Try to respect the machine's default MAPI client settings. If the active MAPI provider - // is Outlook, don't load and instead run the logic below - if (s_fForceOutlookMAPI) - hinstMapi = LoadRegisteredMapiClient(WszOutlookMapiClientName); - else - hinstMapi = LoadRegisteredMapiClient(nullptr); - - // If MAPI still isn't loaded, load the stub from the system directory - if (!hinstMapi && !s_fForceOutlookMAPI) { - hinstMapi = LoadMAPIFromSystemDir(); - } - - return hinstMapi; -} - -/*------------------------------------------------------------------------------ - Attach to wzMapiDll(olmapi32.dll/msmapi32.dll) if it is already loaded in the - current process. -------------------------------------------------------------------------------*/ -HMODULE AttachToMAPIDll(const WCHAR *wzMapiDll) -{ - HMODULE hinstPrivateMAPI = nullptr; - GetModuleHandleExW(0UL, wzMapiDll, &hinstPrivateMAPI); - return hinstPrivateMAPI; -} - -void UnloadPrivateMAPI() -{ - const HMODULE hinstPrivateMAPI = GetMAPIHandle(); - if (nullptr != hinstPrivateMAPI) { - SetMAPIHandle(nullptr); - } -} - -void ForceOutlookMAPI(bool fForce) { s_fForceOutlookMAPI = fForce; } - -HMODULE GetPrivateMAPI() -{ - HMODULE hinstPrivateMAPI = GetMAPIHandle(); - - if (nullptr == hinstPrivateMAPI) { - // First, try to attach to olmapi32.dll if it's loaded in the process - hinstPrivateMAPI = AttachToMAPIDll(WszOlMAPI32DLL); - - // If that fails try msmapi32.dll, for Outlook 11 and below - // Only try this in the static lib, otherwise msmapi32.dll will attach to itself. - if (nullptr == hinstPrivateMAPI) { - hinstPrivateMAPI = AttachToMAPIDll(WszMSMAPI32DLL); - } - - // If MAPI isn't loaded in the process yet, then find the path to the DLL and - // load it manually. - if (nullptr == hinstPrivateMAPI) { - hinstPrivateMAPI = GetDefaultMapiHandle(); - } - - if (nullptr != hinstPrivateMAPI) { - SetMAPIHandle(hinstPrivateMAPI); - } - - // Reason - if for any reason there is an instance already loaded, SetMAPIHandle() - // will free the new one and reuse the old one - // So we fetch the instance from the global again - return GetMAPIHandle(); - } - - return hinstPrivateMAPI; -} diff --git a/setup.py b/setup.py index 9d225e6ec..0a76dd80b 100644 --- a/setup.py +++ b/setup.py @@ -1544,7 +1544,7 @@ def finalize_options(self): "mapi", libraries="advapi32", pch_header="PythonCOM.h", - include_dirs=["{mapi}/mapi_headers".format(**dirs)], + include_dirs=["{mapi}/MapiStubLibrary/include".format(**dirs)], sources=( """ {mapi}/mapi.i {mapi}/mapi.cpp @@ -1570,8 +1570,8 @@ def finalize_options(self): {mapi}/PyIMAPIAdviseSink.cpp {mapi}/mapiutil.cpp {mapi}/mapiguids.cpp - {mapi}/mapi_stub_library/MapiStubLibrary.cpp - {mapi}/mapi_stub_library/StubUtils.cpp + {mapi}/MAPIStubLibrary/library/mapiStubLibrary.cpp + {mapi}/MAPIStubLibrary/library/stubutils.cpp """.format( **dirs ) @@ -1580,7 +1580,7 @@ def finalize_options(self): WinExt_win32com_mapi( "exchange", libraries="advapi32 legacy_stdio_definitions", - include_dirs=["{mapi}/mapi_headers".format(**dirs)], + include_dirs=["{mapi}/MapiStubLibrary/include".format(**dirs)], sources=( """ {mapi}/exchange.i {mapi}/exchange.cpp @@ -1588,8 +1588,8 @@ def finalize_options(self): {mapi}/PyIExchangeManageStoreEx.i {mapi}/PyIExchangeManageStoreEx.cpp {mapi}/mapiutil.cpp {mapi}/exchangeguids.cpp - {mapi}/mapi_stub_library/MapiStubLibrary.cpp - {mapi}/mapi_stub_library/StubUtils.cpp + {mapi}/MAPIStubLibrary/library/mapiStubLibrary.cpp + {mapi}/MAPIStubLibrary/library/stubutils.cpp """.format( **dirs ) From 6fa1b68e973b106475330327500f0a62d10d3630 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 14:00:53 -0400 Subject: [PATCH 18/34] Simplify KeyError fallbacks that don't need to be lazy (#2330) --- CHANGES.txt | 2 +- Pythonwin/pywin/Demos/cmdserver.py | 5 +--- com/win32com/client/combrowse.py | 20 ++++------------ com/win32com/servers/dictionary.py | 5 +--- com/win32com/test/testExchange.py | 5 +--- com/win32comext/axdebug/adb.py | 7 +----- com/win32comext/axdebug/codecontainer.py | 1 - com/win32comext/axdebug/util.py | 6 +---- com/win32comext/axscript/client/debug.py | 6 +---- com/win32comext/axscript/client/pyscript.py | 7 ++---- setup.py | 26 +++++++++------------ win32/Lib/netbios.py | 5 +--- win32/Lib/win32serviceutil.py | 7 +++--- win32/Lib/win32timezone.py | 1 + 14 files changed, 29 insertions(+), 74 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 13d8b1da2..84b8d5906 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,7 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- -* Improved handling of dict iterations (removes Python 2 support code, small general speed improvement) (#2332, @Avasam) +* Improved handling of dict iterations and fallbacks (removes Python 2 support code, small general speed improvement) (#2332, #2330, @Avasam) * Fixed "Open GL Demo" (`Pythonwin/pywin/Demos/openGLDemo.py`) and restore "Font" demo in `Pythonwin/pywin/Demos/guidemo.py` (#2345, @Avasam) Build 308, released 2024-10-12 diff --git a/Pythonwin/pywin/Demos/cmdserver.py b/Pythonwin/pywin/Demos/cmdserver.py index 4ec6e49b3..d3e24f401 100644 --- a/Pythonwin/pywin/Demos/cmdserver.py +++ b/Pythonwin/pywin/Demos/cmdserver.py @@ -37,10 +37,7 @@ def unregister(self): def getwriter(self): "Return the current thread's writer, default sys.stdout" - try: - return self.writers[_thread.get_ident()] - except KeyError: - return self.origStdOut + self.writers.get(_thread.get_ident(), self.origStdOut) def write(self, str): "Write to the current thread's writer, default sys.stdout" diff --git a/com/win32com/client/combrowse.py b/com/win32com/client/combrowse.py index 2f7dc4004..d2abacf14 100644 --- a/com/win32com/client/combrowse.py +++ b/com/win32com/client/combrowse.py @@ -265,10 +265,7 @@ class HLITypeLibEntry(HLICOM): def GetText(self): tlb, index = self.myobject name, doc, ctx, helpFile = tlb.GetDocumentation(index) - try: - typedesc = HLITypeKinds[tlb.GetTypeInfoType(index)][1] - except KeyError: - typedesc = "Unknown!" + typedesc = HLITypeKinds.get(tlb.GetTypeInfoType(index), (None, "Unknown!"))[1] return name + " - " + typedesc def GetSubList(self): @@ -448,10 +445,7 @@ def GetText(self): def MakeReturnTypeName(self, typ): justtyp = typ & pythoncom.VT_TYPEMASK - try: - typname = self.vartypes[justtyp] - except KeyError: - typname = "?Bad type?" + typname = self.vartypes.get(justtyp, "?Bad type?") for flag, desc in self.type_flags: if flag & typ: typname = f"{desc}({typname})" @@ -493,15 +487,9 @@ def GetSubList(self): val += f" (Default={default})" ret.append(browser.MakeHLI(val, "Argument")) - try: - fkind = self.funckinds[fd[3]] - except KeyError: - fkind = "Unknown" + fkind = self.funckinds.get(fd[3], "Unknown") ret.append(browser.MakeHLI(fkind, "Function Kind")) - try: - ikind = self.invokekinds[fd[4]] - except KeyError: - ikind = "Unknown" + ikind = self.invokekinds.get([fd[4]], "Unknown") ret.append(browser.MakeHLI(ikind, "Invoke Kind")) # 5 = call conv # 5 = offset vtbl diff --git a/com/win32com/servers/dictionary.py b/com/win32com/servers/dictionary.py index f8a7eb249..cb7eb0279 100644 --- a/com/win32com/servers/dictionary.py +++ b/com/win32com/servers/dictionary.py @@ -85,10 +85,7 @@ def _invokeex_(self, dispid, lcid, wFlags, args, kwargs, serviceProvider): if wFlags & (DISPATCH_METHOD | DISPATCH_PROPERTYGET): if l > 1: raise COMException(scode=winerror.DISP_E_BADPARAMCOUNT) - try: - return self._obj_[key] - except KeyError: - return None # unknown keys return None (VT_NULL) + return self._obj_.get(key) # unknown keys return None (VT_NULL) if l != 2: raise COMException(scode=winerror.DISP_E_BADPARAMCOUNT) diff --git a/com/win32com/test/testExchange.py b/com/win32com/test/testExchange.py index fa2ac5cb0..c20b9c0d4 100644 --- a/com/win32com/test/testExchange.py +++ b/com/win32com/test/testExchange.py @@ -86,10 +86,7 @@ def TestUser(session): print("User has %d fields" % len(fields)) for f in range(len(fields)): field = fields[f + 1] - try: - id = PropTagsById[field.ID] - except KeyError: - id = field.ID + id = PropTagsById.get(field.ID, field.ID) print(f"{field.Name}/{id}={field.Value}") diff --git a/com/win32comext/axdebug/adb.py b/com/win32comext/axdebug/adb.py index b947627c9..191041809 100644 --- a/com/win32comext/axdebug/adb.py +++ b/com/win32comext/axdebug/adb.py @@ -19,12 +19,7 @@ def fnull(*args): pass -try: - os.environ["DEBUG_AXDEBUG"] - debugging = 1 -except KeyError: - debugging = 0 - +debugging = "DEBUG_AXDEBUG" in os.environ traceenter = fnull # trace enter of functions tracev = fnull # verbose trace diff --git a/com/win32comext/axdebug/codecontainer.py b/com/win32comext/axdebug/codecontainer.py index babbd6fc4..e7502845d 100644 --- a/com/win32comext/axdebug/codecontainer.py +++ b/com/win32comext/axdebug/codecontainer.py @@ -197,7 +197,6 @@ def GetCodeContextAtPosition(self, charPos): charPos = self.GetPositionOfLine(lineNo) try: cc = self.codeContexts[charPos] - # trace(" GetContextOfPos using existing") except KeyError: cc = self._MakeContextAtPosition(charPos) self.codeContexts[charPos] = cc diff --git a/com/win32comext/axdebug/util.py b/com/win32comext/axdebug/util.py index 3b4efad93..f3c23523a 100644 --- a/com/win32comext/axdebug/util.py +++ b/com/win32comext/axdebug/util.py @@ -10,11 +10,7 @@ import winerror from win32com.server.exception import COMException -try: - os.environ["DEBUG_AXDEBUG"] - debugging = 1 -except KeyError: - debugging = 0 +debugging = "DEBUG_AXDEBUG" in os.environ def trace(*args): diff --git a/com/win32comext/axscript/client/debug.py b/com/win32comext/axscript/client/debug.py index 554f96095..cceb01db4 100644 --- a/com/win32comext/axscript/client/debug.py +++ b/com/win32comext/axscript/client/debug.py @@ -12,11 +12,7 @@ from win32com.server.exception import COMException from win32com.util import IIDToInterfaceName -try: - os.environ["DEBUG_AXDEBUG"] - debuggingTrace = 1 # Should we print "trace" output? -except KeyError: - debuggingTrace = 0 +debuggingTrace = "DEBUG_AXDEBUG" in os.environ # Should we print "trace" output? def trace(*args): diff --git a/com/win32comext/axscript/client/pyscript.py b/com/win32comext/axscript/client/pyscript.py index 6b9ee53ab..a486b1229 100644 --- a/com/win32comext/axscript/client/pyscript.py +++ b/com/win32comext/axscript/client/pyscript.py @@ -160,15 +160,12 @@ def Register(self): self.attributeObject = NamedScriptAttribute(self) if self.dispatch: # Need to avoid the new Python "lazy" dispatch behaviour. + olerepr, clsid = None try: engine = self.GetEngine() - olerepr = clsid = None typeinfo = self.dispatch.GetTypeInfo() clsid = typeinfo.GetTypeAttr()[0] - try: - olerepr = engine.mapKnownCOMTypes[clsid] - except KeyError: - pass + olerepr = engine.mapKnownCOMTypes.get(clsid) except pythoncom.com_error: typeinfo = None if olerepr is None: diff --git a/setup.py b/setup.py index 0a76dd80b..ce0120e24 100644 --- a/setup.py +++ b/setup.py @@ -820,21 +820,17 @@ def swig_sources(self, sources, ext=None): else: swig_cmd.append("-DSWIG_PY32BIT") target = swig_targets[source] - try: - interface_parent = swig_interface_parents[ - os.path.basename(os.path.splitext(source)[0]) - ] - except KeyError: - # "normal" swig file - no special win32 issues. - pass - else: - # Using win32 extensions to SWIG for generating COM classes. - if interface_parent is not None: - # generating a class, not a module. - swig_cmd.append("-pythoncom") - if interface_parent: - # A class deriving from other than the default - swig_cmd.extend(["-com_interface_parent", interface_parent]) + interface_parent = swig_interface_parents.get( + os.path.basename(os.path.splitext(source)[0]), + None, # "normal" swig file - no special win32 issues. + ) + # Using win32 extensions to SWIG for generating COM classes. + if interface_parent is not None: + # generating a class, not a module. + swig_cmd.append("-pythoncom") + if interface_parent: + # A class deriving from other than the default + swig_cmd.extend(["-com_interface_parent", interface_parent]) # This 'newer' check helps Python 2.2 builds, which otherwise # *always* regenerate the .cpp files, meaning every future diff --git a/win32/Lib/netbios.py b/win32/Lib/netbios.py index fe7f28b36..3da1291c9 100644 --- a/win32/Lib/netbios.py +++ b/win32/Lib/netbios.py @@ -210,10 +210,7 @@ def __init__(self, items): def _pack(self): vals = [] for format, name in self._items: - try: - vals.append(self.__dict__[name]) - except KeyError: - vals.append(None) + vals.append(self.__dict__.get(name)) self._buffer_[:] = struct.pack(*(self._format,) + tuple(vals)) diff --git a/win32/Lib/win32serviceutil.py b/win32/Lib/win32serviceutil.py index 2871b9056..720a5b38d 100644 --- a/win32/Lib/win32serviceutil.py +++ b/win32/Lib/win32serviceutil.py @@ -751,10 +751,9 @@ def HandleCommandLine( "delayed": win32service.SERVICE_AUTO_START, ## ChangeServiceConfig2 called later "disabled": win32service.SERVICE_DISABLED, } - try: - startup = map[val.lower()] - except KeyError: - print("'%s' is not a valid startup option" % val) + startup = map.get(val.lower()) + if not startup: + print(f"{val!r} is not a valid startup option") if val.lower() == "delayed": delayedstart = True elif val.lower() == "auto": diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py index 07b30284f..a5b3039f6 100644 --- a/win32/Lib/win32timezone.py +++ b/win32/Lib/win32timezone.py @@ -989,6 +989,7 @@ def get(self, key, default=None): If default is not given, it defaults to None, so that this method never raises a KeyError. """ + # Necessary to use our own __getitem__ and not dict's try: return self[key] except KeyError: From f01d67f2943b46f7f3c05569853f7e21ef2d0d4d Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 14:01:12 -0400 Subject: [PATCH 19/34] Fix last reportUndefinedVariable error (#2326) --- CHANGES.txt | 1 + Pythonwin/pywin/debugger/debugger.py | 13 ++++++------- pyrightconfig.json | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 84b8d5906..0e7a52654 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,7 @@ Coming in build 309, as yet unreleased * Improved handling of dict iterations and fallbacks (removes Python 2 support code, small general speed improvement) (#2332, #2330, @Avasam) * Fixed "Open GL Demo" (`Pythonwin/pywin/Demos/openGLDemo.py`) and restore "Font" demo in `Pythonwin/pywin/Demos/guidemo.py` (#2345, @Avasam) +* Fixed accidentally trying to raise an undefined name instead of an `Exception` in `Pythonwin/pywin/debugger/debugger.py` (#2326, @Avasam) Build 308, released 2024-10-12 ------------------------------ diff --git a/Pythonwin/pywin/debugger/debugger.py b/Pythonwin/pywin/debugger/debugger.py index dca59b8c7..72b9cf2dc 100644 --- a/Pythonwin/pywin/debugger/debugger.py +++ b/Pythonwin/pywin/debugger/debugger.py @@ -869,15 +869,14 @@ def RespondDebuggerState(self, state): elif state == DBGSTATE_RUNNING: # Code is running under the debugger. title = " - running" elif state == DBGSTATE_BREAK: # We are at a breakpoint or stepping or whatever. - if self.bAtException: - if self.bAtPostMortem: - title = " - post mortem exception" - else: - title = " - exception" - else: + if not self.bAtException: title = " - break" + elif self.bAtPostMortem: + title = " - post mortem exception" + else: + title = " - exception" else: - raise error("Invalid debugger state passed!") + raise ValueError("Invalid debugger state passed!") win32ui.GetMainFrame().SetWindowText( win32ui.LoadString(win32ui.IDR_MAINFRAME) + title ) diff --git a/pyrightconfig.json b/pyrightconfig.json index d90035dc3..1721da1a2 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -39,9 +39,8 @@ "reportOptionalSubscript": "warning", // Needs fixes in types-pywin32 and requires Python 3.8 to annotate ambiguous global variables "reportUnnecessaryComparison": "warning", - // TODO: Leave Unbound/Undefined to their own PR(s) + // TODO: Leave Unbound its own PR(s) "reportUnboundVariable": "warning", - "reportUndefinedVariable": "warning", // Too many dynamically generated modules. This will require type stubs to properly fix. "reportMissingImports": "warning", // IDEM, but happens when pywin32 is not in site-packages but module is found from typeshed. From dbd08439916d155a018007d68d22facf8e3ab834 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 14:01:47 -0400 Subject: [PATCH 20/34] Runtime deprecation of win2kras (#2356) --- CHANGES.txt | 1 + win32/Lib/win2kras.py | 21 ++++++++++++++------- win32/winxpgui.py | 12 ++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0e7a52654..c76daddd8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- +* Add runtime deprecation warning of `win2kras`, use `win32ras` instead (#2356, @Avasam) * Improved handling of dict iterations and fallbacks (removes Python 2 support code, small general speed improvement) (#2332, #2330, @Avasam) * Fixed "Open GL Demo" (`Pythonwin/pywin/Demos/openGLDemo.py`) and restore "Font" demo in `Pythonwin/pywin/Demos/guidemo.py` (#2345, @Avasam) * Fixed accidentally trying to raise an undefined name instead of an `Exception` in `Pythonwin/pywin/debugger/debugger.py` (#2326, @Avasam) diff --git a/win32/Lib/win2kras.py b/win32/Lib/win2kras.py index f1c18b3ac..9e3724811 100644 --- a/win32/Lib/win2kras.py +++ b/win32/Lib/win2kras.py @@ -1,7 +1,14 @@ -# win2kras used to be an extension module with wrapped the "new" RAS functions -# in Windows 2000, so win32ras could still be used on NT/etc. -# I think in 2021 we can be confident pywin32 is not used on earlier OSs, so -# that functionality is now in win32ras. -# -# This exists just to avoid breaking old scripts. -from win32ras import * +"""\ +win2kras used to be an extension module with wrapped the "new" RAS functions \ +in Windows 2000, so win32ras could still be used on NT/etc. +I think in 2021 we can be confident pywin32 is not used on earlier OSs, so \ +that functionality is now in win32ras. + +This exists just to avoid breaking old scripts.\ +""" + +import warnings + +from win32ras import * # nopycln: import + +warnings.warn(str(__doc__), category=DeprecationWarning) diff --git a/win32/winxpgui.py b/win32/winxpgui.py index 7935e96ff..e27fd58b9 100644 --- a/win32/winxpgui.py +++ b/win32/winxpgui.py @@ -3,19 +3,11 @@ by `win32gui` and `win32console.GetConsoleWindow`. Use those instead. \ """ -from __future__ import annotations - import warnings -from win32console import ( +from win32console import ( # nopycln: import GetConsoleWindow as GetConsoleWindow, # noqa: PLC0414 # Explicit re-export ) from win32gui import * -warnings.warn( - """\ -The `winxpgui` module is obsolete and has been completely replaced \ -by `win32gui` and `win32console.GetConsoleWindow`. Use those instead. \ -""", - category=DeprecationWarning, -) +warnings.warn(str(__doc__), category=DeprecationWarning) From a6ca37ae9aec4a3d644cc80c08f18a88bea32a9b Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 14:02:54 -0400 Subject: [PATCH 21/34] Fix `win32timezone.TimeZoneInfo.__init_from_other` and added tests (#2339) --- CHANGES.txt | 3 ++- win32/Lib/win32timezone.py | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c76daddd8..316fee89c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,8 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- -* Add runtime deprecation warning of `win2kras`, use `win32ras` instead (#2356, @Avasam) +* Fixed `win32timezone.TimeZoneInfo` initialization from a `[DYNAMIC_]TIME_ZONE_INFORMATION` (#2339, @Avasam) +* Added runtime deprecation warning of `win2kras`, use `win32ras` instead (#2356, @Avasam) * Improved handling of dict iterations and fallbacks (removes Python 2 support code, small general speed improvement) (#2332, #2330, @Avasam) * Fixed "Open GL Demo" (`Pythonwin/pywin/Demos/openGLDemo.py`) and restore "Font" demo in `Pythonwin/pywin/Demos/guidemo.py` (#2345, @Avasam) * Fixed accidentally trying to raise an undefined name instead of an `Exception` in `Pythonwin/pywin/debugger/debugger.py` (#2326, @Avasam) diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py index a5b3039f6..a62fc5bfb 100644 --- a/win32/Lib/win32timezone.py +++ b/win32/Lib/win32timezone.py @@ -316,7 +316,7 @@ class TIME_ZONE_INFORMATION(_SimpleStruct): ] -class DYNAMIC_TIME_ZONE_INFORMATION(_SimpleStruct): +class DYNAMIC_TIME_ZONE_INFORMATION(TIME_ZONE_INFORMATION): _fields_ = TIME_ZONE_INFORMATION._fields_ + [ ("key_name", str), ("dynamic_daylight_time_disabled", bool), @@ -334,10 +334,25 @@ class TimeZoneDefinition(DYNAMIC_TIME_ZONE_INFORMATION): def __init__(self, *args, **kwargs): """ + >>> test_args = [1] * 44 + Try to construct a TimeZoneDefinition from + a) [DYNAMIC_]TIME_ZONE_INFORMATION args - b) another TimeZoneDefinition + >>> TimeZoneDefinition(*test_args).bias + datetime.timedelta(seconds=60) + + b) another TimeZoneDefinition or [DYNAMIC_]TIME_ZONE_INFORMATION + >>> TimeZoneDefinition(TimeZoneDefinition(*test_args)).bias + datetime.timedelta(seconds=60) + >>> TimeZoneDefinition(DYNAMIC_TIME_ZONE_INFORMATION(*test_args)).bias + datetime.timedelta(seconds=60) + >>> TimeZoneDefinition(TIME_ZONE_INFORMATION(*test_args)).bias + datetime.timedelta(seconds=60) + c) a byte structure (using _from_bytes) + >>> TimeZoneDefinition(bytes(test_args)).bias + datetime.timedelta(days=11696, seconds=46140) """ try: super().__init__(*args, **kwargs) @@ -357,7 +372,7 @@ def __init__(self, *args, **kwargs): except TypeError: pass - raise TypeError("Invalid arguments for %s" % self.__class__) + raise TypeError(f"Invalid arguments for {self.__class__}") def __init_from_bytes( self, @@ -389,7 +404,7 @@ def __init_from_other(self, other): raise TypeError("Not a TIME_ZONE_INFORMATION") for name in other.field_names(): # explicitly get the value from the underlying structure - value = super(TimeZoneDefinition, other).__getattribute__(other, name) + value = super(TIME_ZONE_INFORMATION, other).__getattribute__(name) setattr(self, name, value) # consider instead of the loop above just copying the memory directly # size = max(ctypes.sizeof(DYNAMIC_TIME_ZONE_INFO), ctypes.sizeof(other)) From c670569e124e518f712ac20818f2412727b05a1b Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 15:11:17 -0400 Subject: [PATCH 22/34] Remove temporary `win32com.server.policy` reexports hack marked for removal over 25 years ago (#2344) --- CHANGES.txt | 2 ++ com/win32com/server/policy.py | 12 ------------ com/win32comext/axdebug/util.py | 5 +++-- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 316fee89c..0868cac2f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,8 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- +* Remove temporary `win32com.server.policy` reexports hack (#2344, @Avasam) + Import `DispatcherWin32trace` and `DispatcherTrace` from `win32com.server.dispatcher` instead. * Fixed `win32timezone.TimeZoneInfo` initialization from a `[DYNAMIC_]TIME_ZONE_INFORMATION` (#2339, @Avasam) * Added runtime deprecation warning of `win2kras`, use `win32ras` instead (#2356, @Avasam) * Improved handling of dict iterations and fallbacks (removes Python 2 support code, small general speed improvement) (#2332, #2330, @Avasam) diff --git a/com/win32com/server/policy.py b/com/win32com/server/policy.py index a907bd620..2c6bc4472 100644 --- a/com/win32com/server/policy.py +++ b/com/win32com/server/policy.py @@ -801,15 +801,3 @@ def _import_module(mname): # Eeek - result of _import_ is "win32com" - not "win32com.a.b.c" # Get the full module from sys.modules return sys.modules[mname] - - -####### -# -# Temporary hacks until all old code moves. -# -# These have been moved to a new source file, but some code may -# still reference them here. These will end up being removed. -try: - from .dispatcher import DispatcherTrace, DispatcherWin32trace -except ImportError: # Quite likely a frozen executable that doesn't need dispatchers - pass diff --git a/com/win32comext/axdebug/util.py b/com/win32comext/axdebug/util.py index f3c23523a..424c529df 100644 --- a/com/win32comext/axdebug/util.py +++ b/com/win32comext/axdebug/util.py @@ -5,6 +5,7 @@ import sys import win32api +import win32com.server.dispatcher import win32com.server.policy import win32com.server.util import winerror @@ -54,9 +55,9 @@ def RaiseNotImpl(who=None): raise COMException(scode=winerror.E_NOTIMPL) -class Dispatcher(win32com.server.policy.DispatcherWin32trace): +class Dispatcher(win32com.server.dispatcher.DispatcherWin32trace): def __init__(self, policyClass, object): - win32com.server.policy.DispatcherTrace.__init__(self, policyClass, object) + win32com.server.dispatcher.DispatcherTrace.__init__(self, policyClass, object) import win32traceutil # Sets up everything. # print(f"Object with win32trace dispatcher created ({object})") From 79ac904978f2e5ccfbd4cd5a09f408a96a9bb8c0 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 18:18:23 -0400 Subject: [PATCH 23/34] Fail sooner on creating invalid `TimeZoneInfo` (#2338) --- CHANGES.txt | 3 ++- win32/Lib/win32timezone.py | 45 ++++++++++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0868cac2f..a88445e9b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,8 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- -* Remove temporary `win32com.server.policy` reexports hack (#2344, @Avasam) +* Fail sooner on invalid `win32timezone.TimeZoneInfo` creation (#2338, @Avasam) +* Removed temporary `win32com.server.policy` reexports hack (#2344, @Avasam) Import `DispatcherWin32trace` and `DispatcherTrace` from `win32com.server.dispatcher` instead. * Fixed `win32timezone.TimeZoneInfo` initialization from a `[DYNAMIC_]TIME_ZONE_INFORMATION` (#2339, @Avasam) * Added runtime deprecation warning of `win2kras`, use `win32ras` instead (#2356, @Avasam) diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py index a62fc5bfb..53107542d 100644 --- a/win32/Lib/win32timezone.py +++ b/win32/Lib/win32timezone.py @@ -1,5 +1,4 @@ # -*- coding: UTF-8 -*- -from __future__ import annotations """ win32timezone: @@ -33,7 +32,7 @@ (note that the result of utcoffset call will be different based on when now was generated, unless standard time is always used) ->>> now = datetime.datetime.now(TimeZoneInfo('Mountain Standard Time', True)) +>>> now = datetime.datetime.now(win32timezone.TimeZoneInfo('Mountain Standard Time', True)) >>> now.utcoffset() datetime.timedelta(days=-1, seconds=61200) @@ -77,10 +76,15 @@ It's possible to construct a TimeZoneInfo from a TimeZoneDescription including the currently-defined zone. ->>> tz = win32timezone.TimeZoneInfo(TimeZoneDefinition.current()) +>>> code, info = win32timezone.TimeZoneDefinition.current() +>>> tz = win32timezone.TimeZoneInfo(info, not code) >>> tz == pickle.loads(pickle.dumps(tz)) True +Although it's easier to use TimeZoneInfo.local() to get the local info +>>> tz == TimeZoneInfo.local() +True + >>> aest = win32timezone.TimeZoneInfo('AUS Eastern Standard Time') >>> est = win32timezone.TimeZoneInfo('E. Australia Standard Time') >>> dt = datetime.datetime(2006, 11, 11, 1, 0, 0, tzinfo = aest) @@ -233,6 +237,8 @@ """ +from __future__ import annotations + import datetime import logging import operator @@ -504,19 +510,41 @@ class TimeZoneInfo(datetime.tzinfo): >>> offsets = set(tzi.utcoffset(year) for year in subsequent_years) >>> len(offsets) 1 + + Cannot create a `TimeZoneInfo` with an invalid name. + >>> TimeZoneInfo('Does not exist') + Traceback (most recent call last): + ... + ValueError: Timezone Name 'Does not exist' not found + >>> TimeZoneInfo(None) + Traceback (most recent call last): + ... + ValueError: subkey name cannot be empty + >>> TimeZoneInfo("") + Traceback (most recent call last): + ... + ValueError: subkey name cannot be empty """ # this key works for WinNT+, but not for the Win95 line. tzRegKey = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones" - def __init__(self, param=None, fix_standard_time=False): + def __init__( + self, + param: str | TimeZoneDefinition, + fix_standard_time: bool = False, + ) -> None: if isinstance(param, TimeZoneDefinition): self._LoadFromTZI(param) - if isinstance(param, str): + else: self.timeZoneName = param self._LoadInfoFromKey() self.fixedStandardTime = fix_standard_time + # For tzinfo pickle support + def __getinitargs__(self) -> tuple[TimeZoneDefinition, bool]: + return (self.staticInfo, self.fixedStandardTime) + def _FindTimeZoneKey(self): """Find the registry key for the time zone name (self.timeZoneName).""" # for multi-language compatability, match the time zone name in the @@ -528,8 +556,9 @@ def _FindTimeZoneKey(self): key = _RegKeyDict.open(winreg.HKEY_LOCAL_MACHINE, self.tzRegKey) try: result = key.subkey(timeZoneName) - except Exception: - raise ValueError("Timezone Name %s not found." % timeZoneName) + except FileNotFoundError: + # Don't catch ValueError, keep the original error message + raise ValueError(f"Timezone Name {timeZoneName!r} not found") return result def _LoadInfoFromKey(self): @@ -821,6 +850,8 @@ def open(cls, *args, **kargs): return _RegKeyDict(winreg.OpenKeyEx(*args, **kargs)) def subkey(self, name): + if not name: + raise ValueError("subkey name cannot be empty") return _RegKeyDict(winreg.OpenKeyEx(self.key, name)) def __load_values(self): From 41da8be815e213e4e67dda644ef2d97781c2d94f Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 13 Oct 2024 19:43:01 -0400 Subject: [PATCH 24/34] pycln: cleanup of more imports (#2342) --- AutoDuck/TOCToHHK.py | 1 - .../pywin/framework/editor/ModuleBrowser.py | 2 +- Pythonwin/pywin/framework/editor/__init__.py | 4 +- Pythonwin/pywin/framework/editor/document.py | 1 - Pythonwin/pywin/framework/interact.py | 2 +- Pythonwin/pywin/framework/intpydde.py | 8 ++- Pythonwin/pywin/framework/toolmenu.py | 2 - Pythonwin/pywin/scintilla/bindings.py | 4 +- Pythonwin/pywin/scintilla/view.py | 2 +- Pythonwin/pywin/test/test_pywin.py | 2 +- adodbapi/__init__.py | 1 + adodbapi/test/adodbapitest.py | 1 - com/win32com/client/combrowse.py | 3 - com/win32com/client/util.py | 2 +- com/win32com/demos/excelAddin.py | 2 +- com/win32com/demos/iebutton.py | 3 - com/win32com/server/dispatcher.py | 2 +- com/win32com/server/policy.py | 4 +- com/win32com/servers/test_pycomtest.py | 1 - com/win32com/test/testADOEvents.py | 2 +- com/win32com/test/testAXScript.py | 3 +- com/win32com/test/testDictionary.py | 5 +- com/win32com/test/testExchange.py | 3 +- com/win32com/test/testMSOffice.py | 2 +- com/win32com/test/testMSOfficeEvents.py | 2 +- com/win32com/test/testPyComTest.py | 4 +- com/win32com/test/testServers.py | 3 +- com/win32com/test/testall.py | 3 +- com/win32com/test/util.py | 4 +- .../authorization/demos/EditSecurity.py | 25 +------- .../demos/EditServiceSecurity.py | 19 ------ com/win32comext/axscript/client/debug.py | 3 - com/win32comext/axscript/client/pydumper.py | 1 - com/win32comext/axscript/client/pyscript.py | 1 - .../axscript/client/scriptdispatch.py | 1 - com/win32comext/axscript/server/axsite.py | 1 - com/win32comext/axscript/test/leakTest.py | 1 - com/win32comext/axscript/test/testHost4Dbg.py | 3 - com/win32comext/mapi/emsabtags.py | 1 + com/win32comext/propsys/test/testpropsys.py | 2 +- .../shell/demos/servers/column_provider.py | 1 - .../shell/demos/servers/copy_hook.py | 2 +- .../shell/demos/servers/icon_handler.py | 2 +- .../shell/demos/servers/shell_view.py | 1 - isapi/install.py | 3 +- pycln.toml | 34 ++++++----- win32/Demos/security/account_rights.py | 1 - win32/Demos/security/get_policy_info.py | 1 - win32/Demos/security/list_rights.py | 1 - win32/Demos/security/localized_names.py | 7 ++- win32/Demos/security/query_information.py | 2 +- win32/Demos/security/set_policy_info.py | 1 - win32/Demos/service/pipeTestService.py | 19 +++--- win32/Demos/service/pipeTestServiceClient.py | 9 ++- win32/Demos/win32clipboardDemo.py | 13 +++- win32/Demos/win32comport_demo.py | 34 ++++++++++- win32/Demos/win32gui_menu.py | 61 ++++++++++++++++++- win32/Lib/winxptheme.py | 2 +- win32/test/test_clipboard.py | 13 +++- win32/test/test_win32crypt.py | 16 ++++- win32/test/test_win32gui.py | 1 - win32/test/test_win32inet.py | 21 ++++++- win32/test/test_win32net.py | 1 - 63 files changed, 231 insertions(+), 151 deletions(-) diff --git a/AutoDuck/TOCToHHK.py b/AutoDuck/TOCToHHK.py index edeb8457e..81fd75a88 100644 --- a/AutoDuck/TOCToHHK.py +++ b/AutoDuck/TOCToHHK.py @@ -1,4 +1,3 @@ -import os.path import sys """ diff --git a/Pythonwin/pywin/framework/editor/ModuleBrowser.py b/Pythonwin/pywin/framework/editor/ModuleBrowser.py index 634de4391..a0210eca8 100644 --- a/Pythonwin/pywin/framework/editor/ModuleBrowser.py +++ b/Pythonwin/pywin/framework/editor/ModuleBrowser.py @@ -8,7 +8,7 @@ import win32con import win32ui from pywin.mfc import afxres -from pywin.tools import browser, hierlist +from pywin.tools import hierlist class HierListCLBRModule(hierlist.HierListItem): diff --git a/Pythonwin/pywin/framework/editor/__init__.py b/Pythonwin/pywin/framework/editor/__init__.py index 59a52cd34..f23724492 100644 --- a/Pythonwin/pywin/framework/editor/__init__.py +++ b/Pythonwin/pywin/framework/editor/__init__.py @@ -100,4 +100,6 @@ def SetEditorFontOption(option, newValue): SetEditorOption(option, str(newValue)) -from pywin.framework.editor.color.coloreditor import editorTemplate +from pywin.framework.editor.color.coloreditor import ( # nopycln: import + editorTemplate as editorTemplate, # Adds doc template & Re-export +) diff --git a/Pythonwin/pywin/framework/editor/document.py b/Pythonwin/pywin/framework/editor/document.py index a78cb3eea..1579dbfe6 100644 --- a/Pythonwin/pywin/framework/editor/document.py +++ b/Pythonwin/pywin/framework/editor/document.py @@ -8,7 +8,6 @@ import win32con import win32ui from pywin.framework.editor import GetEditorOption -from pywin.mfc import docview, object BAK_NONE = 0 BAK_DOT_BAK = 1 diff --git a/Pythonwin/pywin/framework/interact.py b/Pythonwin/pywin/framework/interact.py index 1d940c3ca..c26bf6e82 100644 --- a/Pythonwin/pywin/framework/interact.py +++ b/Pythonwin/pywin/framework/interact.py @@ -14,7 +14,7 @@ import pywin.framework.app import pywin.scintilla.control import pywin.scintilla.formatter -import pywin.scintilla.IDLEenvironment +import pywin.scintilla.IDLEenvironment # nopycln: import # Injects fast_readline into the IDLE auto-indent extension import win32api import win32clipboard import win32con diff --git a/Pythonwin/pywin/framework/intpydde.py b/Pythonwin/pywin/framework/intpydde.py index 2401cdc56..9c4c50b23 100644 --- a/Pythonwin/pywin/framework/intpydde.py +++ b/Pythonwin/pywin/framework/intpydde.py @@ -10,7 +10,13 @@ import win32api import win32ui -from dde import * +from dde import ( # nopycln: import # Re-exported for intpyapp.py + CBF_FAIL_SELFCONNECTIONS as CBF_FAIL_SELFCONNECTIONS, # noqa: PLC0414 + CreateConversation as CreateConversation, # noqa: PLC0414 + CreateServer, + CreateServerSystemTopic, + error as error, # noqa: PLC0414 +) from pywin.mfc import object diff --git a/Pythonwin/pywin/framework/toolmenu.py b/Pythonwin/pywin/framework/toolmenu.py index d1b7e80bb..266646899 100644 --- a/Pythonwin/pywin/framework/toolmenu.py +++ b/Pythonwin/pywin/framework/toolmenu.py @@ -6,8 +6,6 @@ import win32con import win32ui -from . import app - tools = {} idPos = 100 diff --git a/Pythonwin/pywin/scintilla/bindings.py b/Pythonwin/pywin/scintilla/bindings.py index e35be8a57..76b7739e6 100644 --- a/Pythonwin/pywin/scintilla/bindings.py +++ b/Pythonwin/pywin/scintilla/bindings.py @@ -6,7 +6,9 @@ import win32con import win32ui -from . import IDLEenvironment, keycodes +from . import ( # nopycln: import # Injects fast_readline into the IDLE auto-indent extension + IDLEenvironment, +) HANDLER_ARGS_GUESS = 0 HANDLER_ARGS_NATIVE = 1 diff --git a/Pythonwin/pywin/scintilla/view.py b/Pythonwin/pywin/scintilla/view.py index 1cbc26e0d..99680f18e 100644 --- a/Pythonwin/pywin/scintilla/view.py +++ b/Pythonwin/pywin/scintilla/view.py @@ -12,7 +12,7 @@ from pywin.mfc import afxres, docview from . import ( - IDLEenvironment, # IDLE emulation. + IDLEenvironment, # nopycln: import # Injects fast_readline into the IDLE auto-indent extension bindings, control, scintillacon, diff --git a/Pythonwin/pywin/test/test_pywin.py b/Pythonwin/pywin/test/test_pywin.py index b38d87ec0..6cf973a92 100644 --- a/Pythonwin/pywin/test/test_pywin.py +++ b/Pythonwin/pywin/test/test_pywin.py @@ -376,7 +376,7 @@ def test_ia(self): def test_docedit(self): import tempfile - import pywin.scintilla.IDLEenvironment + import pywin.scintilla.IDLEenvironment # nopycln: import # Injects fast_readline into the IDLE auto-indent extension ##doc = pywin.framework.editor.editorTemplate.OpenDocumentFile(None) def t_print(*args): diff --git a/adodbapi/__init__.py b/adodbapi/__init__.py index 94a04bee3..b569936aa 100644 --- a/adodbapi/__init__.py +++ b/adodbapi/__init__.py @@ -1,3 +1,4 @@ +# nopycln: file # undecidable cases due to explicit re-exports https://github.com/hadialqattan/pycln/issues/205 """adodbapi - A python DB API 2.0 (PEP 249) interface to Microsoft ADO Copyright (C) 2002 Henrik Ekelund, version 2.1 by Vernon Cole diff --git a/adodbapi/test/adodbapitest.py b/adodbapi/test/adodbapitest.py index fc5babf9b..1b50e595f 100644 --- a/adodbapi/test/adodbapitest.py +++ b/adodbapi/test/adodbapitest.py @@ -33,7 +33,6 @@ import adodbapitestconfig as config # run the configuration module. # will set sys.path to find correct version of adodbapi import tryconnection # in our code below, all our switches are from config.whatever -import win32com.client import adodbapi import adodbapi.apibase as api diff --git a/com/win32com/client/combrowse.py b/com/win32com/client/combrowse.py index d2abacf14..f83aa9c9b 100644 --- a/com/win32com/client/combrowse.py +++ b/com/win32com/client/combrowse.py @@ -93,8 +93,6 @@ def CalculateIsExpandable(self): rc = 0 return rc - pass - class HLI_IEnumMoniker(HLI_Enum): def GetSubList(self): @@ -583,7 +581,6 @@ def GetSubList(self): def main(modal=True, mdi=False): - from pywin.tools import hierlist root = HLIRoot("COM Browser") if mdi and "pywin.framework.app" in sys.modules: diff --git a/com/win32com/client/util.py b/com/win32com/client/util.py index 33f576336..8a2e4eb36 100644 --- a/com/win32com/client/util.py +++ b/com/win32com/client/util.py @@ -5,7 +5,7 @@ """ import pythoncom -from win32com.client import Dispatch, _get_good_object_ +from win32com.client import _get_good_object_ PyIDispatchType = pythoncom.TypeIIDs[pythoncom.IID_IDispatch] diff --git a/com/win32com/demos/excelAddin.py b/com/win32com/demos/excelAddin.py index 18a76eb8b..786745d8c 100644 --- a/com/win32com/demos/excelAddin.py +++ b/com/win32com/demos/excelAddin.py @@ -50,7 +50,7 @@ import pythoncom from win32com import universal -from win32com.client import Dispatch, DispatchWithEvents, constants, gencache +from win32com.client import DispatchWithEvents, constants, gencache # Support for COM objects we use. gencache.EnsureModule( diff --git a/com/win32com/demos/iebutton.py b/com/win32com/demos/iebutton.py index 6ded24c9f..7ccfe866f 100644 --- a/com/win32com/demos/iebutton.py +++ b/com/win32com/demos/iebutton.py @@ -30,8 +30,6 @@ import win32api import win32com import win32com.server.register -from win32com import universal -from win32com.client import Dispatch, DispatchWithEvents, constants, gencache, getevents # This demo uses 'print' - use win32traceutil to see it if we have no # console. @@ -40,7 +38,6 @@ except win32api.error: import win32traceutil -import array from win32com.axcontrol import axcontrol diff --git a/com/win32com/server/dispatcher.py b/com/win32com/server/dispatcher.py index 241edfef8..d7ef82a6f 100644 --- a/com/win32com/server/dispatcher.py +++ b/com/win32com/server/dispatcher.py @@ -236,7 +236,7 @@ def _trace_(self, *args): try: - import win32trace + import win32trace # nopycln: import # Check for win32traceutil w/o importing it DefaultDebugDispatcher: type[DispatcherTrace] = DispatcherWin32trace except ImportError: # no win32trace module - just use a print based one. diff --git a/com/win32com/server/policy.py b/com/win32com/server/policy.py index 2c6bc4472..0c1f92427 100644 --- a/com/win32com/server/policy.py +++ b/com/win32com/server/policy.py @@ -66,8 +66,6 @@ problem, rather than a COM error. """ -__author__ = "Greg Stein and Mark Hammond" - import sys import types @@ -92,6 +90,8 @@ from .exception import COMException +__author__ = "Greg Stein and Mark Hammond" + S_OK = 0 # Few more globals to speed things. diff --git a/com/win32com/servers/test_pycomtest.py b/com/win32com/servers/test_pycomtest.py index da606efa8..bf6d8fa7a 100644 --- a/com/win32com/servers/test_pycomtest.py +++ b/com/win32com/servers/test_pycomtest.py @@ -6,7 +6,6 @@ import winerror # Ensure the vtables in the tlb are known. -from win32com import universal from win32com.client import constants, gencache from win32com.server.exception import COMException from win32com.server.util import wrap diff --git a/com/win32com/test/testADOEvents.py b/com/win32com/test/testADOEvents.py index c79b2f7e8..3b0aa8349 100644 --- a/com/win32com/test/testADOEvents.py +++ b/com/win32com/test/testADOEvents.py @@ -2,7 +2,7 @@ import time import pythoncom -from win32com.client import Dispatch, DispatchWithEvents, constants +from win32com.client import DispatchWithEvents, constants finished = 0 # Flag for the wait loop from (3) to test diff --git a/com/win32com/test/testAXScript.py b/com/win32com/test/testAXScript.py index d1dc7f11c..ac5753668 100644 --- a/com/win32com/test/testAXScript.py +++ b/com/win32com/test/testAXScript.py @@ -15,10 +15,9 @@ def setUp(self): file = win32api.GetFullPathName( os.path.join(next(iter(win32com.axscript.client.__path__)), "pyscript.py") ) - from win32com.test.util import RegisterPythonServer self.verbose = verbose - RegisterPythonServer(file, "python", verbose=self.verbose) + win32com.test.util.RegisterPythonServer(file, "python", verbose=self.verbose) def testHost(self): file = win32api.GetFullPathName( diff --git a/com/win32com/test/testDictionary.py b/com/win32com/test/testDictionary.py index 020efb606..4a2edc1e0 100644 --- a/com/win32com/test/testDictionary.py +++ b/com/win32com/test/testDictionary.py @@ -26,9 +26,10 @@ def TestDictAgainst(dict, check): # Ensure we have the correct version registered. def Register(quiet): import win32com.servers.dictionary - from win32com.test.util import RegisterPythonServer - RegisterPythonServer(win32com.servers.dictionary.__file__, "Python.Dictionary") + win32com.test.util.RegisterPythonServer( + win32com.servers.dictionary.__file__, "Python.Dictionary" + ) def TestDict(quiet=None): diff --git a/com/win32com/test/testExchange.py b/com/win32com/test/testExchange.py index c20b9c0d4..119c16a17 100644 --- a/com/win32com/test/testExchange.py +++ b/com/win32com/test/testExchange.py @@ -6,7 +6,7 @@ import os import pythoncom -from win32com.client import constants, gencache +from win32com.client import gencache ammodule = None # was the generated module! @@ -91,7 +91,6 @@ def TestUser(session): def test(): - import win32com.client oldcwd = os.getcwd() try: diff --git a/com/win32com/test/testMSOffice.py b/com/win32com/test/testMSOffice.py index 37a37fe93..514b9b55f 100644 --- a/com/win32com/test/testMSOffice.py +++ b/com/win32com/test/testMSOffice.py @@ -182,7 +182,7 @@ def TestAll(): traceback.print_exc() try: - import xl5en32 + import xl5en32 # nopycln: import # Test import. TODO: Is testing Excel 95 still relevant ? mod = gencache.EnsureModule("{00020813-0000-0000-C000-000000000046}", 9, 1, 0) xl = win32com.client.Dispatch("Excel.Application.5") diff --git a/com/win32com/test/testMSOfficeEvents.py b/com/win32com/test/testMSOfficeEvents.py index f44e1d9b8..7874edafc 100644 --- a/com/win32com/test/testMSOfficeEvents.py +++ b/com/win32com/test/testMSOfficeEvents.py @@ -6,7 +6,7 @@ import types import pythoncom -from win32com.client import Dispatch, DispatchWithEvents +from win32com.client import DispatchWithEvents stopEvent = threading.Event() diff --git a/com/win32com/test/testPyComTest.py b/com/win32com/test/testPyComTest.py index 3d0a422db..6b9b7f792 100644 --- a/com/win32com/test/testPyComTest.py +++ b/com/win32com/test/testPyComTest.py @@ -14,15 +14,15 @@ import win32api import win32com import win32com.client.connect +import win32com.test.util import win32timezone import winerror from win32com.client import VARIANT, CastTo, DispatchBaseClass, constants -from win32com.test.util import RegisterPythonServer importMsg = "**** PyCOMTest is not installed ***\n PyCOMTest is a Python test specific COM client and server.\n It is likely this server is not installed on this machine\n To install the server, you must get the win32com sources\n and build it using MS Visual C++" # This test uses a Python implemented COM server - ensure correctly registered. -RegisterPythonServer( +win32com.test.util.RegisterPythonServer( os.path.join(os.path.dirname(__file__), "..", "servers", "test_pycomtest.py"), "Python.Test.PyCOMTest", ) diff --git a/com/win32com/test/testServers.py b/com/win32com/test/testServers.py index f25009bfc..a7b796443 100644 --- a/com/win32com/test/testServers.py +++ b/com/win32com/test/testServers.py @@ -16,9 +16,8 @@ class InterpCase(win32com.test.util.TestCase): def setUp(self): # Ensure the correct version registered. from win32com.servers import interp - from win32com.test.util import RegisterPythonServer - RegisterPythonServer(interp.__file__, "Python.Interpreter") + win32com.test.util.RegisterPythonServer(interp.__file__, "Python.Interpreter") def _testInterp(self, interp): self.assertEqual(interp.Eval("1+1"), 2) diff --git a/com/win32com/test/testall.py b/com/win32com/test/testall.py index 9667f2348..db30a0a8e 100644 --- a/com/win32com/test/testall.py +++ b/com/win32com/test/testall.py @@ -23,14 +23,13 @@ import pythoncom import win32com.client +from pywin32_testutil import TestLoader, TestRunner from win32com.test.util import ( CapturingFunctionTestCase, CheckClean, RegisterPythonServer, ShellTestCase, TestCase, - TestLoader, - TestRunner, ) verbosity = 1 # default unittest verbosity. diff --git a/com/win32com/test/util.py b/com/win32com/test/util.py index fd3820a38..877d99bf1 100644 --- a/com/win32com/test/util.py +++ b/com/win32com/test/util.py @@ -1,4 +1,3 @@ -import gc import logging import os import sys @@ -13,7 +12,6 @@ import win32com import winerror from pythoncom import _GetGatewayCount, _GetInterfaceCount -from pywin32_testutil import LeakTestCase, TestLoader, TestResult, TestRunner def CheckClean(): @@ -213,7 +211,7 @@ def restore_test_logger(prev_logger): def CapturingFunctionTestCase(*args, **kw): real_test = _CapturingFunctionTestCase(*args, **kw) - return LeakTestCase(real_test) + return pywin32_testutil.LeakTestCase(real_test) class _CapturingFunctionTestCase(unittest.FunctionTestCase): # , TestCaseMixin): diff --git a/com/win32comext/authorization/demos/EditSecurity.py b/com/win32comext/authorization/demos/EditSecurity.py index 48df43b17..8f9f8c5c5 100644 --- a/com/win32comext/authorization/demos/EditSecurity.py +++ b/com/win32comext/authorization/demos/EditSecurity.py @@ -1,6 +1,5 @@ import os -import ntsecuritycon import pythoncom import win32api import win32com.server.policy @@ -12,43 +11,21 @@ FILE_GENERIC_EXECUTE, FILE_GENERIC_READ, FILE_GENERIC_WRITE, - FILE_READ_ATTRIBUTES, - FILE_READ_DATA, - FILE_READ_EA, - FILE_WRITE_ATTRIBUTES, FILE_WRITE_DATA, - FILE_WRITE_EA, - PSPCB_SI_INITDIALOG, READ_CONTROL, - SI_ACCESS_CONTAINER, SI_ACCESS_GENERAL, - SI_ACCESS_PROPERTY, SI_ACCESS_SPECIFIC, SI_ADVANCED, SI_CONTAINER, SI_EDIT_ALL, - SI_EDIT_AUDITS, - SI_EDIT_PROPERTIES, - SI_PAGE_ADVPERM, - SI_PAGE_AUDIT, - SI_PAGE_OWNER, - SI_PAGE_PERM, SI_PAGE_TITLE, SI_RESET, - STANDARD_RIGHTS_EXECUTE, - STANDARD_RIGHTS_READ, - STANDARD_RIGHTS_WRITE, - SYNCHRONIZE, WRITE_DAC, WRITE_OWNER, ) from pythoncom import IID_NULL from win32com.authorization import authorization -from win32com.shell.shellcon import ( # # Msg parameter to PropertySheetPageCallback - PSPCB_CREATE, - PSPCB_RELEASE, -) -from win32security import CONTAINER_INHERIT_ACE, INHERIT_ONLY_ACE, OBJECT_INHERIT_ACE +from win32security import CONTAINER_INHERIT_ACE, OBJECT_INHERIT_ACE class SecurityInformation(win32com.server.policy.DesignatedWrapPolicy): diff --git a/com/win32comext/authorization/demos/EditServiceSecurity.py b/com/win32comext/authorization/demos/EditServiceSecurity.py index f60f71a7c..5d1681065 100644 --- a/com/win32comext/authorization/demos/EditServiceSecurity.py +++ b/com/win32comext/authorization/demos/EditServiceSecurity.py @@ -6,7 +6,6 @@ import os -import ntsecuritycon import pythoncom import win32api import win32com.server.policy @@ -30,35 +29,17 @@ SERVICE_GENERIC_WRITE = win32service.SERVICE_CHANGE_CONFIG from ntsecuritycon import ( - PSPCB_SI_INITDIALOG, READ_CONTROL, - SI_ACCESS_CONTAINER, SI_ACCESS_GENERAL, - SI_ACCESS_PROPERTY, SI_ACCESS_SPECIFIC, SI_ADVANCED, - SI_CONTAINER, SI_EDIT_ALL, - SI_EDIT_AUDITS, - SI_EDIT_PROPERTIES, - SI_PAGE_ADVPERM, - SI_PAGE_AUDIT, - SI_PAGE_OWNER, - SI_PAGE_PERM, SI_PAGE_TITLE, SI_RESET, - STANDARD_RIGHTS_EXECUTE, - STANDARD_RIGHTS_READ, - STANDARD_RIGHTS_WRITE, WRITE_DAC, WRITE_OWNER, ) from pythoncom import IID_NULL -from win32com.shell.shellcon import ( # # Msg parameter to PropertySheetPageCallback - PSPCB_CREATE, - PSPCB_RELEASE, -) -from win32security import CONTAINER_INHERIT_ACE, INHERIT_ONLY_ACE, OBJECT_INHERIT_ACE class ServiceSecurity(win32com.server.policy.DesignatedWrapPolicy): diff --git a/com/win32comext/axscript/client/debug.py b/com/win32comext/axscript/client/debug.py index cceb01db4..352b86453 100644 --- a/com/win32comext/axscript/client/debug.py +++ b/com/win32comext/axscript/client/debug.py @@ -3,14 +3,11 @@ import pythoncom import win32api -import win32com.server.util import winerror from win32com.axdebug import adb, axdebug, documents, gateways from win32com.axdebug.codecontainer import SourceCodeContainer from win32com.axdebug.util import _wrap -from win32com.client.util import Enumerator from win32com.server.exception import COMException -from win32com.util import IIDToInterfaceName debuggingTrace = "DEBUG_AXDEBUG" in os.environ # Should we print "trace" output? diff --git a/com/win32comext/axscript/client/pydumper.py b/com/win32comext/axscript/client/pydumper.py index 0380d21be..98517acdd 100644 --- a/com/win32comext/axscript/client/pydumper.py +++ b/com/win32comext/axscript/client/pydumper.py @@ -20,7 +20,6 @@ from win32com.axscript import axscript from . import pyscript -from .pyscript import SCRIPTTEXT_FORCEEXECUTION, RaiseAssert, trace PyDump_CLSID = "{ac527e60-c693-11d0-9c25-00aa00125a98}" diff --git a/com/win32comext/axscript/client/pyscript.py b/com/win32comext/axscript/client/pyscript.py index a486b1229..fd7806073 100644 --- a/com/win32comext/axscript/client/pyscript.py +++ b/com/win32comext/axscript/client/pyscript.py @@ -22,7 +22,6 @@ SCRIPTTEXT_FORCEEXECUTION, SCRIPTTEXT_ISEXPRESSION, SCRIPTTEXT_ISPERSISTENT, - RaiseAssert, trace, ) from win32com.server.exception import COMException diff --git a/com/win32comext/axscript/client/scriptdispatch.py b/com/win32comext/axscript/client/scriptdispatch.py index 227467e5c..ca696fe84 100644 --- a/com/win32comext/axscript/client/scriptdispatch.py +++ b/com/win32comext/axscript/client/scriptdispatch.py @@ -13,7 +13,6 @@ import win32com.server.policy import win32com.server.util import winerror -from win32com.axscript import axscript from win32com.client import Dispatch from win32com.server.exception import COMException diff --git a/com/win32comext/axscript/server/axsite.py b/com/win32comext/axscript/server/axsite.py index 359ea5e0f..50c193854 100644 --- a/com/win32comext/axscript/server/axsite.py +++ b/com/win32comext/axscript/server/axsite.py @@ -1,5 +1,4 @@ import pythoncom -import win32com.axscript.axscript import winerror from win32com.axscript import axscript from win32com.server import util diff --git a/com/win32comext/axscript/test/leakTest.py b/com/win32comext/axscript/test/leakTest.py index 7b52e36a9..961255372 100644 --- a/com/win32comext/axscript/test/leakTest.py +++ b/com/win32comext/axscript/test/leakTest.py @@ -1,7 +1,6 @@ import sys import pythoncom -import win32com.server.policy from win32com.axscript import axscript from win32com.axscript.server import axsite from win32com.server import connect, util diff --git a/com/win32comext/axscript/test/testHost4Dbg.py b/com/win32comext/axscript/test/testHost4Dbg.py index c618a4120..3e18b2336 100644 --- a/com/win32comext/axscript/test/testHost4Dbg.py +++ b/com/win32comext/axscript/test/testHost4Dbg.py @@ -4,7 +4,6 @@ import pythoncom import win32ui -from win32com.axscript import axscript from win32com.axscript.server import axsite from win32com.server import util @@ -76,8 +75,6 @@ def TestEngine(): if __name__ == "__main__": - import win32com.axdebug.util - try: TestEngine() except: diff --git a/com/win32comext/mapi/emsabtags.py b/com/win32comext/mapi/emsabtags.py index 65e93df17..1e90a7d8c 100644 --- a/com/win32comext/mapi/emsabtags.py +++ b/com/win32comext/mapi/emsabtags.py @@ -1,3 +1,4 @@ +# nopycln: file # Re-exporting many constants # Converted "manually" from EMSABTAG.H from .mapitags import ( PROP_TAG, diff --git a/com/win32comext/propsys/test/testpropsys.py b/com/win32comext/propsys/test/testpropsys.py index 356d3e673..de831970e 100644 --- a/com/win32comext/propsys/test/testpropsys.py +++ b/com/win32comext/propsys/test/testpropsys.py @@ -1,4 +1,4 @@ -from win32com.propsys import propsys, pscon +from win32com.propsys import propsys, pscon # nopycln: import print("propsys was imported (sorry - that is the extent of the tests,") print("but see the shell folder_view demo, which uses this module)") diff --git a/com/win32comext/shell/demos/servers/column_provider.py b/com/win32comext/shell/demos/servers/column_provider.py index ca0a2a10a..092f99ff8 100644 --- a/com/win32comext/shell/demos/servers/column_provider.py +++ b/com/win32comext/shell/demos/servers/column_provider.py @@ -15,7 +15,6 @@ import commctrl import pythoncom from pywintypes import IID -from win32com.server.util import wrap from win32com.shell import shell, shellcon IPersist_Methods = ["GetClassID"] diff --git a/com/win32comext/shell/demos/servers/copy_hook.py b/com/win32comext/shell/demos/servers/copy_hook.py index 0b403b7fb..b4de5bfe1 100644 --- a/com/win32comext/shell/demos/servers/copy_hook.py +++ b/com/win32comext/shell/demos/servers/copy_hook.py @@ -9,7 +9,7 @@ import pythoncom import win32con import win32gui -from win32com.shell import shell, shellcon +from win32com.shell import shell # Our shell extension. diff --git a/com/win32comext/shell/demos/servers/icon_handler.py b/com/win32comext/shell/demos/servers/icon_handler.py index 605dbeed0..00d494c1f 100644 --- a/com/win32comext/shell/demos/servers/icon_handler.py +++ b/com/win32comext/shell/demos/servers/icon_handler.py @@ -15,7 +15,7 @@ import pythoncom import win32gui import winerror -from win32com.shell import shell, shellcon +from win32com.shell import shell ico_files = glob.glob(os.path.join(sys.prefix, "*.ico")) if not ico_files: diff --git a/com/win32comext/shell/demos/servers/shell_view.py b/com/win32comext/shell/demos/servers/shell_view.py index cac0e19ad..01d129489 100644 --- a/com/win32comext/shell/demos/servers/shell_view.py +++ b/com/win32comext/shell/demos/servers/shell_view.py @@ -46,7 +46,6 @@ # a field sep just 'cos we can (and 'cos it can't possibly conflict with the # string content) -import _thread import os import pyclbr import sys diff --git a/isapi/install.py b/isapi/install.py index 8429f41ef..aa861bbfc 100644 --- a/isapi/install.py +++ b/isapi/install.py @@ -15,8 +15,7 @@ import pythoncom import win32api import winerror -from win32com.client import Dispatch, GetObject -from win32com.client.gencache import EnsureDispatch, EnsureModule +from win32com.client import GetObject _APP_INPROC = 0 _APP_OUTPROC = 1 diff --git a/pycln.toml b/pycln.toml index 9ffd3c5cc..f9aaee1c8 100644 --- a/pycln.toml +++ b/pycln.toml @@ -1,23 +1,25 @@ [tool.pycln] # Many imports with side-effects -all = false +all = true skip_imports = [ - # Star imported C wrapped modules - "_winxptheme", - "dde", - "ntsecuritycon", - "odbc", + # TODO: Confirm whether these produce side-effects, + # if yes: add to the list below + # if not: remove from here + # NOTE: https://github.com/mhammond/pywin32/pull/2342#discussion_r1798419855 + # It seems we should be able to remove these. TODO in its own PR. "win32api", - "win32clipboard", - "win32com", - "win32cryptcon", - "win32event", "win32file", - "win32gui_struct", "win32gui", - "win32inet", - "win32inetcon", - "win32pipe", - "win32ras", - "win32ui", + "win32process", + "win32security", + "win32uiole", + # Modules with known side-effects + "coloreditor", # Adds doc template + "IDLEenvironment", # Injects fast_readline into the IDLE auto-indent extension + "pythoncom", # pythoncomXX.dll loader + "pywintypes", # pywintypesXX.dll loader + "win32com", # Sets pythoncom.frozen and adds modules to path based on the registry + "win32traceutil", # Redirects output to win32trace remote collector + "win32ui", # Must always be imported before dde ] +# Note: com/win32com/client/gencache.py does read files but only to fill in it's own dicts from cache diff --git a/win32/Demos/security/account_rights.py b/win32/Demos/security/account_rights.py index 357b789a5..e2507389c 100644 --- a/win32/Demos/security/account_rights.py +++ b/win32/Demos/security/account_rights.py @@ -3,7 +3,6 @@ import win32con import win32file import win32security -from security_enums import ACCESS_MODE, ACE_FLAGS, TRUSTEE_FORM, TRUSTEE_TYPE new_privs = ( ( diff --git a/win32/Demos/security/get_policy_info.py b/win32/Demos/security/get_policy_info.py index 180aaa9fc..d02804683 100644 --- a/win32/Demos/security/get_policy_info.py +++ b/win32/Demos/security/get_policy_info.py @@ -1,4 +1,3 @@ -import ntsecuritycon import win32api import win32file import win32security diff --git a/win32/Demos/security/list_rights.py b/win32/Demos/security/list_rights.py index 780008a25..9a3834931 100644 --- a/win32/Demos/security/list_rights.py +++ b/win32/Demos/security/list_rights.py @@ -3,7 +3,6 @@ import win32con import win32file import win32security -from security_enums import ACCESS_MODE, ACE_FLAGS, TRUSTEE_FORM, TRUSTEE_TYPE new_privs = ( ( diff --git a/win32/Demos/security/localized_names.py b/win32/Demos/security/localized_names.py index ae2acc28c..d491d2e22 100644 --- a/win32/Demos/security/localized_names.py +++ b/win32/Demos/security/localized_names.py @@ -5,7 +5,12 @@ import sys import pywintypes -from ntsecuritycon import * +from ntsecuritycon import ( + DOMAIN_ALIAS_RID_ADMINS, + DOMAIN_USER_RID_ADMIN, + SECURITY_BUILTIN_DOMAIN_RID, + SECURITY_NT_AUTHORITY, +) from win32net import NetUserModalsGet from win32security import LookupAccountSid diff --git a/win32/Demos/security/query_information.py b/win32/Demos/security/query_information.py index 9fa3e4a95..da55022ee 100644 --- a/win32/Demos/security/query_information.py +++ b/win32/Demos/security/query_information.py @@ -1,7 +1,7 @@ import win32api import win32security import winerror -from ntsecuritycon import * +from ntsecuritycon import TOKEN_QUERY, TokenUser # This is a Python implementation of win32api.GetDomainName() diff --git a/win32/Demos/security/set_policy_info.py b/win32/Demos/security/set_policy_info.py index 5dd3cf819..b0802ffa3 100644 --- a/win32/Demos/security/set_policy_info.py +++ b/win32/Demos/security/set_policy_info.py @@ -1,4 +1,3 @@ -import ntsecuritycon import win32api import win32file import win32security diff --git a/win32/Demos/service/pipeTestService.py b/win32/Demos/service/pipeTestService.py index f062fcd2c..56512e448 100644 --- a/win32/Demos/service/pipeTestService.py +++ b/win32/Demos/service/pipeTestService.py @@ -11,23 +11,24 @@ import _thread import traceback -# Old versions of the service framework would not let you import this -# module at the top-level. Now you can, and can check 'Debugging()' and -# 'RunningAsService()' to check your context. import pywintypes + +# Old versions of the service framework would not let you import this +# module at the top-level. Now you can, and can check 'servicemanager.Debugging()' +# and 'servicemanager.RunningAsService()' to check your context. import servicemanager import win32con import win32service import win32serviceutil import winerror -from ntsecuritycon import * -from win32api import * -# Use "import *" to keep this looking as much as a "normal" service +# # Use "import *" to keep this looking as much as a "normal" service # as possible. Real code shouldn't do this. -from win32event import * -from win32file import * -from win32pipe import * +from ntsecuritycon import * # nopycln: import +from win32api import * # nopycln: import +from win32event import * # nopycln: import +from win32file import * # nopycln: import +from win32pipe import * # nopycln: import def ApplyIgnoreError(fn, args): diff --git a/win32/Demos/service/pipeTestServiceClient.py b/win32/Demos/service/pipeTestServiceClient.py index 507219c09..3ac26b793 100644 --- a/win32/Demos/service/pipeTestServiceClient.py +++ b/win32/Demos/service/pipeTestServiceClient.py @@ -13,9 +13,12 @@ import pywintypes import win32api import winerror -from win32event import * -from win32file import * -from win32pipe import * + +# # Use "import *" to keep this looking as much as a "normal" service +# as possible. Real code shouldn't do this. +from win32event import * # nopycln: import +from win32file import * # nopycln: import +from win32pipe import * # nopycln: import verbose = 0 diff --git a/win32/Demos/win32clipboardDemo.py b/win32/Demos/win32clipboardDemo.py index 564233f68..809c2b26e 100644 --- a/win32/Demos/win32clipboardDemo.py +++ b/win32/Demos/win32clipboardDemo.py @@ -2,7 +2,18 @@ # # Demo/test of the win32clipboard module. import win32con -from win32clipboard import * +from win32clipboard import ( + CloseClipboard, + EmptyClipboard, + EnumClipboardFormats, + GetClipboardData, + GetClipboardFormatName, + IsClipboardFormatAvailable, + OpenClipboard, + RegisterClipboardFormat, + SetClipboardData, + SetClipboardText, +) if not __debug__: print("WARNING: The test code in this module uses assert") diff --git a/win32/Demos/win32comport_demo.py b/win32/Demos/win32comport_demo.py index 1596e4139..54f8f2336 100644 --- a/win32/Demos/win32comport_demo.py +++ b/win32/Demos/win32comport_demo.py @@ -18,8 +18,38 @@ import threading import win32con # constants. -from win32event import * # We use events and the WaitFor[Multiple]Objects functions. -from win32file import * # The base COM port and file IO functions. +from win32event import ( # We use events and the WaitFor[Multiple]Objects functions. + INFINITE, + WAIT_OBJECT_0, + CreateEvent, + SetEvent, + WaitForMultipleObjects, + WaitForSingleObject, +) +from win32file import ( # The base COM port and file IO functions. + CBR_115200, + EV_RXCHAR, + NOPARITY, + ONESTOPBIT, + OVERLAPPED, + PURGE_RXABORT, + PURGE_RXCLEAR, + PURGE_TXABORT, + PURGE_TXCLEAR, + ClearCommError, + CreateFile, + GetCommModemStatus, + GetCommState, + PurgeComm, + ReadFile, + SetCommMask, + SetCommState, + SetCommTimeouts, + SetupComm, + WaitCommEvent, + WriteFile, + error, +) def FindModem(): diff --git a/win32/Demos/win32gui_menu.py b/win32/Demos/win32gui_menu.py index 4b9b71dd0..fb10b118c 100644 --- a/win32/Demos/win32gui_menu.py +++ b/win32/Demos/win32gui_menu.py @@ -14,9 +14,64 @@ import sys import win32con -from win32api import * -from win32gui import * -from win32gui_struct import * +from win32api import GetSystemDirectory, GetSystemMetrics +from win32gui import ( + LOWORD, + NIF_ICON, + NIF_MESSAGE, + NIF_TIP, + NIM_ADD, + NIM_DELETE, + WNDCLASS, + CheckMenuItem, + CheckMenuRadioItem, + CreateCompatibleBitmap, + CreateCompatibleDC, + CreateFontIndirect, + CreatePopupMenu, + CreateWindow, + DeleteDC, + DestroyIcon, + DestroyWindow, + DrawIconEx, + ExtTextOut, + FillRect, + GetCursorPos, + GetDC, + GetMenuDefaultItem, + GetMenuState, + GetModuleHandle, + GetSysColor, + GetSysColorBrush, + GetTextExtentPoint32, + InsertMenu, + InsertMenuItem, + LoadIcon, + LoadImage, + PostMessage, + PostQuitMessage, + PumpMessages, + PyGetMemory, + PyMakeBuffer, + PySetMemory, + RegisterClass, + ReleaseDC, + SelectObject, + SetBkColor, + SetBkMode, + SetForegroundWindow, + SetMenuDefaultItem, + SetTextColor, + Shell_NotifyIcon, + SystemParametersInfo, + TrackPopupMenu, + UpdateWindow, +) +from win32gui_struct import ( + EmptyMENUITEMINFO, + PackMENUITEMINFO, + UnpackMENUITEMINFO, +) this_dir = os.path.split(sys.argv[0])[0] diff --git a/win32/Lib/winxptheme.py b/win32/Lib/winxptheme.py index e147eda58..4fd7ed962 100644 --- a/win32/Lib/winxptheme.py +++ b/win32/Lib/winxptheme.py @@ -5,4 +5,4 @@ around _winxptheme. """ -from _winxptheme import * +from _winxptheme import * # nopycln: import diff --git a/win32/test/test_clipboard.py b/win32/test/test_clipboard.py index 3d6c1efc5..0c89d4bab 100644 --- a/win32/test/test_clipboard.py +++ b/win32/test/test_clipboard.py @@ -7,7 +7,18 @@ import pywintypes import win32con import win32gui -from win32clipboard import * +from win32clipboard import ( + CloseClipboard, + EmptyClipboard, + GetClipboardData, + GetClipboardDataHandle, + GetClipboardFormatName, + GetGlobalMemory, + OpenClipboard, + RegisterClipboardFormat, + SetClipboardData, + SetClipboardText, +) custom_format_name = "PythonClipboardTestFormat" diff --git a/win32/test/test_win32crypt.py b/win32/test/test_win32crypt.py index d5e315007..9360cfbe2 100644 --- a/win32/test/test_win32crypt.py +++ b/win32/test/test_win32crypt.py @@ -5,8 +5,20 @@ from typing import Any, Iterator import win32crypt -from pywin32_testutil import TestSkipped, find_test_fixture, testmain -from win32cryptcon import * +from pywin32_testutil import find_test_fixture, testmain +from win32cryptcon import ( + CERT_QUERY_CONTENT_CERT, + CERT_QUERY_CONTENT_FLAG_CERT, + CERT_QUERY_FORMAT_BASE64_ENCODED, + CERT_QUERY_FORMAT_BINARY, + CERT_QUERY_FORMAT_FLAG_ALL, + CERT_QUERY_OBJECT_BLOB, + CERT_QUERY_OBJECT_FILE, + CERT_STORE_ADD_REPLACE_EXISTING, + CERT_STORE_PROV_SYSTEM, + CERT_SYSTEM_STORE_CURRENT_USER, + CERT_SYSTEM_STORE_LOCAL_MACHINE, +) class Crypt(unittest.TestCase): diff --git a/win32/test/test_win32gui.py b/win32/test/test_win32gui.py index e61bae1b8..bc91a7add 100644 --- a/win32/test/test_win32gui.py +++ b/win32/test/test_win32gui.py @@ -4,7 +4,6 @@ import sys import unittest -import pywin32_testutil import pywintypes import win32api import win32gui diff --git a/win32/test/test_win32inet.py b/win32/test/test_win32inet.py index fe7de185c..99204e434 100644 --- a/win32/test/test_win32inet.py +++ b/win32/test/test_win32inet.py @@ -2,8 +2,25 @@ import winerror from pywin32_testutil import TestSkipped, testmain -from win32inet import * -from win32inetcon import * +from win32inet import ( + FtpCommand, + InternetCanonicalizeUrl, + InternetConnect, + InternetGetCookie, + InternetGetLastResponseInfo, + InternetOpen, + InternetOpenUrl, + InternetReadFile, + InternetSetCookie, + error, +) +from win32inetcon import ( + FTP_TRANSFER_TYPE_ASCII, + INTERNET_FLAG_EXISTING_CONNECT, + INTERNET_INVALID_PORT_NUMBER, + INTERNET_OPEN_TYPE_DIRECT, + INTERNET_SERVICE_FTP, +) class CookieTests(unittest.TestCase): diff --git a/win32/test/test_win32net.py b/win32/test/test_win32net.py index 930719633..04e473db1 100644 --- a/win32/test/test_win32net.py +++ b/win32/test/test_win32net.py @@ -1,7 +1,6 @@ import unittest import win32net -import win32netcon class TestCase(unittest.TestCase): From 37875dde423b03b0cc80a5cc8f0e7501679daaec Mon Sep 17 00:00:00 2001 From: Thomas Geppert Date: Tue, 15 Oct 2024 03:31:09 +0200 Subject: [PATCH 25/34] Check for the class attribute 'CLSID' instead of the instance attribute (#2353) to decide if building makepy support is required. --- com/win32com/client/gencache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com/win32com/client/gencache.py b/com/win32com/client/gencache.py index e64449b8b..717f2a9c7 100644 --- a/com/win32com/client/gencache.py +++ b/com/win32com/client/gencache.py @@ -626,7 +626,7 @@ def EnsureDispatch( ): # New fn, so we default the new demand feature to on! """Given a COM prog_id, return an object that is using makepy support, building if necessary""" disp = win32com.client.Dispatch(prog_id) - if not disp.__dict__.get("CLSID"): # Eeek - no makepy support - try and build it. + if not hasattr(disp, "CLSID"): # Eeek - no makepy support - try and build it. try: ti = disp._oleobj_.GetTypeInfo() disp_clsid = ti.GetTypeAttr()[0] From e79a6e3ed4fb36a05bdc9f10f5da289747809829 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Oct 2024 21:35:25 -0400 Subject: [PATCH 26/34] Add test for TimeZoneInfo.tzname and fix bugs in the implementation. (#2337) Co-authored-by: Avasam --- win32/Lib/win32timezone.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py index 53107542d..fdd71c855 100644 --- a/win32/Lib/win32timezone.py +++ b/win32/Lib/win32timezone.py @@ -642,11 +642,27 @@ def __str__(self): return self.displayName def tzname(self, dt): - winInfo = self.getWinInfo(dt) - if self.dst(dt) == winInfo.daylight_bias: + """ + >>> MST = TimeZoneInfo('Mountain Standard Time') + >>> MST.tzname(datetime.datetime(2003, 8, 2)) + 'Mountain Daylight Time' + >>> MST.tzname(datetime.datetime(2003, 11, 25)) + 'Mountain Standard Time' + """ + + winInfo = self.getWinInfo(dt.year) + if self.dst(dt) == -winInfo.daylight_bias: result = self.daylightName - elif self.dst(dt) == winInfo.standard_bias: + elif self.dst(dt) == -winInfo.standard_bias: result = self.standardName + else: + raise ValueError( + "Unexpected daylight bias", + dt, + self.dst(dt), + winInfo.daylight_bias, + winInfo.standard_bias, + ) return result def getWinInfo(self, targetYear): From c717bfa4b06bab5984ba4c9eb62fcc4e6dcf99ef Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 14 Oct 2024 22:35:55 -0400 Subject: [PATCH 27/34] Include StackOverflow's link about MREs in issue_template.md (#2404) Co-authored-by: Mark Hammond --- .github/issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/issue_template.md b/.github/issue_template.md index 733bf9343..601614eae 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -9,7 +9,7 @@ For all bugs, please provide the following information: ## Expected behavior and actual behavior ## Steps to reproduce the problem - + 1. ... 2. ... From 636e4c00d1b011f21e7d968200da083200cf7ce8 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 17 Oct 2024 20:50:42 -0500 Subject: [PATCH 28/34] Fixing memory leak converting to PyObject from some SAFEARRAY elements (#2316) Some SAFEARRAY element types require ownership change when converted to PyObjects. This includes the BSTR, IUnknown and IDispatch types. Otherwise the memory gets leaked upon garbage collection. Co-authored-by: Kyle Johnson --- com/win32com/src/oleargs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/com/win32com/src/oleargs.cpp b/com/win32com/src/oleargs.cpp index 33c925987..0e565ae5e 100644 --- a/com/win32com/src/oleargs.cpp +++ b/com/win32com/src/oleargs.cpp @@ -860,7 +860,7 @@ static PyObject *PyCom_PyObjectFromSAFEARRAYDimensionItem(SAFEARRAY *psa, VARENU hres = SafeArrayGetElement(psa, arrayIndices, &str); if (FAILED(hres)) break; - subitem = PyWinObject_FromBstr(str); + subitem = PyWinObject_FromBstr(str, TRUE); break; } case VT_DISPATCH: { @@ -868,7 +868,7 @@ static PyObject *PyCom_PyObjectFromSAFEARRAYDimensionItem(SAFEARRAY *psa, VARENU hres = SafeArrayGetElement(psa, arrayIndices, &pDisp); if (FAILED(hres)) break; - subitem = PyCom_PyObjectFromIUnknown(pDisp, IID_IDispatch, TRUE); + subitem = PyCom_PyObjectFromIUnknown(pDisp, IID_IDispatch, FALSE); break; } // case VT_ERROR - handled above with I4 @@ -895,7 +895,7 @@ static PyObject *PyCom_PyObjectFromSAFEARRAYDimensionItem(SAFEARRAY *psa, VARENU hres = SafeArrayGetElement(psa, arrayIndices, &pUnk); if (FAILED(hres)) break; - subitem = PyCom_PyObjectFromIUnknown(pUnk, IID_IUnknown, TRUE); + subitem = PyCom_PyObjectFromIUnknown(pUnk, IID_IUnknown, FALSE); break; } // case VT_DECIMAL From 3be4f697c59eb2cb5e08ff7fa8de6613288f1d21 Mon Sep 17 00:00:00 2001 From: Thomas Geppert Date: Fri, 18 Oct 2024 03:56:18 +0200 Subject: [PATCH 29/34] Implement record pointers as [in, out] method parameters of a Dispatch Interface (#2310) * Implement record pointers as method parameters of a Dispatch Interface to get server side modifications of a record marshaled back to the client. * Added a untitest for record pointers as [ in, out ] method parameters. --- com/TestSources/PyCOMTest/PyCOMImpl.cpp | 8 ++++++++ com/TestSources/PyCOMTest/PyCOMImpl.h | 2 ++ com/TestSources/PyCOMTest/PyCOMTest.idl | 2 ++ com/win32com/client/build.py | 1 - com/win32com/src/oleargs.cpp | 1 + com/win32com/test/testPyComTest.py | 12 ++++++++++++ 6 files changed, 25 insertions(+), 1 deletion(-) diff --git a/com/TestSources/PyCOMTest/PyCOMImpl.cpp b/com/TestSources/PyCOMTest/PyCOMImpl.cpp index a4616fef0..d58c00f99 100644 --- a/com/TestSources/PyCOMTest/PyCOMImpl.cpp +++ b/com/TestSources/PyCOMTest/PyCOMImpl.cpp @@ -618,6 +618,14 @@ HRESULT CPyCOMTest::GetStruct(TestStruct1 *ret) *ret = r; return S_OK; } + +HRESULT CPyCOMTest::ModifyStruct(TestStruct1 *prec) +{ + prec->int_value = 100; + prec->str_value = SysAllocString(L"Nothing is as constant as change"); + return S_OK; +} + HRESULT CPyCOMTest::DoubleString(BSTR in, BSTR *out) { *out = SysAllocStringLen(NULL, SysStringLen(in) * 2); diff --git a/com/TestSources/PyCOMTest/PyCOMImpl.h b/com/TestSources/PyCOMTest/PyCOMImpl.h index e285268f1..50eb8dd0d 100644 --- a/com/TestSources/PyCOMTest/PyCOMImpl.h +++ b/com/TestSources/PyCOMTest/PyCOMImpl.h @@ -119,6 +119,8 @@ class CPyCOMTest : public IDispatchImpl Date: Mon, 14 Oct 2024 22:25:14 -0400 Subject: [PATCH 30/34] Add missing CHANGELOG entries --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a88445e9b..8d1012619 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,9 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- +* Implement record pointers as [in, out] method parameters of a Dispatch Interface (#2310) +* Fix memory leak converting to PyObject from some SAFEARRAY elements (#2316) +* Fix bug where makepy support was unnecessarily generated (#2354, #2353, @geppi) * Fail sooner on invalid `win32timezone.TimeZoneInfo` creation (#2338, @Avasam) * Removed temporary `win32com.server.policy` reexports hack (#2344, @Avasam) Import `DispatcherWin32trace` and `DispatcherTrace` from `win32com.server.dispatcher` instead. From ad3a991202d5d352488218d3419d03768c5a787e Mon Sep 17 00:00:00 2001 From: petur-keystrike <148981503+petur-keystrike@users.noreply.github.com> Date: Fri, 18 Oct 2024 02:49:41 +0000 Subject: [PATCH 31/34] Add support for WTSIsRemoteSession flag. (#2152) When WTSIsRemoteSession is passed to WTSQuerySessionInformation, it returns a single byte containing the return value. --- win32/src/win32tsmodule.cpp | 4 ++++ win32/test/test_win32ts.py | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 win32/test/test_win32ts.py diff --git a/win32/src/win32tsmodule.cpp b/win32/src/win32tsmodule.cpp index c4156f9f5..ddd383dee 100644 --- a/win32/src/win32tsmodule.cpp +++ b/win32/src/win32tsmodule.cpp @@ -409,6 +409,9 @@ static PyObject *PyWTSQuerySessionInformation(PyObject *self, PyObject *args, Py case WTSConnectState: // @flag WTSConnectState|Int, from WTS_CONNECTSTATE_CLASS ret = PyLong_FromLong(*(INT *)buf); break; + case WTSIsRemoteSession: // @flag WTSIsRemoteSession|Boolean + ret = PyBool_FromLong(*(BYTE *)buf); + break; case WTSClientDisplay: { // @flag WTSClientDisplay|Dict containing client's display settings WTS_CLIENT_DISPLAY *wcd = (WTS_CLIENT_DISPLAY *)buf; ret = Py_BuildValue("{s:k, s:k, s:k}", "HorizontalResolution", wcd->HorizontalResolution, @@ -768,6 +771,7 @@ PYWIN_MODULE_INIT_FUNC(win32ts) PyModule_AddIntConstant(module, "WTSClientAddress", WTSClientAddress); PyModule_AddIntConstant(module, "WTSClientDisplay", WTSClientDisplay); PyModule_AddIntConstant(module, "WTSClientProtocolType", WTSClientProtocolType); + PyModule_AddIntConstant(module, "WTSIsRemoteSession", WTSIsRemoteSession); // WTS_CONFIG_CLASS PyModule_AddIntConstant(module, "WTSUserConfigInitialProgram", WTSUserConfigInitialProgram); diff --git a/win32/test/test_win32ts.py b/win32/test/test_win32ts.py new file mode 100644 index 000000000..712b99272 --- /dev/null +++ b/win32/test/test_win32ts.py @@ -0,0 +1,19 @@ +# Tests for win32ts module + +import unittest + +import win32ts + + +class Win32TsTestCase(unittest.TestCase): + def test_is_remote_session(self): + ret = win32ts.WTSQuerySessionInformation( + win32ts.WTS_CURRENT_SERVER_HANDLE, + win32ts.WTS_CURRENT_SESSION, + win32ts.WTSIsRemoteSession, + ) + self.assertIsInstance(ret, bool) + + +if __name__ == "__main__": + unittest.main() From a940d6872130fe37d1019dde52f79e19256716d8 Mon Sep 17 00:00:00 2001 From: Alexander Reznikov Date: Fri, 18 Oct 2024 06:01:58 +0300 Subject: [PATCH 32/34] Added support for DBT_DEVTYP_PORT in UnpackDEV_BROADCAST (#2074) * Update win32gui_struct.py: Added support for DBT_DEVTYP_PORT in UnpackDEV_BROADCAST --- win32/Lib/win32gui_struct.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/win32/Lib/win32gui_struct.py b/win32/Lib/win32gui_struct.py index 945ededc9..41ef815fd 100644 --- a/win32/Lib/win32gui_struct.py +++ b/win32/Lib/win32gui_struct.py @@ -952,6 +952,8 @@ def UnpackDEV_BROADCAST(lparam): _, _, _, x["unitmask"], x["flags"] = struct.unpack( fmt, buf[: struct.calcsize(fmt)] ) + elif devtype == win32con.DBT_DEVTYP_PORT: + x["name"] = win32gui.PyGetString(lparam + struct.calcsize(hdr_format)) else: raise NotImplementedError("unknown device type %d" % (devtype,)) return DEV_BROADCAST_INFO(devtype, **extra) From 49c52f93d505feeb1f5f46c93b8f9af9ea3f2f42 Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 17 Oct 2024 23:52:21 -0400 Subject: [PATCH 33/34] Dropping support for Python 3.7 (#2207) --- .github/workflows/download-arm64-libs.py | 12 ++++++------ .github/workflows/main.yml | 11 +++++------ CHANGES.txt | 1 + Pythonwin/pywin/test/test_pywin.py | 5 ++--- build_all.bat | 4 ---- build_env.md | 1 - com/win32com/test/pippo_server.py | 5 +---- make_all.bat | 5 ----- mypy.ini | 1 - pyrightconfig.json | 2 +- ruff.toml | 2 +- setup.py | 20 +++++--------------- win32/Lib/pywin32_bootstrap.py | 10 +--------- win32/src/_win32sysloader.cpp | 6 ------ 14 files changed, 23 insertions(+), 62 deletions(-) diff --git a/.github/workflows/download-arm64-libs.py b/.github/workflows/download-arm64-libs.py index 51c5bcd02..841673f98 100644 --- a/.github/workflows/download-arm64-libs.py +++ b/.github/workflows/download-arm64-libs.py @@ -28,16 +28,16 @@ VERSION += f"-rc{sys.version_info.serial}" URL = f"https://www.nuget.org/api/v2/package/pythonarm64/{VERSION}" -PATH = dest / f"pythonarm64.{VERSION}.zip" +DEST_PATH = dest / f"pythonarm64.{VERSION}.zip" -if PATH.is_file(): - print("Skipping download because", PATH, "exists") +if DEST_PATH.is_file(): + print("Skipping download because", DEST_PATH, "exists") else: print("Downloading", URL) - urlretrieve(URL, PATH) - print("Downloaded", PATH) + urlretrieve(URL, DEST_PATH) + print("Downloaded", DEST_PATH) -with ZipFile(PATH, "r") as zf: +with ZipFile(DEST_PATH, "r") as zf: for name in zf.namelist(): zip_path = pathlib.PurePath(name) if zip_path.parts[:2] == ("tools", "libs"): diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa1049f06..2af0d70a0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] architecture: ["x64", "x86"] steps: @@ -37,7 +37,7 @@ jobs: run: | python --version pip --version - pip install --upgrade setuptools wheel + pip install --upgrade setuptools>=74 wheel - name: Build and install run: | @@ -86,7 +86,7 @@ jobs: run: | python --version pip --version - pip install --upgrade setuptools wheel + pip install --upgrade setuptools>=74 wheel - name: Obtain ARM64 library files run: | @@ -117,7 +117,7 @@ jobs: cache-dependency-path: .github/workflows/main.yml - run: pip install clang-format pycln - run: pycln . --config=pycln.toml --check - - uses: chartboost/ruff-action@v1 + - uses: astral-sh/ruff-action@v1 with: version: "0.4.5" - uses: psf/black@stable @@ -134,7 +134,6 @@ jobs: strategy: fail-fast: false matrix: - # mypy 1.5 dropped support for Python 3.7 # mypy won't understand "3.13-dev", keeping the CI simple by just omitting it python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: @@ -154,7 +153,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/CHANGES.txt b/CHANGES.txt index 8d1012619..d8978afd5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 309, as yet unreleased -------------------------------------- +* Dropped support for Python 3.7 (#2207, @Avasam) * Implement record pointers as [in, out] method parameters of a Dispatch Interface (#2310) * Fix memory leak converting to PyObject from some SAFEARRAY elements (#2316) * Fix bug where makepy support was unnecessarily generated (#2354, #2353, @geppi) diff --git a/Pythonwin/pywin/test/test_pywin.py b/Pythonwin/pywin/test/test_pywin.py index 6cf973a92..49acc9d5e 100644 --- a/Pythonwin/pywin/test/test_pywin.py +++ b/Pythonwin/pywin/test/test_pywin.py @@ -47,8 +47,7 @@ def setUpClass(cls): def _restore_oe(): sys.stdout, sys.stderr = cls.std_oe_orig - if sys.version_info >= (3, 8): - cls.addClassCleanup(_restore_oe) + cls.addClassCleanup(_restore_oe) sys.argv[1:] = ["/new", src_dir + "\\_dbgscript.py"] if not _indebugger: thisApp.InitInstance() @@ -65,7 +64,7 @@ def tearDownClass(cls): win32api.PostQuitMessage() win32gui.PumpWaitingMessages() cls.app.ExitInstance() - sys.stdout, sys.stderr = cls.std_oe_orig # py3.7 + sys.stdout, sys.stderr = cls.std_oe_orig def test_1_pydocs_and_finddlg(self): mf = win32ui.GetMainFrame() diff --git a/build_all.bat b/build_all.bat index 536aee00d..ec8cbbaa2 100644 --- a/build_all.bat +++ b/build_all.bat @@ -1,7 +1,3 @@ -py -3.7-32 setup.py -q build -@if errorlevel 1 goto failed -py -3.7 setup.py -q build -@if errorlevel 1 goto failed py -3.8-32 setup.py -q build @if errorlevel 1 goto failed py -3.8 setup.py -q build diff --git a/build_env.md b/build_env.md index d9c55ac10..4f616bf99 100644 --- a/build_env.md +++ b/build_env.md @@ -149,7 +149,6 @@ from the pywin32 directory. - Update `setuptools` and set the following environment variables to ensure it is used: ```shell - set SETUPTOOLS_USE_DISTUTILS=1 set DISTUTILS_USE_SDK=1 ``` diff --git a/com/win32com/test/pippo_server.py b/com/win32com/test/pippo_server.py index c5ae2df40..d8e964623 100644 --- a/com/win32com/test/pippo_server.py +++ b/com/win32com/test/pippo_server.py @@ -41,10 +41,7 @@ def Method3(self, in1): def BuildTypelib(): - if sys.version_info >= (3, 8): - from setuptools.modified import newer - else: - from distutils.dep_util import newer + from setuptools.modified import newer this_dir = os.path.dirname(__file__) idl = os.path.abspath(os.path.join(this_dir, "pippo.idl")) diff --git a/make_all.bat b/make_all.bat index c6d6a2b33..05855ddfb 100644 --- a/make_all.bat +++ b/make_all.bat @@ -13,11 +13,6 @@ rem Now the binaries. rem Check /build_env.md#build-environment to make sure you have all the required components installed rem (bdist_wininst needs --target-version to name the installers correctly!) -py -3.7-32 setup.py -q bdist_wininst --skip-build --target-version=3.7 -py -3.7-32 setup.py -q bdist_wheel --skip-build -py -3.7 setup.py -q bdist_wininst --skip-build --target-version=3.7 -py -3.7 setup.py -q bdist_wheel --skip-build - py -3.8-32 setup.py -q bdist_wininst --skip-build --target-version=3.8 py -3.8-32 setup.py -q bdist_wheel --skip-build py -3.8 setup.py -q bdist_wininst --skip-build --target-version=3.8 diff --git a/mypy.ini b/mypy.ini index bd1cd4316..e4676e0c7 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,7 +1,6 @@ [mypy] show_column_numbers = true ; Target the oldest supported version in editors and default CLI -; mypy 1.5 dropped support for Python 3.7 python_version = 3.8 strict = true diff --git a/pyrightconfig.json b/pyrightconfig.json index 1721da1a2..d96b3fc9d 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,7 +1,7 @@ { "typeCheckingMode": "basic", // Target the oldest supported version in editors and default CLI - "pythonVersion": "3.7", + "pythonVersion": "3.8", // Keep it simple for now by allowing both mypy and pyright to use `type: ignore` "enableTypeIgnoreComments": true, // Exclude from scanning when running pyright diff --git a/ruff.toml b/ruff.toml index 603043e8f..eab7fcce1 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,4 +1,4 @@ -target-version = "py37" # Target the oldest supported version +target-version = "py38" # Target the oldest supported version in editors and default CLI [lint] select = [ diff --git a/setup.py b/setup.py index ce0120e24..e25465fd7 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ from setuptools.command.build_ext import build_ext from setuptools.command.install import install from setuptools.command.install_lib import install_lib +from setuptools.modified import newer_group from tempfile import gettempdir from typing import Iterable @@ -47,11 +48,6 @@ from distutils._msvccompiler import MSVCCompiler from distutils.command.install_data import install_data -if sys.version_info >= (3, 8): - from setuptools.modified import newer_group -else: - from distutils.dep_util import newer_group - build_id_patch = build_id if not "." in build_id_patch: build_id_patch += ".0" @@ -868,12 +864,6 @@ def run(self): install.run(self) # Custom script we run at the end of installing - this is the same script # run by bdist_wininst - # This child process won't be able to install the system DLLs until our - # process has terminated (as distutils imports win32api!), so we must use - # some 'no wait' executor - spawn seems fine! We pass the PID of this - # process so the child will wait for us. - # XXX - hmm - a closer look at distutils shows it only uses win32api - # if _winreg fails - and this never should. Need to revisit this! # If self.root has a value, it means we are being "installed" into # some other directory than Python itself (eg, into a temp directory # for bdist_wininst to use) - in which case we must *not* run our @@ -885,7 +875,8 @@ def run(self): if not os.path.isfile(filename): raise RuntimeError(f"Can't find '{filename}'") print("Executing post install script...") - # What executable to use? This one I guess. + # As of setuptools>=74.0.0, we no longer need to + # be concerned about distutils calling win32api subprocess.Popen( [ sys.executable, @@ -905,8 +896,8 @@ def install(self): # This is crazy - in setuptools 61.1.0 (and probably some earlier versions), the # install_lib and build comments don't agree on where the .py files to install can # be found, so we end up with a warning logged: - # `warning: my_install_lib: 'build\lib.win-amd64-3.7' does not exist -- no Python modules to install` - # (because they are actually in `build\lib.win-amd64-cpython-37`!) + # `warning: my_install_lib: 'build\lib.win-amd64-3.8' does not exist -- no Python modules to install` + # (because they are actually in `build\lib.win-amd64-cpython-38`!) # It's not an error though, so we end up with .exe installers lacking our lib files! builder = self.get_finalized_command("build") if os.path.isdir(builder.build_platlib) and not os.path.isdir(self.build_dir): @@ -2151,7 +2142,6 @@ def convert_optional_data_files(files): "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/win32/Lib/pywin32_bootstrap.py b/win32/Lib/pywin32_bootstrap.py index fbc4f7be4..c9f59a56d 100644 --- a/win32/Lib/pywin32_bootstrap.py +++ b/win32/Lib/pywin32_bootstrap.py @@ -4,8 +4,6 @@ # In short, there's a directory installed by pywin32 named 'pywin32_system32' # with some important DLLs which need to be found by Python when some pywin32 # modules are imported. -# If Python has `os.add_dll_directory()`, we need to call it with this path. -# Otherwise, we add this path to PATH. try: @@ -19,11 +17,5 @@ # https://docs.python.org/3/reference/import.html#__path__ for path in pywin32_system32.__path__: if os.path.isdir(path): - if hasattr(os, "add_dll_directory"): - os.add_dll_directory(path) - # This is to ensure the pywin32 path is in the beginning to find the - # pywin32 DLLs first and prevent other PATH entries to shadow them - elif not os.environ["PATH"].startswith(path): - os.environ["PATH"] = os.environ["PATH"].replace(os.pathsep + path, "") - os.environ["PATH"] = path + os.pathsep + os.environ["PATH"] + os.add_dll_directory(path) break diff --git a/win32/src/_win32sysloader.cpp b/win32/src/_win32sysloader.cpp index 0a9e4dcac..9a9ef7c27 100644 --- a/win32/src/_win32sysloader.cpp +++ b/win32/src/_win32sysloader.cpp @@ -52,13 +52,7 @@ static PyObject *PyLoadModule(PyObject *self, PyObject *args) if (!modName) return NULL; - // Python 3.7 vs 3.8 use different flags for LoadLibraryEx and we match them. - // See github issue 1787. -#if (PY_VERSION_HEX < 0x03080000) - HINSTANCE hinst = LoadLibraryEx(modName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); -#else HINSTANCE hinst = LoadLibraryEx(modName, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); -#endif PyMem_Free(modName); if (hinst == NULL) { Py_INCREF(Py_None); From b922bf5bab4d098000e4a604ac46a60ae685b3f4 Mon Sep 17 00:00:00 2001 From: Thomas Geppert Date: Fri, 18 Oct 2024 14:52:55 +0200 Subject: [PATCH 34/34] Implement the creation of SAFEARRAY(VT_RECORD) from a sequence of COM Records (#2317) * Implemented the creation of SAFEARRAY(VT_RECORD) from a sequence of COM Records and the possibility to use instances of this type as COM Record fields. * Added a untitest for COM Records with SAFEARRAY(VT_RECORD) fields. * Added CHANGELOG entry. --- CHANGES.txt | 3 ++- com/TestSources/PyCOMTest/PyCOMImpl.cpp | 21 ++++++++++++++++ com/TestSources/PyCOMTest/PyCOMImpl.h | 1 + com/TestSources/PyCOMTest/PyCOMTest.idl | 6 +++++ com/win32com/src/PyRecord.cpp | 11 ++++++--- com/win32com/src/oleargs.cpp | 33 ++++++++++++++++++++++--- com/win32com/test/testPyComTest.py | 14 +++++++++++ 7 files changed, 80 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d8978afd5..82cf59213 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,7 +15,8 @@ Coming in build 309, as yet unreleased -------------------------------------- * Dropped support for Python 3.7 (#2207, @Avasam) -* Implement record pointers as [in, out] method parameters of a Dispatch Interface (#2310) +* Implement the creation of SAFEARRAY(VT_RECORD) from a sequence of COM Records (#2317, @geppi) +* Implement record pointers as [in, out] method parameters of a Dispatch Interface (#2304, #2310, @geppi) * Fix memory leak converting to PyObject from some SAFEARRAY elements (#2316) * Fix bug where makepy support was unnecessarily generated (#2354, #2353, @geppi) * Fail sooner on invalid `win32timezone.TimeZoneInfo` creation (#2338, @Avasam) diff --git a/com/TestSources/PyCOMTest/PyCOMImpl.cpp b/com/TestSources/PyCOMTest/PyCOMImpl.cpp index d58c00f99..6ba0af0c4 100644 --- a/com/TestSources/PyCOMTest/PyCOMImpl.cpp +++ b/com/TestSources/PyCOMTest/PyCOMImpl.cpp @@ -626,6 +626,27 @@ HRESULT CPyCOMTest::ModifyStruct(TestStruct1 *prec) return S_OK; } +HRESULT CPyCOMTest::VerifyArrayOfStructs(TestStruct2 *prec, VARIANT_BOOL *is_ok) +{ + long i; + TestStruct1 *pdata = NULL; + HRESULT hr; + + hr = SafeArrayAccessData(prec->array_of_records, reinterpret_cast(&pdata)); + if (FAILED(hr)) { + return E_FAIL; + } + *is_ok = VARIANT_TRUE; + for (i = 0; i < prec->rec_count; i++) + { + if (_wcsicmp(pdata[i].str_value, L"This is record number") != 0 || pdata[i].int_value != i + 1) { + *is_ok = VARIANT_FALSE; + break; + } + } + return S_OK; +} + HRESULT CPyCOMTest::DoubleString(BSTR in, BSTR *out) { *out = SysAllocStringLen(NULL, SysStringLen(in) * 2); diff --git a/com/TestSources/PyCOMTest/PyCOMImpl.h b/com/TestSources/PyCOMTest/PyCOMImpl.h index 50eb8dd0d..7b1f83c2b 100644 --- a/com/TestSources/PyCOMTest/PyCOMImpl.h +++ b/com/TestSources/PyCOMTest/PyCOMImpl.h @@ -120,6 +120,7 @@ class CPyCOMTest : public IDispatchImplowner); else if (V_VT(&vret) == (VT_BYREF | VT_ARRAY | VT_RECORD)) { SAFEARRAY *psa = *V_ARRAYREF(&vret); - int d = SafeArrayGetDim(psa); - if (sub_data == NULL) - return PyErr_Format(PyExc_RuntimeError, "Did not get a buffer for the array!"); if (SafeArrayGetDim(psa) != 1) return PyErr_Format(PyExc_TypeError, "Only support single dimensional arrays of records"); IRecordInfo *sub = NULL; @@ -526,7 +523,13 @@ PyObject *PyRecord::getattro(PyObject *self, PyObject *obname) ret_tuple = PyTuple_New(nelems); if (ret_tuple == NULL) goto array_end; - this_data = (BYTE *)sub_data; + // We're dealing here with a Record field that is a SAFEARRAY of Records. + // Therefore the VARIANT that was returned by the call to 'pyrec->pri->GetFieldNoCopy' + // does contain a reference to the SAFEARRAY of Records, i.e. the actual data of the + // Record elements of this SAFEARRAY is referenced by the 'pvData' field of the SAFEARRAY. + // In this particular case the implementation of 'GetFieldNoCopy' returns a NULL pointer + // in the last parameter, i.e. 'sub_data == NULL'. + this_data = (BYTE *)psa->pvData; for (i = 0; i < nelems; i++) { PyTuple_SET_ITEM(ret_tuple, i, new PyRecord(sub, this_data, pyrec->owner)); this_data += element_size; diff --git a/com/win32com/src/oleargs.cpp b/com/win32com/src/oleargs.cpp index a1338bab5..91fded5b1 100644 --- a/com/win32com/src/oleargs.cpp +++ b/com/win32com/src/oleargs.cpp @@ -4,6 +4,7 @@ #include "stdafx.h" #include "PythonCOM.h" +#include "PyRecord.h" extern PyObject *PyObject_FromRecordInfo(IRecordInfo *, void *, ULONG); extern PyObject *PyObject_FromSAFEARRAYRecordInfo(SAFEARRAY *psa); @@ -278,9 +279,23 @@ BOOL PyCom_VariantFromPyObject(PyObject *obj, VARIANT *var) // So make sure this check is after anything else which qualifies. else if (PySequence_Check(obj)) { V_ARRAY(var) = NULL; // not a valid, existing array. - if (!PyCom_SAFEARRAYFromPyObject(obj, &V_ARRAY(var))) - return FALSE; - V_VT(var) = VT_ARRAY | VT_VARIANT; + BOOL is_record_item = false; + if (PyObject_Length(obj) > 0) { + PyObject *obItemCheck = PySequence_GetItem(obj, 0); + is_record_item = PyRecord_Check(obItemCheck); + } + // If the sequence elements are PyRecord objects we do NOT package + // them as VARIANT elements but put them directly into the SAFEARRAY. + if (is_record_item) { + if (!PyCom_SAFEARRAYFromPyObject(obj, &V_ARRAY(var), VT_RECORD)) + return FALSE; + V_VT(var) = VT_ARRAY | VT_RECORD; + } + else { + if (!PyCom_SAFEARRAYFromPyObject(obj, &V_ARRAY(var))) + return FALSE; + V_VT(var) = VT_ARRAY | VT_VARIANT; + } } else if (PyRecord_Check(obj)) { if (!PyObject_AsVARIANTRecordInfo(obj, var)) @@ -554,6 +569,9 @@ static BOOL PyCom_SAFEARRAYFromPyObjectBuildDimension(PyObject *obj, SAFEARRAY * helper.m_reqdType = vt; ok = helper.MakeObjToVariant(item, &element); switch (vt) { + case VT_RECORD: + pvData = V_RECORD(&element); + break; case VT_DISPATCH: pvData = V_DISPATCH(&element); break; @@ -759,7 +777,14 @@ static BOOL PyCom_SAFEARRAYFromPyObjectEx(PyObject *obj, SAFEARRAY **ppSA, bool if (bAllocNewArray) { // OK - Finally can create the array... - *ppSA = SafeArrayCreate(vt, cDims, pBounds); + if (vt == VT_RECORD) { + // SAFEARRAYS of UDTs need a special treatment. + obItemCheck = PySequence_GetItem(obj, 0); + PyRecord *pyrec = (PyRecord *)obItemCheck; + *ppSA = SafeArrayCreateEx(vt, cDims, pBounds, pyrec->pri); + } + else + *ppSA = SafeArrayCreate(vt, cDims, pBounds); if (*ppSA == NULL) { delete[] pBounds; PyErr_SetString(PyExc_MemoryError, "CreatingSafeArray"); diff --git a/com/win32com/test/testPyComTest.py b/com/win32com/test/testPyComTest.py index dbe933669..50330e356 100644 --- a/com/win32com/test/testPyComTest.py +++ b/com/win32com/test/testPyComTest.py @@ -411,6 +411,7 @@ def TestDynamic(): def TestGenerated(): # Create an instance of the server. + from win32com.client import Record from win32com.client.gencache import EnsureDispatch o = EnsureDispatch("PyCOMTest.PyCOMTest") @@ -433,6 +434,19 @@ def TestGenerated(): coclass = GetClass("{B88DD310-BAE8-11D0-AE86-76F2C1000000}")() TestCounter(coclass, True) + # Test records with SAFEARRAY(VT_RECORD) fields. + progress("Testing records with SAFEARRAY(VT_RECORD) fields.") + l = [] + for i in range(3): + rec = Record("TestStruct1", o) + rec.str_value = "This is record number" + rec.int_value = i + 1 + l.append(rec) + test_rec = Record("TestStruct2", o) + test_rec.array_of_records = l + test_rec.rec_count = i + 1 + assert o.VerifyArrayOfStructs(test_rec) + # XXX - this is failing in dynamic tests, but should work fine. i1, i2 = o.GetMultipleInterfaces() # Yay - is now an instance returned!