What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » ReadInterfacePtr() - Crashes Windows Live Messenger

ReadInterfacePtr() - Crashes Windows Live Messenger
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. ReadInterfacePtr() - Crashes Windows Live Messenger
Patchou,

It is time we are told how this works so that we cannot keep crashing WLM with it :)

JScript code:
var hWnd = Interop.Call('user32', 'FindWindowExW', Messenger.ContactListWndHandle, 0, 'Main Window Class', '');
hWnd = Interop.Call('user32', 'FindWindowExW', hWnd, 0, 'DirectUIHWND', '');
 
if (hWnd === 0) return;
 
var IID_IAccessible = Interop.Allocate(16);
with (IID_IAccessible) { WriteDWORD(0, 0x618736E0); WriteWORD(4, 0x3C3D); WriteWORD(6, 0x11CF); SetAt(8, 0x81); SetAt(9, 0xc); SetAt(10, 0x0); SetAt(11, 0xaa); SetAt(12, 0x0); SetAt(13, 0x38); SetAt(14, 0x9b); SetAt(15, 0x71); }
 
var IAccessible = Interop.Allocate(4);
 
Debug.Trace(Interop.Call('oleacc', 'AccessibleObjectFromWindow', hWnd, 0xFFFFFFFC /* OBJID_CLIENT */, IID_IAccessible, IAccessible));
 
IAccessible.ReadInterfacePtr(0); // crash occurs here!


This requires the main contact list window to be opened.

The last line should provide access to the IAccessible interface but instead it crashes WLM.

I also emailed this to you but I know you aren't really concerned about it with the beta currently going on however I wonder if there is a bug in Plus! causing this to crash and not work corectly.
10-12-2008 07:48 PM
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: ReadInterfacePtr() - Crashes Windows Live Messenger
*bump* :P

I would like to know how to use this as well, if it even has any use..
10-15-2008 04:58 PM
Profile PM Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
36 / Male / Flag
Joined: Jul 2007
RE: ReadInterfacePtr() - Crashes Windows Live Messenger
I am also interested in that because I assume it something that matty is investigating for my advantage :P
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
10-17-2008 12:07 PM
Profile E-Mail PM Web Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: ReadInterfacePtr() - Crashes Windows Live Messenger
I apologize for the lack of answers I gave you regarding this matter in the past. Proof that I should have done so before: it was a bug that prevented you from using this function properly. Your code is correct, the bug was fixed in build 341. Have fun with IAccessible :).

JScript code:
    var pAccessibleData = Interop.Allocate(4);
    if(Interop.Call('oleacc', 'AccessibleObjectFromWindow', hWnd, 0xFFFFFFFC /* OBJID_CLIENT */, IID_IAccessible, pAccessibleData) == 0)
    {
        var iAccessible = pAccessibleData.ReadInterfacePtr(0);
        if(iAccessible)
        {
            iAccessible.accHitTest(0, 0);
        }
    }

[Image: signature2.gif]
10-19-2008 06:08 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: ReadInterfacePtr() - Crashes Windows Live Messenger
Good stuff!

So when do we get the beta? lol
10-19-2008 06:12 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On