OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mailer.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Class definition for implementation of Mail enabling.
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_MAILER_H)
10#define OWL_MAILER_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/module.h>
18
19
20namespace owl {
21
22#include <owl/preclass.h>
23
24//
25/// \class TMailer
26// ~~~~~ ~~~~~~~
27/// The TMailer class encapsulates the MAPI DLL (MAPI [32].DLL). It provides an easy
28/// method to dynamically test for the availability of the DLL and bind to its
29/// exported functions at runtime. By using the TMailer class instead of direct
30/// calls to the MAPI DLL, ObjectWindows applications can provide the appropriate
31/// behavior when running in an environment where the DLL is not available.
32///
33/// Each data member of the TMailer class corresponds to the API with a similar name
34/// exposed by the MAPI DLL. For example, TMailerDll::MAPISendDocuments corresponds
35/// to the MAPISendDocuments API exported by the MAPI DLL.
36/// The following is a list of the members of the TMailer class corresponding to
37/// functions exposed by the DLL. For more information about these members, consult
38/// the documentation about the corresponding API exposed by the MAPI DLL.
39//
40class _OWLCLASS TMailer : public TModule {
41 public:
42 TMailer();
43
44 bool IsMAPIAvailable() const;
45 void SendDocuments(TWindow* owner, LPCTSTR paths,
46 LPCTSTR names = 0, bool asynchWork = false);
47
48 void SendDocuments(TWindow* owner, const tstring& paths, const tstring& names = tstring(), bool asynchWork = false)
49 {SendDocuments(owner, paths.c_str(), names.empty() ? nullptr : names.c_str(), asynchWork);}
50
52};
53
54#include <owl/posclass.h>
55
56
57} // OWL namespace
58
59
60#endif // OWL_MAILER_H
The TMailer class encapsulates the MAPI DLL (MAPI [32].DLL).
Definition mailer.h:40
void SendDocuments(TWindow *owner, const tstring &paths, const tstring &names=tstring(), bool asynchWork=false)
Definition mailer.h:48
TModuleProc5< ULONG, ULONG_PTR, LPSTR, LPSTR, LPSTR, ULONG > MAPISendDocuments
Definition mailer.h:51
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
Definition of class TModule.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
std::string tstring
Definition defs.h:79
#define _OWLCLASS
Definition defs.h:338