[JDEV] (HELP!) How to get a JabberSession pointer from JabberCOM
dai_jin at 21cn.com
dai_jin at 21cn.com
Thu Feb 22 03:46:00 CST 2001
Hi Mike,
Thanks for your help.
I tried to change the __uuidof(IJabberSession) to __uuidof(JabberSession), but i still got error. Indeed, i tried using CLSID(f6c7a239-b7b1-11d3-aecb-00a076a018e8). I still can't get the pointer. Can anyone help me?
Thanks very much.
Jim
>
> Hi Jim,
>
> The problem here is in __uuidof(IJabberSession). This gives you the GUID of
> the IJabberSession interface. However, what you want to pass to
> CreateInstance is the GUID of a class, not of an interface. I'm not exactly
> sure how #import would have decided to declare the JabberSession class, but
> you might try __uuidof(JabberSession) or CLSID_JabberSession.
>
> Hope this helps,
> Mike Lin
> mflin at us.ibm.com
>
> dai_jin at 21cn.com@jabber.org on 02/21/2001 08:35:38 AM
>
> Please respond to jdev at jabber.org
>
> Sent by: jdev-admin at jabber.org
>
>
> To: jdev at jabber.org
> cc:
> Subject: [JDEV] (HELP!) How to get a JabberSession pointer from JabberCOM
>
>
>
> I imported JabberCOM and used following code:
>
> IJabberSessionPtr pSession;
> HRESULT hr;
> hr = pMsg.CreateInstance(__uuidof(IJabberSession));
> if (SUCCEEDED(hr))
> {...}
>
> but i always get an error(SUCCEEDED(hr) is FALSE).
> What i missed?
>
> thanks.
> Jim
> ----------------------------------------------
> »¶ÓʹÓà 21CN µç×ÓÓʼþϵͳ http://www.21cn.com
> Thank you for using 21cn.com Email system
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
>
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
----------------------------------------------
»¶ÓʹÓà 21CN µç×ÓÓʼþϵͳ http://www.21cn.com
Thank you for using 21cn.com Email system
More information about the JDev
mailing list