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

[Scripting Example] GetUserName
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: [Scripting Example] GetUserName
quote:
Originally posted by Eljay
not as nicely styled as matty's but at least mine works :P

code:
function GetUserName()
{
    var sBuffer = Interop.Allocate((255+1) * 2);
    var nBufferLength = Interop.Allocate(4);
    nBufferLength.WriteDWORD(0, 255);
    Interop.Call('advapi32.dll', 'GetUserNameW', sBuffer, nBufferLength);
    Debug.Trace('sBuffer: ' + sBuffer.ReadString(0));
}

Oops... I forgot about the last param needing to be a datablock too. I will update mine.
06-29-2006 04:04 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Scripting Example] GetUserName - by matty on 06-29-2006 at 03:30 PM
RE: [Scripting Example] GetUserName - by JonnyT on 06-29-2006 at 03:46 PM
RE: [Scripting Example] GetUserName - by matty on 06-29-2006 at 03:49 PM
RE: [Scripting Example] GetUserName - by Eljay on 06-29-2006 at 04:03 PM
RE: [Scripting Example] GetUserName - by matty on 06-29-2006 at 04:04 PM
RE: [Scripting Example] GetUserName - by CookieRevised on 06-29-2006 at 04:40 PM
RE: [Scripting Example] GetUserName - by JonnyT on 06-29-2006 at 04:41 PM
RE: [Scripting Example] GetUserName - by matty on 06-29-2006 at 04:42 PM
RE: [Scripting Example] GetUserName - by matty on 06-29-2006 at 05:14 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