Platform SDK: MAPI |
You can simplify the declarations of your implementations of MAPI form interfaces by using the MAPI_interface_METHOD macros, where interface is a form interface defined in the MAPIFORM.H header file. You are not required to use these macros, but if you do not you should take particular care that your declarations conform to the declarations in the MAPIFORM.H header file. For example, you could declare your form server's form object class like this:
class CMyForm : public IPersistMessage, public IMAPIForm, public IMAPIFormAdviseSink { public: CMyForm(CClassFactory *); // ctor takes a class factory object ~CMyForm(void); // MAPI methods that need to be implemented. MAPI_IUNKNOWN_METHODS(IMPL); MAPI_GETLASTERROR_METHOD(IMPL); MAPI_IPERSISTMESSAGE_METHODS(IMPL); MAPI_IMAPIFORM_METHODS(IMPL); MAPI_IMAPIFORMADVISESINK_METHODS(IMPL); // other implementation specific stuff: };