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

📄 msnmsgr.tli

📁 获取MSN Messenger的联系人列表的C++程序源代码
💻 TLI
📖 第 1 页 / 共 2 页
字号:
// Created by Microsoft (R) C/C++ Compiler Version 12.00.8447.0 (8928aaa9).
//
// msnmsgr.tli
//
// Wrapper implementations for Win32 type library msnmsgr.tlb
// compiler-generated file created 03/11/04 at 17:22:56 - DO NOT EDIT!

#pragma once

//
// interface IMessenger wrapper method implementations
//

inline IDispatchPtr IMessenger::GetWindow ( ) {
    IDispatch * _result;
    HRESULT _hr = get_Window(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT IMessenger::ViewProfile ( const _variant_t & vContact ) {
    HRESULT _hr = raw_ViewProfile(vContact);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline _bstr_t IMessenger::GetReceiveFileDirectory ( ) {
    BSTR _result;
    HRESULT _hr = get_ReceiveFileDirectory(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline IDispatchPtr IMessenger::StartVoice ( const _variant_t & vContact ) {
    IDispatch * _result;
    HRESULT _hr = raw_StartVoice(vContact, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline IDispatchPtr IMessenger::InviteApp ( const _variant_t & vContact, _bstr_t bstrAppID ) {
    IDispatch * _result;
    HRESULT _hr = raw_InviteApp(vContact, bstrAppID, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT IMessenger::SendMail ( const _variant_t & vContact ) {
    HRESULT _hr = raw_SendMail(vContact);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IMessenger::OpenInbox ( ) {
    HRESULT _hr = raw_OpenInbox();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IDispatchPtr IMessenger::SendFile ( const _variant_t & vContact, _bstr_t bstrFileName ) {
    IDispatch * _result;
    HRESULT _hr = raw_SendFile(vContact, bstrFileName, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT IMessenger::Signout ( ) {
    HRESULT _hr = raw_Signout();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IMessenger::Signin ( long hwndParent, _bstr_t bstrSigninName, _bstr_t bstrPassword ) {
    HRESULT _hr = raw_Signin(hwndParent, bstrSigninName, bstrPassword);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IDispatchPtr IMessenger::GetContact ( _bstr_t bstrSigninName, _bstr_t bstrServiceId ) {
    IDispatch * _result;
    HRESULT _hr = raw_GetContact(bstrSigninName, bstrServiceId, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT IMessenger::OptionsPages ( long hwndParent, MOPTIONPAGE MOPTIONPAGE ) {
    HRESULT _hr = raw_OptionsPages(hwndParent, MOPTIONPAGE);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IMessenger::AddContact ( long hwndParent, _bstr_t bstrEMail ) {
    HRESULT _hr = raw_AddContact(hwndParent, bstrEMail);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IMessenger::FindContact ( long hwndParent, _bstr_t bstrFirstName, _bstr_t bstrLastName, const _variant_t & vbstrCity, const _variant_t & vbstrState, const _variant_t & vbstrCountry ) {
    HRESULT _hr = raw_FindContact(hwndParent, bstrFirstName, bstrLastName, vbstrCity, vbstrState, vbstrCountry);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IDispatchPtr IMessenger::InstantMessage ( const _variant_t & vContact ) {
    IDispatch * _result;
    HRESULT _hr = raw_InstantMessage(vContact, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline IDispatchPtr IMessenger::Phone ( const _variant_t & vContact, MPHONE_TYPE ePhoneNumber, _bstr_t bstrNumber ) {
    IDispatch * _result;
    HRESULT _hr = raw_Phone(vContact, ePhoneNumber, bstrNumber, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT IMessenger::MediaWizard ( long hwndParent ) {
    HRESULT _hr = raw_MediaWizard(hwndParent);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IDispatchPtr IMessenger::Page ( const _variant_t & vContact ) {
    IDispatch * _result;
    HRESULT _hr = raw_Page(vContact, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT IMessenger::AutoSignin ( ) {
    HRESULT _hr = raw_AutoSignin();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IDispatchPtr IMessenger::GetMyContacts ( ) {
    IDispatch * _result;
    HRESULT _hr = get_MyContacts(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline _bstr_t IMessenger::GetMySigninName ( ) {
    BSTR _result;
    HRESULT _hr = get_MySigninName(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline _bstr_t IMessenger::GetMyFriendlyName ( ) {
    BSTR _result;
    HRESULT _hr = get_MyFriendlyName(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void IMessenger::PutMyStatus ( MISTATUS pmStatus ) {
    HRESULT _hr = put_MyStatus(pmStatus);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline MISTATUS IMessenger::GetMyStatus ( ) {
    MISTATUS _result;
    HRESULT _hr = get_MyStatus(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline long IMessenger::GetUnreadEmailCount ( MUAFOLDER mFolder ) {
    long _result;
    HRESULT _hr = get_UnreadEmailCount(mFolder, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline _bstr_t IMessenger::GetMyServiceName ( ) {
    BSTR _result;
    HRESULT _hr = get_MyServiceName(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline _bstr_t IMessenger::GetMyPhoneNumber ( MPHONE_TYPE PhoneType ) {
    BSTR _result;
    HRESULT _hr = get_MyPhoneNumber(PhoneType, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline _variant_t IMessenger::GetMyProperty ( MCONTACTPROPERTY ePropType ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_MyProperty(ePropType, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline void IMessenger::PutMyProperty ( MCONTACTPROPERTY ePropType, const _variant_t & pvPropVal ) {
    HRESULT _hr = put_MyProperty(ePropType, pvPropVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t IMessenger::GetMyServiceId ( ) {
    BSTR _result;
    HRESULT _hr = get_MyServiceId(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline IDispatchPtr IMessenger::GetServices ( ) {
    IDispatch * _result;
    HRESULT _hr = get_Services(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

//
// interface IMessenger2 wrapper method implementations
//

inline MUASORT IMessenger2::GetContactsSortOrder ( ) {
    MUASORT _result;
    HRESULT _hr = get_ContactsSortOrder(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IMessenger2::PutContactsSortOrder ( MUASORT pSort ) {
    HRESULT _hr = put_ContactsSortOrder(pSort);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline IDispatchPtr IMessenger2::StartVideo ( const _variant_t & vContact ) {
    IDispatch * _result;
    HRESULT _hr = raw_StartVideo(vContact, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline IDispatchPtr IMessenger2::GetMyGroups ( ) {
    IDispatch * _result;
    HRESULT _hr = get_MyGroups(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline IDispatchPtr IMessenger2::CreateGroup ( _bstr_t bstrName, const _variant_t & vService ) {
    IDispatch * _result;
    HRESULT _hr = raw_CreateGroup(bstrName, vService, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

//
// interface IMessenger3 wrapper method implementations
//

inline _variant_t IMessenger3::GetProperty ( MMESSENGERPROPERTY ePropType ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_Property(ePropType, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline void IMessenger3::PutProperty ( MMESSENGERPROPERTY ePropType, const _variant_t & pvPropVal ) {
    HRESULT _hr = put_Property(ePropType, pvPropVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

//
// dispinterface DMessengerEvents wrapper method implementations
//

inline HRESULT DMessengerEvents::OnGroupAdded ( long hr, IDispatch * pMGroup ) {
    return _com_dispatch_method(this, 0x415, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009", hr, pMGroup);
}

inline HRESULT DMessengerEvents::OnGroupRemoved ( long hr, IDispatch * pMGroup ) {
    return _com_dispatch_method(this, 0x416, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009", hr, pMGroup);
}

inline HRESULT DMessengerEvents::OnGroupNameChanged ( long hr, IDispatch * pMGroup ) {
    return _com_dispatch_method(this, 0x417, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009", hr, pMGroup);
}

inline HRESULT DMessengerEvents::OnContactAddedToGroup ( long hr, IDispatch * pMGroup, IDispatch * pMContact ) {
    return _com_dispatch_method(this, 0x418, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x0009", hr, pMGroup, pMContact);
}

inline HRESULT DMessengerEvents::OnContactRemovedFromGroup ( long hr, IDispatch * pMGroup, IDispatch * pMContact ) {
    return _com_dispatch_method(this, 0x419, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x0009", hr, pMGroup, pMContact);
}

inline HRESULT DMessengerEvents::OnIMWindowCreated ( IDispatch * pIMWindow ) {
    return _com_dispatch_method(this, 0x411, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009", pIMWindow);
}

inline HRESULT DMessengerEvents::OnIMWindowDestroyed ( IDispatch * pIMWindow ) {
    return _com_dispatch_method(this, 0x412, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009", pIMWindow);
}

inline HRESULT DMessengerEvents::OnIMWindowContactAdded ( IDispatch * pContact, IDispatch * pIMWindow ) {
    return _com_dispatch_method(this, 0x413, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x0009", pContact, pIMWindow);
}

inline HRESULT DMessengerEvents::OnIMWindowContactRemoved ( IDispatch * pContact, IDispatch * pIMWindow ) {
    return _com_dispatch_method(this, 0x414, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x0009", pContact, pIMWindow);
}

inline HRESULT DMessengerEvents::OnAppShutdown ( ) {
    return _com_dispatch_method(this, 0x408, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

inline HRESULT DMessengerEvents::OnSignin ( long hr ) {
    return _com_dispatch_method(this, 0x400, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003", hr);
}

inline HRESULT DMessengerEvents::OnSignout ( ) {
    return _com_dispatch_method(this, 0x401, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

inline HRESULT DMessengerEvents::OnContactListAdd ( long hr, IDispatch * pMContact ) {
    return _com_dispatch_method(this, 0x402, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009", hr, pMContact);
}

inline HRESULT DMessengerEvents::OnContactListRemove ( long hr, IDispatch * pMContact ) {
    return _com_dispatch_method(this, 0x403, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009", hr, pMContact);
}

inline HRESULT DMessengerEvents::OnMyFriendlyNameChange ( long hr, _bstr_t bstrPrevFriendlyName ) {
    return _com_dispatch_method(this, 0x405, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0008", hr, (BSTR)bstrPrevFriendlyName);
}

inline HRESULT DMessengerEvents::OnMyStatusChange ( long hr, MISTATUS mMyStatus ) {
    return _com_dispatch_method(this, 0x407, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0003", hr, mMyStatus);
}

inline HRESULT DMessengerEvents::OnMyPhoneChange ( MPHONE_TYPE PhoneType, _bstr_t bstrNumber ) {
    return _com_dispatch_method(this, 0x40e, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0008", PhoneType, (BSTR)bstrNumber);
}

inline HRESULT DMessengerEvents::OnMyPropertyChange ( long hr, MCONTACTPROPERTY ePropType, const _variant_t & vPropVal ) {
    return _com_dispatch_method(this, 0x409, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0003\x000c", hr, ePropType, &vPropVal);
}

inline HRESULT DMessengerEvents::OnContactFriendlyNameChange ( long hr, IDispatch * pMContact, _bstr_t bstrPrevFriendlyName ) {
    return _com_dispatch_method(this, 0x404, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x0008", hr, pMContact, (BSTR)bstrPrevFriendlyName);
}

inline HRESULT DMessengerEvents::OnContactStatusChange ( IDispatch * pMContact, MISTATUS mStatus ) {
    return _com_dispatch_method(this, 0x406, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x0003", pMContact, mStatus);
}

inline HRESULT DMessengerEvents::OnContactPropertyChange ( long hr, IDispatch * pContact, MCONTACTPROPERTY ePropType, const _variant_t & vPropVal ) {
    return _com_dispatch_method(this, 0x40a, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x0003\x000c", hr, pContact, ePropType, &vPropVal);
}

inline HRESULT DMessengerEvents::OnContactBlockChange ( long hr, IDispatch * pContact, VARIANT_BOOL pBoolBlock ) {
    return _com_dispatch_method(this, 0x40b, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x000b", hr, pContact, pBoolBlock);
}

inline HRESULT DMessengerEvents::OnContactPagerChange ( long hr, IDispatch * pContact, VARIANT_BOOL pBoolPage ) {
    return _com_dispatch_method(this, 0x40c, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x000b", hr, pContact, pBoolPage);
}

inline HRESULT DMessengerEvents::OnContactPhoneChange ( long hr, IDispatch * pContact, MPHONE_TYPE PhoneType, _bstr_t bstrNumber ) {
    return _com_dispatch_method(this, 0x40d, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x0003\x0008", hr, pContact, PhoneType, (BSTR)bstrNumber);
}

⌨️ 快捷键说明

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