Find Jobs
Hire Freelancers

C# and MSScriptControl problem

max $5 USD

Lukket
Slået op cirka 21 år siden

max $5 USD

Betales ved levering
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
Projekt-ID: 2917642

Om projektet

2 forslag
Projekt på afstand
Aktiv 21 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
2 freelancere byder i gennemsnit $4 USD på dette job
Brug Avatar.
See private message.
$4,25 USD på 14 dage
5,0 (31 anmeldelser)
5,1
5,1
Brug Avatar.
See private message.
$4,25 USD på 14 dage
5,0 (23 anmeldelser)
4,6
4,6

Om klienten

Flag for UKRAINE
Ukraine
5,0
1
Medlem siden okt. 8, 2001

Klientverificering

Andre jobs fra denne klient

Need some PL/SQL help
$5-10 USD
Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.