I did a search for c# in the Crestron group and it returned no results.? Maybe i'm doing it wrong, but i'm new here.
?
We are trying to write a program in c# and part of the functionality needed to for it to be able to connect to a DMPS or MC2E and upload a new program for it and it's connected touch panel.
?
Our attempts at connecting to a device on the local network have not been successful.
?
The code we have been using is this (this is just test code, the actual code will use variable names instead of hard coded info):
?
VptSessionset = newVptSession();
?
??????? private void btn_Load_Click(object sender, EventArgs e)
??????? {
??????????? DialogResult result;
??????????? Form LoadForm = new LoadForm(listboxLoadList,
txtControlPanel.Text, txtTPProgram.Text, txtWebInterface.Text,
txtControlFirmware.Text, txtTPFirmware.Text);
??????????? result = LoadForm.ShowDialog();
??????????? if (result == System.Windows.Forms.DialogResult.OK)
??????????? {
????????????????//Here is
where we load the list
??????????????? Console.WriteLine("New VtpSession created!");
??????????????? set.OpenSession("tcp
10.25.146.126", "C# test");
??????????????? Console.WriteLine("Session opened!");
??????????????? int TransID = 0;
??????????????? String program = ;//fill in your own path/file here
??????????????? set.AsyncActivateStr(0, program, 10000, TransID, 0, 0);
??????????????? Console.WriteLine("Session program send!");
??????????? }
??????????? else if (result ==
System.Windows.Forms.DialogResult.Cancel)
??????????? {
??????????????? // Don't load the list
??????????????? ;
??????????? }
??????? }
?The program string is blank since you guys will have a different file and directory to use.
?
after this function is called the set_OnActivateStrComplete function is called:
??????? private void set_OnActivateStrComplete(int nTransactionID, int nAbilityCode, byte bSuccess, string pszOutputs, int nUserPassBack)
??????? {
??????????? Console.WriteLine("Inside
of the complete!");
??????????? Console.WriteLine(bSuccess);
??????????? Console.WriteLine(pszOutputs);
??????? }
?
when bSuccess is output to the Console, a zero is printed, indicating failure.
does anyone have any suggestions??
[Non-text portions of this message have been removed]