⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jmail.tli

📁 本压缩软件为《Visual C++6.0基础教程》(黑魔方系列)一书的源代码
💻 TLI
📖 第 1 页 / 共 4 页
字号:
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IRecipientPtr(_result, false);
}

inline HRESULT IRecipients::Add ( struct IRecipient * Value ) {
    HRESULT _hr = raw_Add(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IRecipients::Clear ( ) {
    HRESULT _hr = raw_Clear();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// interface IRecipient wrapper method implementations
//

inline _bstr_t IRecipient::GetName ( ) {
    BSTR _result;
    HRESULT _hr = get_Name(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline _bstr_t IRecipient::GetEMail ( ) {
    BSTR _result;
    HRESULT _hr = get_EMail(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline long IRecipient::GetReType ( ) {
    long _result;
    HRESULT _hr = get_ReType(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline IRecipientPtr IRecipient::New ( _bstr_t Name, _bstr_t EMail, char recipientType ) {
    struct IRecipient * _result;
    HRESULT _hr = raw_New(Name, EMail, recipientType, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IRecipientPtr(_result, false);
}

//
// interface IAttachments wrapper method implementations
//

inline long IAttachments::GetCount ( ) {
    long _result;
    HRESULT _hr = get_Count(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT IAttachments::Add ( struct IAttachment * * Attachment ) {
    HRESULT _hr = raw_Add(Attachment);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IAttachmentPtr IAttachments::GetItem ( long index ) {
    struct IAttachment * _result;
    HRESULT _hr = get_Item(index, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IAttachmentPtr(_result, false);
}

inline HRESULT IAttachments::Clear ( ) {
    HRESULT _hr = raw_Clear();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// interface IAttachment wrapper method implementations
//

inline _bstr_t IAttachment::GetName ( ) {
    BSTR _result;
    HRESULT _hr = get_Name(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline long IAttachment::GetSize ( ) {
    long _result;
    HRESULT _hr = get_Size(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline _bstr_t IAttachment::GetContentType ( ) {
    BSTR _result;
    HRESULT _hr = get_ContentType(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline HRESULT IAttachment::SaveToFile ( _bstr_t FileName ) {
    HRESULT _hr = raw_SaveToFile(FileName);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline _bstr_t IAttachment::GetData ( ) {
    BSTR _result;
    HRESULT _hr = get_Data(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void IAttachment::PutData ( _bstr_t Value ) {
    HRESULT _hr = put_Data(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline IAttachmentPtr IAttachment::New ( _bstr_t FileName, _bstr_t ContentType, _bstr_t Data ) {
    struct IAttachment * _result;
    HRESULT _hr = raw_New(FileName, ContentType, Data, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IAttachmentPtr(_result, false);
}

inline VARIANT_BOOL IAttachment::GetisInline ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_isInline(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IAttachment::PutisInline ( VARIANT_BOOL Value ) {
    HRESULT _hr = put_isInline(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t IAttachment::GetBinaryData ( ) {
    BSTR _result;
    HRESULT _hr = get_BinaryData(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void IAttachment::PutBinaryData ( _bstr_t Value ) {
    HRESULT _hr = put_BinaryData(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

//
// interface ISMTPMail wrapper method implementations
//

inline VARIANT_BOOL ISMTPMail::Execute ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = raw_Execute(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT ISMTPMail::AppendBodyFromFile ( _bstr_t FileName ) {
    HRESULT _hr = raw_AppendBodyFromFile(FileName);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ISMTPMail::AppendText ( _bstr_t Text ) {
    HRESULT _hr = raw_AppendText(Text);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline _bstr_t ISMTPMail::AddAttachment ( _bstr_t FileName, _bstr_t ContentType ) {
    BSTR _result;
    HRESULT _hr = raw_AddAttachment(FileName, ContentType, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline _bstr_t ISMTPMail::AddCustomAttachment ( _bstr_t FileName, _bstr_t Data ) {
    BSTR _result;
    HRESULT _hr = raw_AddCustomAttachment(FileName, Data, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline HRESULT ISMTPMail::AddRecipient ( _bstr_t EMail ) {
    HRESULT _hr = raw_AddRecipient(EMail);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ISMTPMail::AddRecipientCC ( _bstr_t EMail ) {
    HRESULT _hr = raw_AddRecipientCC(EMail);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ISMTPMail::AddRecipientBCC ( _bstr_t EMail ) {
    HRESULT _hr = raw_AddRecipientBCC(EMail);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ISMTPMail::AddHeader ( _bstr_t XHeader, _bstr_t Value ) {
    HRESULT _hr = raw_AddHeader(XHeader, Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ISMTPMail::AddNativeHeader ( _bstr_t Header, _bstr_t Value ) {
    HRESULT _hr = raw_AddNativeHeader(Header, Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ISMTPMail::ClearRecipients ( ) {
    HRESULT _hr = raw_ClearRecipients();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ISMTPMail::ClearAttachments ( ) {
    HRESULT _hr = raw_ClearAttachments();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline _bstr_t ISMTPMail::GetServerAddress ( ) {
    BSTR _result;
    HRESULT _hr = get_ServerAddress(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutServerAddress ( _bstr_t Value ) {
    HRESULT _hr = put_ServerAddress(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long ISMTPMail::GetServerPort ( ) {
    long _result;
    HRESULT _hr = get_ServerPort(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ISMTPMail::PutServerPort ( long Value ) {
    HRESULT _hr = put_ServerPort(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetSender ( ) {
    BSTR _result;
    HRESULT _hr = get_Sender(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutSender ( _bstr_t Value ) {
    HRESULT _hr = put_Sender(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetSenderName ( ) {
    BSTR _result;
    HRESULT _hr = get_SenderName(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutSenderName ( _bstr_t Value ) {
    HRESULT _hr = put_SenderName(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetReplyTo ( ) {
    BSTR _result;
    HRESULT _hr = get_ReplyTo(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutReplyTo ( _bstr_t Value ) {
    HRESULT _hr = put_ReplyTo(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetSubject ( ) {
    BSTR _result;
    HRESULT _hr = get_Subject(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutSubject ( _bstr_t Value ) {
    HRESULT _hr = put_Subject(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetBody ( ) {
    BSTR _result;
    HRESULT _hr = get_Body(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutBody ( _bstr_t Value ) {
    HRESULT _hr = put_Body(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetContentType ( ) {
    BSTR _result;
    HRESULT _hr = get_ContentType(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutContentType ( _bstr_t Value ) {
    HRESULT _hr = put_ContentType(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long ISMTPMail::GetPriority ( ) {
    long _result;
    HRESULT _hr = get_Priority(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ISMTPMail::PutPriority ( long Value ) {
    HRESULT _hr = put_Priority(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetHideRecipients ( ) {
    BSTR _result;
    HRESULT _hr = get_HideRecipients(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutHideRecipients ( _bstr_t Value ) {
    HRESULT _hr = put_HideRecipients(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetMailDomain ( ) {
    BSTR _result;
    HRESULT _hr = get_MailDomain(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutMailDomain ( _bstr_t Value ) {
    HRESULT _hr = put_MailDomain(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline VARIANT_BOOL ISMTPMail::GetLazysend ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_Lazysend(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ISMTPMail::PutLazysend ( VARIANT_BOOL Value ) {
    HRESULT _hr = put_Lazysend(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetCharset ( ) {
    BSTR _result;
    HRESULT _hr = get_Charset(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutCharset ( _bstr_t Value ) {
    HRESULT _hr = put_Charset(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetContentTransferEncoding ( ) {
    BSTR _result;
    HRESULT _hr = get_ContentTransferEncoding(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutContentTransferEncoding ( _bstr_t Value ) {
    HRESULT _hr = put_ContentTransferEncoding(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetMimeVersion ( ) {
    BSTR _result;
    HRESULT _hr = get_MimeVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutMimeVersion ( _bstr_t Value ) {
    HRESULT _hr = put_MimeVersion(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ISMTPMail::GetEncoding ( ) {
    BSTR _result;
    HRESULT _hr = get_Encoding(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ISMTPMail::PutEncoding ( _bstr_t Value ) {
    HRESULT _hr = put_Encoding(Value);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline HRESULT ISMTPMail::AddRecipientEx ( _bstr_t EMail, _bstr_t Name ) {
    HRESULT _hr = raw_AddRecipientEx(EMail, Name);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -