What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » lpClassName

lpClassName
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: lpClassName
You might want to take a look at this page in the MSDN library.
quote:
Parameters
    hWnd
        [in] Handle to the window and, indirectly, the class to which the window belongs.
    lpClassName
        [out] Pointer to the buffer that is to receive the class name string.
    nMaxCount
        [in] Specifies the length, in TCHAR, of the buffer pointed to by the lpClassName parameter. The class name string is truncated if it is longer than the buffer and is always null-terminated.
That means:
  • hWnd - The handle of the window, I guess you know how to retrieve that.
  • lpClassName - A buffer, so that means a DataBloc created by Interop.Allocate.
  • nMaxCount - Seems like the Win32 API even lets you choose how big you want to make your DataBloc. This is the length of the buffer you created for retrieving the class name.
According to this information, I guess you have to make something like this:

WARNING: UNTESTED CODE. Mattike was too bored to actually test this, since he would have no idea what to test it on.
code:
var hWnd = ChatWnd.Handle; //A handle of a window to get the class name from? I guess you know what to do with this.
var bufferClass = Interop.Allocate((255+1)*2); //Should be big enough I guess?
Interop.Call("user32", "GetClassName", hWnd, bufferClass, bufferClass.Size); //I think it's quite self-explaining...
Why don't you try it, and tell us if it worked? :P
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-18-2007 04:27 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
lpClassName - by saralk on 05-18-2007 at 12:24 PM
RE: lpClassName - by Matti on 05-18-2007 at 04:27 PM
RE: lpClassName - by CookieRevised on 05-18-2007 at 04:45 PM
RE: lpClassName - by saralk on 05-18-2007 at 05:06 PM
RE: lpClassName - by Matti on 05-19-2007 at 01:18 PM


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