Home › Forums › General XMetaL Discussion › Referencing External DLL files for XMetal Developer/Author 5.1 › Reply To: Referencing External DLL files for XMetal Developer/Author 5.1
Reply to: Referencing External DLL files for XMetal Developer/Author 5.1
September 15, 2010 at 8:27 pmThere 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.