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

C# dll?
Author: Message:
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. C# dll?
I can't get my C# dll to work, i've done all the necessary stuff (i think) to get my functions exported.

code:
namespace Effection
{
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface iFunctions
    {
        [DispId(1)]
        string ReturnAye();
    }
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("Effection.MyFunctions")]
    public class MyFunctions : iFunctions
    {
        public string ReturnAye()
        {
            return "Aye";
        }
    }
}
code:
var path = MsgPlus.ScriptFilesPath+"\\Functions.dll";
Interop.Call2(path,"ReturnAye");

this fails on the Interop Call :(
03-23-2008 12:04 AM
Profile E-Mail PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: C# dll?
interop.call and call2 don't support managed DLLs.
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
03-23-2008 12:28 AM
Profile PM Web Find Quote Report
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. RE: C# dll?
shouldn't matter as long as you export everything for COM, which i can't seem to get to work.

anyone who has done this please help me :)

This post was edited on 03-23-2008 at 09:33 PM by effection.
03-23-2008 05:23 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: C# dll?
.NET COM objects require a COM Interop DLL that will be produced alongside the managed DLL. Both need to be kept together at all times.
[Image: spartaafk.png]
03-25-2008 02:38 PM
Profile PM Web Find Quote Report
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. RE: C# dll?
any articles on how to do this?
03-26-2008 12:15 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: C# dll?
Just so long as the project is set to produce a COM-visible DLL, the Interop DLL comes automatically.
[Image: spartaafk.png]
03-26-2008 11:44 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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