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

[?] GetProcAddress and LoadLibraryW
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [?] GetProcAddress and LoadLibraryW
GetProcAddress doesn't take a unicode string :P

js code:
function Print(s){Debug.Trace(s);}

var GetModuleHandle = function(ModuleName) {
    Print("Getting module handle for " + ModuleName);
    return Interop.Call("Kernel32.dll","GetModuleHandleW",ModuleName);
}

var GetProcAddress = function(hModule,ProcName) {
    Print("Getting procedure address for " + ProcName);
    var DataBloc = Interop.Allocate(ProcName.length + 1);
    DataBloc.WriteString(0, ProcName, false);
    return Interop.Call("Kernel32.dll","GetProcAddress",hModule,DataBloc);
}

var a = GetModuleHandle("kernel32.dll");
Debug.Trace(a);
var b = GetProcAddress(a, "LoadLibraryW");
Debug.Trace(b);
04-09-2011 07:56 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] GetProcAddress and LoadLibraryW - by SmokingCookie on 04-09-2011 at 07:17 PM
RE: [?] GetProcAddress and LoadLibraryW - by Eljay on 04-09-2011 at 07:56 PM
RE: [?] GetProcAddress and LoadLibraryW - by SmokingCookie on 04-10-2011 at 08:25 AM


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