Click here to Skip to main content
16,009,469 members
Home / Discussions / COM
   

COM

 
QuestionHow to access method in other object in COM Pin
chq126-Apr-02 11:13
chq126-Apr-02 11:13 
AnswerRe: How to access method in other object in COM Pin
Mazdak6-Apr-02 17:52
Mazdak6-Apr-02 17:52 
GeneralRe: How to access method in other object in COM Pin
chq127-Apr-02 8:32
chq127-Apr-02 8:32 
GeneralRe: How to access method in other object in COM Pin
Mazdak7-Apr-02 9:21
Mazdak7-Apr-02 9:21 
GeneralRe: How to access method in other object in COM Pin
chq127-Apr-02 16:30
chq127-Apr-02 16:30 
GeneralCoUninitialize doesn't return Pin
sefip3-Apr-02 21:24
sefip3-Apr-02 21:24 
Generalenable delegation to work Pin
David Dal Zot3-Apr-02 3:38
David Dal Zot3-Apr-02 3:38 
QuestionWhat does this code do? Pin
Gerald Schwab1-Apr-02 16:57
Gerald Schwab1-Apr-02 16:57 
Sorry for the duplicate post but the first one stripped off the template args. Look near the bottom of the code snippet. I'm not sure what the code is doing, can someone explain.
template<typename _IIID> class _com_ptr_t {
public:
    typedef _IIID ThisIIID;
    typedef typename _IIID::Interface Interface;
    static const IID& GetIID() throw()
    { 
        return ThisIIID::GetIID(); 
    }

     template<typename _OtherIID> _com_ptr_t(const _com_ptr_t<_OtherIID>& p) throw(_com_error)
        : m_pInterface(NULL)
    {
        HRESULT hr = _QueryInterface(p);

        if (FAILED(hr) && (hr != E_NOINTERFACE)) {
            _com_issue_error(hr);
        }
    }
    template<typename _InterfaceType> _com_ptr_t(_InterfaceType* p) throw(_com_error)
        : m_pInterface(NULL)
    {
        HRESULT hr = _QueryInterface(p);

        if (FAILED(hr) && (hr != E_NOINTERFACE)) {
            _com_issue_error(hr);
        }
    }
    template<> _com_ptr_t(LPSTR str) throw(_com_error)
    {
        new(this) _com_ptr_t(static_cast<LPCSTR> (str), NULL);
    }
    ...
}

AnswerRe: What does this code do? Pin
Michael Dunn1-Apr-02 21:15
sitebuilderMichael Dunn1-Apr-02 21:15 
GeneralRe: What does this code do? Pin
Gerald Schwab2-Apr-02 5:28
Gerald Schwab2-Apr-02 5:28 
GeneralRe: What does this code do? Pin
Michael Dunn5-Apr-02 16:19
sitebuilderMichael Dunn5-Apr-02 16:19 
GeneralRe: What does this code do? Pin
Nick Parker5-Apr-02 10:02
protectorNick Parker5-Apr-02 10:02 
GeneralRe: What does this code do? Pin
Michael Dunn5-Apr-02 16:20
sitebuilderMichael Dunn5-Apr-02 16:20 
QuestionWhat does this code do? Pin
Gerald Schwab1-Apr-02 16:52
Gerald Schwab1-Apr-02 16:52 
AnswerRe: What does this code do? Pin
czer4-Apr-02 3:05
czer4-Apr-02 3:05 
GeneralCComBSTR objects Pin
Madmaximus1-Apr-02 10:40
Madmaximus1-Apr-02 10:40 
GeneralRe: CComBSTR objects Pin
Michael Dunn1-Apr-02 17:04
sitebuilderMichael Dunn1-Apr-02 17:04 
GeneralRe: CComBSTR objects Pin
Madmaximus2-Apr-02 1:54
Madmaximus2-Apr-02 1:54 
GeneralATL Control Containment problem Pin
31-Mar-02 7:57
suss31-Mar-02 7:57 
QuestionBuild a CA ??? Pin
dlhson31-Mar-02 3:48
dlhson31-Mar-02 3:48 
AnswerRe: Build a CA ??? Pin
Jon Newman31-Mar-02 4:04
Jon Newman31-Mar-02 4:04 
GeneralRe: Build a CA ??? Pin
dlhson31-Mar-02 4:10
dlhson31-Mar-02 4:10 
GeneralRe: Build a CA ??? Pin
Jon Newman31-Mar-02 4:12
Jon Newman31-Mar-02 4:12 
Generalactivex control problem Pin
29-Mar-02 15:22
suss29-Mar-02 15:22 
GeneralNon-client area messages Pin
29-Mar-02 13:15
suss29-Mar-02 13:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.