Find Jobs
Hire Freelancers

C# and MSScriptControl problem

max $5 USD

已关闭
已发布大约 21 年前

max $5 USD

货到付款
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(); [login to view URL] = "VBScript"; [login to view URL]("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 = [login to view URL]("plus", ref arguments).ToString(); } catch([login to view URL] e) { [login to view URL]([login to view URL]); [login to view URL]([login to view URL]); } // a must be 7 and it is. Function returns proper result [login to view URL](a); //param1 must be also 7, but it is 5 [login to view URL](param1); //param2 must be 9 but it still 0 [login to view URL](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 .NET
项目 ID: 2917642

关于此项目

2提案
远程项目
活跃21 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
2威客以平均价$4 USD来参与此工作竞价
用户头像
See private message.
$4.25 USD 在14天之内
5.0 (31条评论)
5.1
5.1
用户头像
See private message.
$4.25 USD 在14天之内
5.0 (23条评论)
4.6
4.6

关于客户

UKRAINE的国旗
Ukraine
5.0
1
会员自10月 8, 2001起

客户认证

这个客户的其他工作

Need some PL/SQL help
$5-10 USD
谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。