did i create my dll properly ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • graphicsxp

    #1

    did i create my dll properly ?

    Hi,
    I'm using the script editor in msn plus to load a dll I created using
    Visual Studio (class library project in vb.net).

    The code of the dll looks like this:
    Public Class Msg
    Public Sub New()

    End Sub

    Public Function Display() As Boolean
    MsgBox("hello world")
    Return True
    End Function
    End Class

    and here is the call from the script (JScript) :
    function OnEvent_ChatWnd Created(ChatWnd )
    {
    var externLib = MsgPlus.ScriptF ilesPath + "\\msn.dll" ;
    MsgPlus.Display Toast("", externLib);
    Interop.Call(ex ternLib, "Display");

    }

    the error returned is :
    Interop.Call could not locate the function "Display"

    So I assume the dll was found but not the function withing the dll
    Does anyone knows what could be wrong there ?
    thanks

  • graphicsxp

    #2
    Re: did i create my dll properly ?

    In case people are wondering why I'm posting msn jscript related code
    on this forum, I just want to precise that obviously my question was
    about the dll I wrote in vb.net ! not about the calling code...
    So does anyone know what I should add/modify to this dll code so that
    it can be recognised when called from my msn script ?
    Just for info, I can load user32.dll from my msn script, so the trick
    would be to make my vb.net dll look like user32.dll. What is specific
    about it ?

    Thanks
    Hi,
    I'm using the script editor in msn plus to load a dll I created using
    Visual Studio (class library project in vb.net).
    >
    The code of the dll looks like this:
    Public Class Msg
    Public Sub New()
    >
    End Sub
    >
    Public Function Display() As Boolean
    MsgBox("hello world")
    Return True
    End Function
    End Class
    >
    and here is the call from the script (JScript) :
    function OnEvent_ChatWnd Created(ChatWnd )
    {
    var externLib = MsgPlus.ScriptF ilesPath + "\\msn.dll" ;
    MsgPlus.Display Toast("", externLib);
    Interop.Call(ex ternLib, "Display");
    >
    }
    >
    the error returned is :
    Interop.Call could not locate the function "Display"
    >
    So I assume the dll was found but not the function withing the dll
    Does anyone knows what could be wrong there ?
    thanks

    Comment

    Working...