Shoutbox

Messenger API in C++ - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Skype & Live Messenger (/forumdisplay.php?fid=10)
+----- Thread: Messenger API in C++ (/showthread.php?tid=28121)

Messenger API in C++ by RaceProUK on 07-04-2004 at 02:45 PM

I'm currently writing a nickname saver in C++ (on request from dakillerspyder), but I'm having trouble with Messenger's get_MyFriendlyName() method. The method takes a single argument, a BSTR*.

here is the code I'm currently using:

code:
char* nick;
    BSTR nickTemp;
    hMessenger->get_MyFriendlyName(&nickTemp);
    nick = (char*)nickTemp;
This successfully gets me the first character, but only the first character. How do I get the rest of the nickname?

UPDATE: Found the problem (bloody Unicode!)

UPDATE 2: Fixed! I wrote my own conversion routine.