General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Referencing External DLL files for XMetal Developer/Author 5.1

  • craig_83

    Referencing External DLL files for XMetal Developer/Author 5.1

    Participants 0
    Replies 1
    Last Activity 12 years, 4 months ago


    I am using XMetal Developer 5.1 and XMetal Author 5.1.

    I want to reference a .DLL file that has been created from a C# project within my solution. I currently have to register this dll on my machine (using regasm.exe) before it can be used by XMetal project (via a Javascript file).

    I want to create an automatic deployment of this application, but I want to avoid having to register the .DLL within the deployment script. I see you cannot add references to the XMetal project like you can with a normal Visual Studio project.

    Is there another way?



    Derek Read

    Reply to: Referencing External DLL files for XMetal Developer/Author 5.1

    There is no special feature that lets you communicate with a DLL from XMetaL.

    XMetaL delegates the actual running of scripts through a Windows script engine and so you are at the mercy of the limitations of whichever script engine you are using (in your case JScript). All of the engines I'm familiar with allow you to communicate with a DLL using COM (and only COM as far as I know). So, the DLL must be registered as a COM object before you can instantiate it:

    JScript           ActiveXObject()
    VBScript          CreateObject()
    Python*           win32com.client.Dispatch()
    PerlScript*       Win32::OLE()

    If there was solution I don't think it would be specific to XMetaL, it would work for other applications that support running JScript (like Internet Explorer, or the Windows command line tool jscript.exe).

    *Note that Python and PerlScript usually require a module to be loaded earlier in the script in order to use these methods.


  • You must be logged in to reply to this topic.

Lost Your Password?