[JDEV] (HELP!) How to get a JabberSession pointer from JabberCOM
Michael F Lin
Michael_F_Lin at us.ibm.com
Wed Feb 21 11:43:08 CST 2001
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
More information about the JDev
mailing list