O.P. Getting conv. window properties
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
This post was edited on 12-30-2005 at 12:11 PM by Fakey.
|