General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Referencing External DLL files for XMetal Developer/Author 5.1
-
craig_83 September 15, 2010 at 9:19 am
Referencing External DLL files for XMetal Developer/Author 5.1
September 15, 2010 at 9:19 amParticipants 0Replies 1Last Activity 12 years, 4 months agoHi,
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?
Thanks
Derek Read September 15, 2010 at 8:27 pm
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.
-
AuthorPosts
- You must be logged in to reply to this topic.