C# and MSScriptControl problem

Hi all. I am using MSScriptControl to call a procedure written in VBScript. This is the body of this procedure: Function plus(aaa, bbb) aaa = aaa + 2 bbb = aaa + 2 plus = aaa end Function If I pass parameters aaa = 5 and bbb = 0 this function should return 7 and aaa should be 7 and bbb 9. I can pass parameters to this function and it returns proper value but values of parameters are still as they was before call. And I cant't figure out what's wrong in my code. Please help. Below is the C# code I used to call this VBScript. static void Main(string[] args) { ScriptControlClass scriptControl = new ScriptControlClass(); [url removed, login to view] = "VBScript"; [url removed, login to view]("Function plus(aaa, bbb)\naaa = aaa + 2\nbbb = aaa + 2\nplus = aaa\nend function\n"); //Initializing Parameters that will be passed to script int param1 = 5; int param2 = 0; object[] arguments = new Object[2]; arguments[0] = param1; arguments[1] = param2; string a = ""; try { a = [url removed, login to view]("plus", ref arguments).ToString(); } catch([url removed, login to view] e) { [url removed, login to view]([url removed, login to view]); [url removed, login to view]([url removed, login to view]); } // a must be 7 and it is. Function returns proper result [url removed, login to view](a); //param1 must be also 7, but it is 5 [url removed, login to view](param1); //param2 must be 9 but it still 0 [url removed, login to view](param2); I will give an excellent feedback for first programmer that can solve this problem. Attched is C# project

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 3) Complete ownership and distribution copyrights to all work purchased.

## Platform


Kemahiran: Pengaturcaraan C#, Kejuruteraan, MySQL, PHP, Kejuruteraan Perisian, Ujian Perisian

Lihat lagi: msscriptcontrol, using msscriptcontrol run, the string problem, string problem, string c plus plus, c plus plus string, 5 and below, aaa a, solve problem, solve php error, engineering c++, call and, vbscript php, net object error, net console, value engineering, php vbscript, run program vbscript, php script call procedure, console text

Tentang Majikan:
( 1 ulasan ) Ukraine

ID Projek: #2917642

2 pekerja bebas membida secara purata $4 untuk pekerjaan ini


See private message.

$4.25 USD dalam 14 hari
(31 Ulasan)

See private message.

$4.25 USD dalam 14 hari
(23 Ulasan)