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

Using C# DLL
Author: Message:
barby850717@gmail.
New Member
*


Posts: 9
Joined: Oct 2010
O.P. RE: Using C# DLL
Hi, I created a new class just like the VB sample code.

using System;
using System.Runtime.InteropServices;
namespace MyDLL
{
    [ComVisible(true)]
    public class Operations
    {
        [ComVisible(true)]
        public string getValue1(string sParameter)
        {
            switch (sParameter)
            {
                case "a":
                    return "A was chosen";

                case "b":
                    return "B was chosen";

                case "c":
                    return "C was chosen";

                default:
                    return "Other";
            }
        }
        public string getValue2()
        {
            return "From VBS String Function";
        }
    }
}

And the I try to use it from jscript.

I have tried:
Interop.Call("C:\\Program Files\\Messenger Plus! Live\\Scripts\\MySecondScript\\MyDLL.dll", "getValue1", "a");
and I received the error: Interop.Call failed to locate function "getValue1"

I have also tried: var myObj = new ActiveXObject("MyDLL.Operations"); and I receive the error: unknown (code: -2147024894)

10-21-2010 01:32 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Using C# DLL - by barby850717@gmail. on 10-20-2010 at 08:48 PM
RE: Using C# DLL - by Matti on 10-20-2010 at 09:15 PM
RE: Using C# DLL - by barby850717@gmail. on 10-20-2010 at 09:26 PM
RE: Using C# DLL - by CookieRevised on 10-21-2010 at 08:21 AM
RE: Using C# DLL - by barby850717@gmail. on 10-21-2010 at 01:32 PM
RE: Using C# DLL - by matty on 10-21-2010 at 10:27 PM
RE: Using C# DLL - by felipEx on 10-22-2010 at 02:33 AM
RE: RE: Using C# DLL - by CookieRevised on 10-22-2010 at 07:12 AM
RE: RE: RE: Using C# DLL - by felipEx on 10-23-2010 at 05:15 AM
RE: Using C# DLL - by CookieRevised on 10-23-2010 at 08:27 AM
RE: Using C# DLL - by SmokingCookie on 10-28-2010 at 06:02 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