// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the SMTPDLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// SMTPDLL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#define SMTPDLL_EXPORTS
#ifdef SMTPDLL_EXPORTS
#define SMTPDLL_API __declspec(dllexport)
#else
#define SMTPDLL_API __declspec(dllimport)
#endif
const enum{
SNDEMAIL_SUCCESS,
SNDEMAIL_CREATE_ERROR,
SNDEMAIL_CONNECT_ERROR,
SNDEMAIL_SENDERROR
};
// This class is exported from the smtpDll.dll
SMTPDLL_API int SendEmail(LPSTR szUser,LPSTR szPwd,LPSTR szTo,LPSTR szFrom,LPSTR szHead,LPSTR szText);
- 1
- 2
前往页