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

[?] MediaMonkey scripting ActiveXObject...
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] MediaMonkey scripting ActiveXObject...
What if you registered the DLL through your code? Calling DLLRegisterServer (I think it is) from the DLL.


js code:
function RegisterDLL(DLLPATH) {
    var iLib = Interop.Call('kernel32', 'LoadLibraryW', DLLPATH);
    if (iLib) {
        var iProcAddr = Interop.Call('kernel32', 'GetProcAddress', iLib, 'DllRegisterServer');
        if (iProcAddr) {
            if (Interop.Call('user32', 'CallWindowProcW', iProcAddr, 0, 0, 0, 0) === 0 /* ERROR_SUCCESS */) {
                // DLL has been registered
            }
            else {
                // DLL failed to register...
                var buffer = Interop.Allocate(1024);
                Interop.Call('kernel32', 'FormatMessageW', 0x1000, 0, Interop.GetLastError(), 0, buffer, 1024, 0);
                Debug.Trace(buffer.ReadString(0));
                buffer.Size = 0;
            }
        }
        else
            Debug.Trace('Could not find ProcAddress for DllRegisterServer');
    }
    else
        Debug.Trace('Could not load the DLL');

    Interop.Call('kernel32', 'FreeLibrary', iLib);
}

This post was edited on 07-26-2011 at 05:08 PM by matty.
07-26-2011 12:34 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] MediaMonkey scripting ActiveXObject... - by whiz on 06-27-2011 at 06:50 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by CookieRevised on 06-28-2011 at 08:01 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by whiz on 06-29-2011 at 06:57 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by matty on 06-29-2011 at 07:02 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by whiz on 06-29-2011 at 07:09 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by matty on 06-29-2011 at 07:44 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by whiz on 07-03-2011 at 01:02 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by whiz on 07-26-2011 at 12:21 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by matty on 07-26-2011 at 12:34 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by whiz on 07-26-2011 at 01:41 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by matty on 07-26-2011 at 02:07 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by whiz on 07-26-2011 at 04:39 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by Mnjul on 07-26-2011 at 04:52 PM
RE: [?] MediaMonkey scripting ActiveXObject... - by matty on 07-26-2011 at 05:08 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