Shoutbox

Getting conv. window properties - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Getting conv. window properties (/showthread.php?tid=54363)

Getting conv. window properties by Fakey on 12-29-2005 at 02:43 PM

Hi all.
Im trying to get the properties of a conversation window like sign-in name etc, because in some crazy way pParam->sContactName is not working all the time.
So i tried using the Messenger API.

HWND hWnd=NULL;
IMessengerConversationWnd *wnd=NULL;
pParam->iConversationWnd->QueryInterface(IID_IMessengerConversationWnd,(void**)&wnd);


Every way i try it from that point, i can only use the function once, and after that it seems to unload the plugin.
The funny thing is, it still calls the methods below the Messenger API part.

This is what i now tried below that point:

wnd->get_HWND((long*)&hWnd);
int len=GetWindowTextLength(hWnd);
sRet=(char *)malloc(len+1);
GetWindowText(hWnd,sRet,len+1);

(i have also tried getting signinname using messengercontact(s), but same problem kept showing up so i changed that)
Oh and it doesn't seem to make a difference if i Release() all the interfaces after that or not.

Could anyone help me with this problem?

Fakey