Re: how to update my changed picture in my buddy - WeOnlyDo Discussion board

Re: how to update my changed picture in my buddy (General questions)

by wodDamir, Tuesday, July 07, 2009, 15:25 (5617 days ago) @ sapna

Sapna,

The following code accesses your VCard:

[code]IXMPPVCard mycard;
mycard.AttachDispatch(m_XMPP.GetVCard(), TRUE);
AfxMessageBox(mycard.GetJid());[/code]

While this code:

[code] IXMPPContact cnt;
cnt.AttachDispatch(Contact, TRUE);

IXMPPVCard vcard;
vcard.AttachDispatch(cnt.GetVCard(), TRUE);
vcard.Receive();[/code]

Is accessing VCard of a Contact.

I'm not really expert in c++, but can't you check if object is null or not?

Something like this (in VCardDetails):

[code] if(Contact)
{
IXMPPContact cnt;
cnt.AttachDispatch(Contact, TRUE);

IXMPPVCard vcard;
vcard.AttachDispatch(cnt.GetVCard(), TRUE);
vcard.Receive();
}
else
{
IXMPPVCard mycard;
mycard.AttachDispatch(m_XMPP.GetVCard(), TRUE);
AfxMessageBox(mycard.GetJid());
}[/code]

Can you try that? If that doesn't help, I'll ask our programmers for a code sample, but imo something like that should work.

As for the LicenseKey. Did you set the property? Does it exist? If property doesn't exist, then you most probably downloaded Demo, or you didn't re-import the component into VC.

Regards,
Damba


Complete thread: