Find Jobs
Hire Freelancers

C# and MSScriptControl problem

max $5 USD

Geschlossen
Veröffentlicht vor etwa 21 Jahren

max $5 USD

Bezahlt bei Lieferung
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

Über das Projekt

2 Vorschläge
Remote Projekt
Aktiv vor 21 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
2 Freelancer bieten im Durchschnitt $4 USD für diesen Auftrag
Avatar des Nutzers
See private message.
$4,25 USD in 14 Tagen
5,0 (31 Bewertungen)
5,1
5,1
Avatar des Nutzers
See private message.
$4,25 USD in 14 Tagen
5,0 (23 Bewertungen)
4,6
4,6

Über den Kunden

Flagge von UKRAINE
Ukraine
5,0
1
Mitglied seit Okt. 8, 2001

Kundenüberprüfung

Andere Aufträge von diesem Kunden

Need some PL/SQL help
$5-10 USD
Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.