.NETGURU
microsoft.public.dotnet.vsa
Up to: Discussion Lists

  • RSS Syndication
  • Post a new message to this list...
    Latest Discussions Archive
    VBA code in a VB.Net application (2 replies)
    microsoft.public.dotnet.vsa
    Hello We have a VB6 application that integrates an VBA IDE from which the final user can make modifications. We want to pass the application to VB.NET, and the first step, before rethinking the whole application, is to pass the conversion wizard and see how it goes. But we want to keep those client VBA modifications working with the least changes made to them. I've tried integrating VBA in a .NET ...
    What is VSA? (2 replies)
    microsoft.public.dotnet.vsa
    I'm a beginner, I want to know what is vsa.
    Direct Access to VSA project Assembly (2 replies)
    microsoft.public.dotnet.vsa
    Hi, I've a VSA implementation and I'm able to invoke any method in my script. Now I want to hook up event handler in the code from an external event source. Normally I use this: EventInfo eInfo this.MyForm.GetType().GetEvent("EventName"); Delegate d Delegate.CreateDelegate(eInfo, this, "Button Click"); eInfo.AddEventHandler(this, d); "this" points to the class where "Button Click" is available. Th...
    Memory leak (4 replies)
    microsoft.public.dotnet.vsa
    There were many discussions about memory leaks in VSA engine, because .NET Framework doesn't support dynamical unloading of code. Will this be fixed in the future? What does Microsoft says?
    Global objects get lost during JScript evaluations (2 replies, VIP)
    microsoft.public.dotnet.vsa
    The C# code below shows a problem I'm having with the VSA engine where a global object seems to get lost during script evaluation. It looks like the engine recognizes the name of the global object, but simply returns null when accessing it from an evaluation string although it works just fine when accessing the global object from within other code items (as long as those items are not evaluated th...
    Howto show a MessageBox (HELP!) (6 replies)
    microsoft.public.dotnet.vsa
    Hi, I'm trying to understand some things about VSA. I have a c# host program and a JScript.net script. I'm trying to do this: import System.Windows.Forms; class MyClass { static function Myfunction() { System.Windows.Forms.MessageBox.Show("Hello"); return 42; } } Without the MessageBox line, the function returns the 42 as expected. With the MessageBox, I'm getting either "Windows.Forms.MessageBox,...
    Generate ASPX file at runtime. (3 replies)
    microsoft.public.dotnet.vsa
    Hi! I must generate webform and his controls at runtime(ASPX and Code behind). I am able to create the codebehind file with CodeDom but can't create the aspx file. How can I create at runtime aspx file and synchronize it with the codebehind file. Thanks Jeff
    VS EA 2003 & .NET compact framework (8 replies, VIP)
    microsoft.public.dotnet.vsa
    Is there any way to develop .net compact framework applications from within VS 2003? There isn't such an option in the new project options.
    Is VSA the best solution for my problem? (2 replies)
    microsoft.public.dotnet.vsa
    Hi, I have some code and I would like to access JScript scripts with it. Would using a wrapper class written in c# (.dll file) that uses the VSA engine be the best option? If not, what would be a better option? I've done some research into Visual Studio for Applications and found that there are problems reclaiming memory when the compile() method is used. Is there any way around this?
    Adding a reference to a COM object (3 replies)
    microsoft.public.dotnet.vsa
    How does one add a reference to a COM class using VSA. I don't see an obvious method for making this happen. Is it an IVsaReferenceItem or an IVsaGlobalItem? Are there any convenient ways to browse for the COM component? Scott.
    How to get VSA? (9 replies, VIP)
    microsoft.public.dotnet.vsa
    Stupid question. How do I get my hands ionto VSA? In the past SUmmit was responsible for this, and it was part of VSIP. Now VSIP is free Summit still points to VSIP as source, but there is noone I know of to contact, and on the VSIP download sites I do not find any reference to VSA. Can anyone point me in the direction of the correct stuff so that I can get up to speed and running? Thanks. Thomas ...
    HELP ME! PLEASE COMPILE AND RUN JSCRIPT (2 replies)
    microsoft.public.dotnet.vsa
    Hello, I run code JScript From VB but i have memory problem increase: I have use JScriptCodeProvider: Dim provider As Microsoft.JScript.JScriptCodeProvider Dim compiler As System.CodeDom.Compiler.ICodeCompiler Dim params As System.CodeDom.Compiler.CompilerParameters Dim results As System.CodeDom.Compiler.CompilerResults params New System.CodeDom.Compiler.CompilerParameters() params.GenerateInMemor...
    want to compile/run over and over (2 replies)
    microsoft.public.dotnet.vsa
    I want to compile small bits of jscript.Net code, run it, compile another small bit, run it, etc etc. I do this by creating running it the first time, then Reset, RevokeCache, Set Script Source, Compile, Run Reset, RevokeCache, Set Script Source, Compile, Run Reset, RevokeCache, Set Script Source, Compile, Run Is there any way to do this that doesn't eat up more and more and more and more memory e...
    memory problem HELP! (3 replies)
    microsoft.public.dotnet.vsa
    I use Microsoft.JScript.Vsa.VsaEngine() but when i close this the memory not clear how i do? i can olso use AppDomain but if i add external object this must be serializable. thank you Sorry for my English This is my code: For i 1 to 100 Dim en As New Microsoft.JScript.Vsa.VsaEngine() Dim en As Microsoft.JScript.Vsa.VsaEngine Microsoft.JScript.Vsa.VsaEngine.CreateEngine en.RootMoniker "scriptcode:/...
    AppDomain and Memory Issues (30 replies)
    microsoft.public.dotnet.vsa
    I have been working on loading and unload the VSA Engine into AppDomain to reduce the amount of memory usage in my application. I have built a test environment that will create and unload a VSA Engine into a AppDomain. While this reduces the amount of memory used compared to simple creating and destroying the VAS Engine in the one domain, I still have an increase in memory. Have I set up the confi...
    function return value (2 replies)
    microsoft.public.dotnet.vsa
    Hi I got my script engine working fine, until I decided to use functions and not only subs to run into my engine. I pass an object array as argument (that contains a string, and I want to check if it is blank) The error is "Object type cannot be converted to target type" I really don't know why this is happening. The return type should be an object, right? And I doubt the error is in CType convers...
    Passing Command Line Args To A Script (2 replies)
    microsoft.public.dotnet.vsa
    I want to create a script host (active or Vsa), feed it a script which I read from a file and invoke it (Optionally with command line arguments). Problem is I don't know what the default entry points and signatures are for VBScripts and JScripts and I can't seem to find this info anywhere. There was a discussion in Microsoft.public.dotnet.vsa on Dec. 3rd (VBScript .Net Entry Point) that came close...
    Design Time Reflection is Locking DLL's (3 replies)
    microsoft.public.dotnet.vsa
    Shawn Burke sent me some sample code awhile ago to do something similar to the DataSet toolbox item. That is, it brings up a dialog first and then you can tell it a different type to put on the design surface depending on user input. Also looking through the DTE object, I've got a component that looks at all the projects in the solution and for each one, looks at the output files to find the compi...
    Load precompiled script (5 replies)
    microsoft.public.dotnet.vsa
    Hi, I have 2 byte arrays saved in a file in C:\, that were returned in SaveCompiledState() I had successfuly load this files into byte arrays again. Now what am I suppose to do if I want to load them? I ve seen codes similar to this: myEngine.site mySite(pe,pdb) That was the far I got, but I have no clue what this constructor should do.
    Parameters and functions (3 replies)
    microsoft.public.dotnet.vsa
    Hi. I just want to pass some parameters to a function inside the script code, and get the result back. What am I missing? The error is System.NullReferenceException: Object reference not set to an instance of an object. (args?) Sorry bout the noobish question :) m Engine.Run(); System.Type Tp m Engine.Assembly.GetType(m nameSpace "." m nameModule, true, true); //this is correct MethodInfo Method T...
    Example Needed! (2 replies)
    microsoft.public.dotnet.vsa
    Hi everyone. I need an example written up on a page that shows how to create a scripting engine type class in VB.NET to read VB.NET scripts in step by step. All the examples (the few that are there) are mostly in C#, Incomplete, Or written for a prior bet of .NET and don't work. I'm trying to recreate the MS Script Control for .NET. There needs to be less heres this tiny section tutorials and a gl...
    Memory leaks in VSA (10 replies)
    microsoft.public.dotnet.vsa
    Greetings, I have a C# program (the VSA host), which creates a VB.NET VSA engine. The code is executed in a loop, in which it instantiates the engine, loads a script, executes a method, and then closes the engine. This loop throws an exception after about 700 iterations. Till 700 everything is fine, but after about the 703rd iteration, it throws an exception that it cannot add any more references ...
    VBScript .Net entry point (8 replies)
    microsoft.public.dotnet.vsa
    Is there any code that is executed automatically on script load like in JScript .Net or in VBScript (without .Net)? And how VBScript .Net should look generally, are Module and Sub (function) declaration a must? For example, in JScript .Net script can look like: // import System; var x 5; var y 5; var z x y; MyObject.Write(z); // MyObject is external object that is added with VsaEngine.Items.Create...
    VsaException: SiteNotSet (0x80133039). (2 replies)
    microsoft.public.dotnet.vsa
    I am trying to host VSA design time ... I am getting this exception "Microsoft.Vsa.VsaException: SiteNotSet (0x80133039)." the code is something like this DesignTime dt new DesignTime(); ScriptableClock sc new ScriptableClock(); VsaEngine dtEngine (VsaEngine) dt.VsaEngines.Create("Santeon://samplemoniker", "Microsoft.VisualBasic.Vsa", null); //dtEngine.Site sc; dtEngine.InitNew(); dtEngine.Name "S...
    Get an jscript exception if GenerateDebugInfo flag is set to false. (2 replies)
    microsoft.public.dotnet.vsa
    Can someone help ? I am using jscript.vsaengine in my project. Everything is working fine as long as I set the GenerateDebugInfo flag to true. When I set it to false I get the following exception: Message: Microsoft.Jscript.JscriptException : type mismatch. The stack trace I get is: Microsoft.JScript.Convert.CoerceT(Object value, type t, boolean Explicit OK); myclass. Startup.Startup(); Microsoft....
    Why do I have to hard-code the assembly reference? (3 replies)
    microsoft.public.dotnet.vsa
    Greetings, I want to pass an object as an argument of a method to a script file without providing it as a global type. The type of the object is a class defined in the host namespace. The scripting engine is VB.NET and the host is C#. The script function signature should be something like: Function CustomObjectPassing(objCustomObject As CustomObjectPackager) As CustomObjectPackager End Function Th...
    Binding specific global obj to given Script (VB) in single engine. (4 replies)
    microsoft.public.dotnet.vsa
    Just read the entire news group and found almost all the answers expcept for this one: In a single VSA engine, I'd like to simulate object oriented like encapsulation for multiple VB modules inside it. Running multiple VB module wasn't a problem. Just appended all the code and it worked. For some reason, I couldn't get the modules to run as individual code items (but thats not a priority). Priorit...
    repost: vb module variables and vsa instanaces (4 replies)
    microsoft.public.dotnet.vsa
    when vsa is hosting the VisualBasic.Vsa.VsaEngine, are Module public variable's storage local to the vsa instance, or are they global? in the following example, is myObj unique to each vsa instance? Is the following legit when a web pages host vsa, and i want each page hit to instance vsa and call CreateMyObj()? example: Public Module scriptcode Public myObj as MyClass Public Sub CreateMyObj() myO...
    Strange problem - need Help (5 replies)
    microsoft.public.dotnet.vsa
    I am writing Telecommunication Control Application using VB.NET and JScript.NET/VB.NET as the scripting languages to allow customization of the app. I consider myself an experienced programmer, but this bug puzzles me. Here are the symptoms: After the start the code works as it supposed to work. If I leave it overnight running heavy test (15,000 phone calls) it's fine. After about 10 15 minutes of...
    How to remove error when link to other page that contains .net control from page that also contains .net control? (3 replies)
    microsoft.public.dotnet.vsa
    Dear All, We create a web page that embeds .net control with "object tag". Everytime this page open a new page (by click the hyperlink or with ie's function showModalDialog), either in its own IE window, or open it in new IE window (right click then choose open new window), we (almost) always get an error in the page that is being opened (e.g. page X.htm): System.Runtime.InteropServices.COMExcepti...
    CONTINUED : How to remove error when link to other page that contains .net control from page that also contains .net control? (3 replies)
    microsoft.public.dotnet.vsa
    Hi, thx for reply. I've tried to used readystate "complete" on document's properties, and then moving the startup code from window onload event to the button's event that I click after the page really stops loading. It still generates error. If you don't mind, in the end of e mail you can see the code that we use to load the .net object, pratically it is the same with the code you use to embed the...
    Unloading Assemblies (i.e. AppDomain hell) (4 replies)
    microsoft.public.dotnet.vsa
    I just "finished" writing a script host that does everything I want it to do. It's fast, type safe, and sweet. Its only problem is that its memory usage grows without bound as more and more scripts get executed. I came to this newsgroup and discovered that my problem is that the generated assemblies never get unloaded. I've read all the earlier posts on how assemblies can't be unloaded without doi...
    Invalid Assembly error (2 replies)
    microsoft.public.dotnet.vsa
    Greetings, I am getting an InvalidAssembly exception when I am trying to load the host assembly into the engine. Code follows: string assemName Assembly.GetExecutingAssembly().Location; refItem (IVsaReferenceItem)items.CreateItem(assemName, VsaItemType.Reference, VsaItemFlag.None); refItem.AssemblyName assemName; The last line causes the exception. I have the same code in a couple of other project...
    How can I do it? (2 replies)
    microsoft.public.dotnet.vsa
    Hi, I'm developping a C# application (with Windows forms, not in web) which should use any existing scripting language to use some classes already generated. The original idea was to create a language interpreter which provide special functions to manage all possibilities of the classes generated. But this must be the last solution if I can solve it using any scripting language which directly call...
    Wrong error line number hosting VB.NET ! (6 replies)
    microsoft.public.dotnet.vsa
    I have a VB.NET scripting host, when it compiles the following VB.NET script I get the wrong line number for the 2nd error. The result is: "Character is not valid at line 2" OK "Character is not valid at line 14" this sould be line 4 it seems any errors within the Module block are out by 10 lines! Any ideas Phil ; Module mainModule ; End Module
    Scripting and code access permissions (7 replies)
    microsoft.public.dotnet.vsa
    As the scripting engine must run with FullTrust permission attribute I'm trying to workarround it by setting the code permissions just before invoking a method like this: engine.Run(); Assembly assem engine.Assembly; Type type assem.GetType("TestScript.myScript"); MethodInfo method type.GetMethod("Main"); PermissionSet permissions new PermissionSet(PermissionState.None); permissions.AddPermission(...
    Invalid Cast Exception in WestCoast samples (2 replies)
    microsoft.public.dotnet.vsa
    I've installed the VSA SDK from summit and I'm trying the samples, but when I try to open the IDE from the WestCoast Sales or WestCoast HelpDesk workbench I get this exception: ************** Exception Text ************** System.InvalidCastException: Interfaz no compatible at Microsoft.VisualBasic.Vsa.Dt.VsaIDE.ShowIDE(Boolean showOrHide) at Microsoft.VisualBasic.Vsa.Dt.VsaIDE.ShowIDE(Boolean show...
    VSA with C# Support (2 replies)
    microsoft.public.dotnet.vsa
    Hi there, I just started a new Project which needs to be scriptable to the full extent. It will be very complex and data oriented. I will have to analyze lots of data and think that it will become a lot more structured if i use a type oriented language like c# and not JScript or VB. Now i found a nice article that covers almost everything i needed to know (hosting the engine, compiling the scripts...
    Adding objects to the engine (2 replies)
    microsoft.public.dotnet.vsa
    Hi all, I think that I have successfully added object off my main form to the engine. But when I try to access the obects, I get a error stating that the object is Private, how do I make this work. For example I am passing in a Menu(MainMenu), and I want to add menuitems to it. I get it in, and when trying to access it, gets error about being private. How do I get this to work. I think I need to d...
    Reflection on a VSA assembly (4 replies)
    microsoft.public.dotnet.vsa
    I am currently developing a C# component that is extensible by the addition of scripts to the appropriate directory. I'm hoping someone can give me a code snippet to nudge me in the right direction here's what I want do do. When a particular (C#) object is instantiated 1) I want to compile all scripts (probably class definitions) in a certain directory. 2) Then I want to get an array of the types ...
    System CodeDom CodeMemberEvent (4 replies)
    microsoft.public.dotnet.vsa
    Has anyone seen ANY source code which uses System CodeDom CodeMemberEvent Any code that does anything written in any language that uses the CodeMemberEvent object would be helpful. Frederick Volking fvolking@HunterStone.com
    Why is IActiveScript a better choice than .NET scripting in some cases? (2 replies)
    microsoft.public.dotnet.vsa
    Our web app. uses lots of small .NET scripts for report customization and we have pretty heavy resource/CPU/memory usage. We are currently compiling the scripts at runtime but could precompile the scripts. We ARE running the scripts in a seperate AppDomain so we can get the memory back. Would IActiveScript be a better choice? How hard would it be to integrate our .NET class libraries so they would...
    VS Macro for creating VB.NET class properites (2 replies)
    microsoft.public.dotnet.vsa
    Hi All, I am at loss without the VB 6 class creation tool. I have created this macro that helps with creating the proprites (Get/Set) syntax from variables within the class. To operate the macro select a line (or multiple lines) that list your variables that you want to turn into properties. There a re couple of assumptions: 1) your variables are in format "[Scope] m Variable AS [New] [TypeName]",...
    c++ client (5 replies)
    microsoft.public.dotnet.vsa
    I try to execute a vb code, but no luck! try { Microsoft::Vsa::IVsaEngine* x new Microsoft::VisualBasic::Vsa::VsaEngine(); x set RootMoniker(S"ppp://com.xyz/PMXHost"); x set Site(new CPMXSite); x InitNew(); x set RootNamespace(S"PMXHost"); Microsoft::Vsa::IVsaItems* pi x get Items(); Microsoft::Vsa::IVsaCodeItem* pc static cast Microsoft::Vsa::IVsaCodeItem* (pi CreateItem(S"PMXHost",Microso ft::Vs...
    what am I doing wrong? (4 replies)
    microsoft.public.dotnet.vsa
    Hi All, I'm fairly new to .net and vsa, and I'm trying to implement a scripting engine. I've been using whatever samples I can find, and I think I'm close to having something that works. Based on a previous example here, I've got the following code (in vb.net): The problem I have got at the moment is when I try to invoke a sub in the script (in this case "hello") I get a error: "non static method ...
    Performance / Memory (3 replies)
    microsoft.public.dotnet.vsa
    We are thinking of VSA for a project we are currently working on. At any given point in time, the system could be running up to 700 scripts. All varied, or some the same. While this may seem excessive, it is required to have (a) custom scripting per process, (b) many scripts are running at the same time, (c) will be individually be maintained in each scriped object. Does anyone know what the overh...
    Getting a callback from IVsaGlobalItem? (5 replies)
    microsoft.public.dotnet.vsa
    I've created a simple IVsaSite implementation, and am able to create an instace of the VB engine and bind the engine to my site. I've also added a IVsaGlobalItem so that the script can call MyMethod( "foo" ) vs. MyClass.MyMethod( "foo" ). When the code is compiled, as expected, the engine calls GetGlobalInstance( "MyClass" ) and I return an instance of MyClass, which implements MyMethod(). The pro...
    Debugging in VSA (4 replies)
    microsoft.public.dotnet.vsa
    I have set up a small test program in VB.NET by which I'm able to call the VSA IDE create functions within a Class save it and then run the host app to call these functions and it works fine. But when I try to set a break point in the IDE and run the host app the class method is called and the value is returned, but doesn't stop at the break point. Please let me know if I'm missing something, beca...
    Exposing internal object to VSA (2 replies)
    microsoft.public.dotnet.vsa
    I've managed to get external assemblies working with my VSA code, but I'm finding the need to expose some of my internal objects to the VSA engine, but I can't get it to work to save my life. One of the methods I've tried is the following, but it will not work. With CType(m Engine.Items.CreateItem(IO.Path.GetFileName(Application.ExecutablePa th), VsaItemType.Reference, VsaItemFlag.None), IVsaRefer...
    AssemblyNameInvalid when trying to add a reference (2 replies)
    microsoft.public.dotnet.vsa
    (sorry for the multiposting, I didn;t know about this newsgroups before)' I'm writing a C# application that executes VB.NET scripts from configuration files. I am having trouble trying to add references to assemblies that the script needs. For examlpe, consider this helper class (Assembly name WFTestLibrary, file WFTestLibrary.dll): using System; using System.IO; namespace mycompany.WFTestLibrary ...
    Visit the archive for messages from this site.
  • October 2001 (30 items)
  • November 2001 (5 items)
  • December 2001 (4 items)
  • January 2002 (6 items)
  • February 2002 (5 items)
  • March 2002 (5 items)
  • April 2002 (3 items)
  • May 2002 (9 items)
  • June 2002 (2 items)
  • July 2002 (4 items)
  • August 2002 (8 items)
  • October 2002 (9 items)
  • January 2003 (5 items)
  • February 2003 (3 items)
  • March 2003 (1 item)
  • July 2003 (4 items)
  • January 2004 (3 items)
  • February 2004 (1 item)
  • April 2004 (2 items)
  • June 2004 (4 items)
  • July 2004 (1 item)
  • August 2004 (1 item)
  • September 2004 (1 item)
    Ad


    Need Dot Net Interview Questions?
    Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
    .Net Projects
    Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
    Free .net Help
    Commission ExamGuru, Inc. and his team for your next bespoke software project
    FogBUGZ
    The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
    Awesome Tools
    If you don't know about these, you're missing out... IT Certification Questions
    IT Interview Questions
    Free Oracle 10g Training
    MCSE Boortcamp
    Cisco Study Guides
    Cheap Study Guides
    Exact Questions
    Dot Net Interview Questions
    Oracle OCP
    Cheap Travel
    Designer Perfumes - Wholesale Prices
    Free Programming Tutorials
     
    ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
     Copyright © ExamGuru, Inc. 2001-2006
    Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification