Using DLL with WCF Ajax
Posted: Sun Jan 11, 2009 3:11 am
I am trying to integrate Vensim into a WCF application that I am developing.. I have IIS set up on my XP machine and am developing the application as a prototype.
I have been trying to replicate the Csharp dll model shipped with the latest version of DSS but cannot seem to get it working...
I have copied the VensimDLLWrapper.cs file into a class and add "Using VensimDLLWrapperAPI" to my declaration
When I was unable to get the process working through a WCF interface, I tried creating a simple webform with the following code to see if the basic "vensim_command" was working. Given that "0" was returned to TextBox1, I can only assume it isn't
Any help with this would be much appreciated
Many thanks
___________________
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using VensimDLLWrapperAPI;
namespace TolagaWare
{
public partial class WebForm1 : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
{
string strVensimCommand;
string strModelPath = "C:\\Program Files\\Vensim\\dll\\WORLDAPP.VPM";
strVensimCommand = string.Concat("SPECIAL>LOADMODEL|", strModelPath);
int nResult = VensimDLLWrapper.vensim_command(strVensimCommand);
this.TextBox1.Text = nResult.ToString();
}
I have been trying to replicate the Csharp dll model shipped with the latest version of DSS but cannot seem to get it working...
I have copied the VensimDLLWrapper.cs file into a class and add "Using VensimDLLWrapperAPI" to my declaration
When I was unable to get the process working through a WCF interface, I tried creating a simple webform with the following code to see if the basic "vensim_command" was working. Given that "0" was returned to TextBox1, I can only assume it isn't
Any help with this would be much appreciated
Many thanks
___________________
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using VensimDLLWrapperAPI;
namespace TolagaWare
{
public partial class WebForm1 : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
{
string strVensimCommand;
string strModelPath = "C:\\Program Files\\Vensim\\dll\\WORLDAPP.VPM";
strVensimCommand = string.Concat("SPECIAL>LOADMODEL|", strModelPath);
int nResult = VensimDLLWrapper.vensim_command(strVensimCommand);
this.TextBox1.Text = nResult.ToString();
}