<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I'm having a hell of a time getting the JabberCOM
dll to work under VC++. Here's my code to load and init the
COM. Any help is greatly appreciated.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT size=2>
<P>OleInitialize(NULL);</P>
<P></P>
<P></P>
<P>HRESULT hr;</P>
<P>hr = CoCreateInstance(CLSID_JabberSession, </P>
<P>NULL, </P>
<P>CLSCTX_INPROC_SERVER, </P>
<P>IID_IJabberSession,</P>
<P>(</FONT><FONT color=#0000ff size=2>void</FONT><FONT
size=2>**)&iJabber);</P>
<P></P>
<P>iJabber->put_Username(L"clientname");</P>
<P>iJabber->put_Password(L"password");</P>
<P>iJabber->put_Server(L"jabber.org");</P>
<P>iJabber->put_Resource(L"test");</P>
<P>iJabber->put_Available(</FONT><FONT color=#0000ff size=2>true</FONT><FONT
size=2>);</P>
<P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>
(FAILED(iJabber->DoConnect(TRUE, jatAuto)))</P>
<P>{</P>
<P>AfxMessageBox(L"Failed to login to account", MB_ICONSTOP);</P>
<P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> FALSE;</P>
<P>}</P></FONT></DIV></BODY></HTML>