Quantcast
Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog



Channel Description:

ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

older | 1 | .... | 105 | 106 | (Page 107) | 108 | 109 | .... | 115 | newer

    0 0

    I've seen developers trying to get TypeScript source code running natively inside ClearScript, but these efforts seem more like unofficial workarounds. For example, this StackOverflow thread from 2013:

    http://stackoverflow.com/questions/19023498/loading-the-typescript-compiler-into-clearscript-wscript-is-undefined-imposs

    Are there any plans to officially support TypeScript directly?

    0 0

    Hello sgammans,

    We have no plans to add explicit TypeScript support. Because TypeScript applications are compiled to plain JavaScript, ClearScript should be able to run them, at least via V8ScriptEngine.

    As for the TypeScript compiler itself, it too is available in plain JavaScript form, so if you need on-the-fly compilation, you just need to code up a minimal driver. The StackOverflow thread provides a basic sample.

    Good luck!

    0 0
  • 09/27/16--05:42: Updated Wiki: Home
  • Description

    ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

    Features

    • Simple usage; create a script engine, add your objects and/or types, run scripts
    • Support for several script engines: Google's V8, Microsoft's JScript and VBScript
    • Exposed resources require no modification, decoration, or special coding of any kind
    • Scripts get simple access to most of the features of exposed objects and types:
      • Methods, properties, fields, events
      • (Objects) Indexers, extension methods, conversion operators, explicitly implemented interfaces
      • (Types) Constructors, nested types
    • Full support for generic types and methods, including C#-like type inference and explicit type arguments
    • Scripts can invoke methods with output parameters, optional parameters, and parameter arrays
    • Script delegates enable callbacks into script code
    • Support for exposing all the types defined in one or more assemblies in one step
    • Optional support for importing types and assemblies from script code
    • The host can invoke script functions and access script objects directly
    • Full support for script debugging

    Examples

    using System;
    using Microsoft.ClearScript;
    using Microsoft.ClearScript.JavaScript;
    using Microsoft.ClearScript.V8;
    
    // create a script engineusing (var engine = new V8ScriptEngine())
    {
        // expose a host type
        engine.AddHostType("Console", typeof(Console));
        engine.Execute("Console.WriteLine('{0} is an interesting number.', Math.PI)");
    
        // expose a host object
        engine.AddHostObject("random", new Random());
        engine.Execute("Console.WriteLine(random.NextDouble())");
    
        // expose entire assemblies
        engine.AddHostObject("lib", new HostTypeCollection("mscorlib", "System.Core"));
        engine.Execute("Console.WriteLine(lib.System.DateTime.Now)");
    
        // create a host object from script
        engine.Execute(@"
            birthday = new lib.System.DateTime(2007, 5, 22);
            Console.WriteLine(birthday.ToLongDateString());
        ");
    
        // use a generic class from script
        engine.Execute(@"
            Dictionary = lib.System.Collections.Generic.Dictionary;
            dict = new Dictionary(lib.System.String, lib.System.Int32);
            dict.Add('foo', 123);
        ");
    
        // call a host method with an output parameter
        engine.AddHostObject("host", new HostFunctions());
        engine.Execute(@"
            intVar = host.newVar(lib.System.Int32);
            found = dict.TryGetValue('foo', intVar.out);
            Console.WriteLine('{0} {1}', found, intVar);
        ");
    
        // create and populate a host array
        engine.Execute(@"
            numbers = host.newArr(lib.System.Int32, 20);
            for (var i = 0; i < numbers.Length; i++) { numbers[i] = i; }
            Console.WriteLine(lib.System.String.Join(', ', numbers));
        ");
    
        // create a script delegate
        engine.Execute(@"
            Filter = lib.System.Func(lib.System.Int32, lib.System.Boolean);
            oddFilter = new Filter(function(value) {
                return (value & 1) ? true : false;
            });
        ");
    
        // use LINQ from script
        engine.Execute(@"
            oddNumbers = numbers.Where(oddFilter);
            Console.WriteLine(lib.System.String.Join(', ', oddNumbers));
        ");
    
        // use a dynamic host object
        engine.Execute(@"
            expando = new lib.System.Dynamic.ExpandoObject();
            expando.foo = 123;
            expando.bar = 'qux';
            delete expando.foo;
        ");
    
        // call a script function
        engine.Execute("function print(x) { Console.WriteLine(x); }");
        engine.Script.print(DateTime.Now.DayOfWeek);
    
        // examine a script object
        engine.Execute("person = { name: 'Fred', age: 5 }");
        Console.WriteLine(engine.Script.person.name);
    
        // read a JavaScript typed array
        engine.Execute("values = new Int32Array([1, 2, 3, 4, 5])");
        var values = (ITypedArray<int>)engine.Script.values;
        Console.WriteLine(string.Join(", ", values.ToArray()));
    }

    0 0

    Hello,

    I'm trying to create/parse date from a JS evaluate and return them as strings back into c# code as such:

    ```
    using (var engine = new V8ScriptEngine())
    {
    resultEval = engine.Evaluate(expression);
    }
    ```

    where my `expression` is

    `new Date()`

    and it return an "Microsoft.ClearScript.V8.V8ScriptItem" object with an "UnderlyingSystemType" saying:

    '((Microsoft.ClearScript.ScriptItem)resultEval).UnderlyingSystemType' threw an exception of type 'System.NotImplementedException'

    Now, I feel like this *should* work, but it's not. Any ideas? I don't think anything went wrong during the build/reference process. Other JS libraries such as Math work flawlessly.

    Also, this is only an issue when trying to create a `new` date. Calling `Date()` works, but it only displays today's date.

    0 0

    Hello,

    I'm trying to create/parse date from a JS evaluate and return them as strings back into c# code as such:

    ```
    using (var engine = new V8ScriptEngine())
    {
    resultEval = engine.Evaluate(expression);
    }
    ```

    where my `expression` is

    `new Date()`

    and it return an "Microsoft.ClearScript.V8.V8ScriptItem" object with an "UnderlyingSystemType" saying:

    '((Microsoft.ClearScript.ScriptItem)resultEval).UnderlyingSystemType' threw an exception of type 'System.NotImplementedException'

    Now, I feel like this *should* work, but it's not. Any ideas? I don't think anything went wrong during the build/reference process. Other JS libraries such as Math work flawlessly.

    Also, this is only an issue when trying to create a `new` date. Calling `Date()` works, but it only displays today's date.
    Comments: Hello! This is currently by design. That is, ClearScript's script object proxies implement a [system interface](https://msdn.microsoft.com/en-us/library/system.reflection.ireflect(v=vs.110).aspx) that includes [`UnderlyingSystemType`](https://msdn.microsoft.com/en-us/library/system.reflection.ireflect.underlyingsystemtype(v=vs.110).aspx), but their implementation of that property is just an exception-throwing stub. That's because the property doesn't appear to be useful or even appropriate for objects that don't represent types. Why are you invoking this property? What do you expect it to return? Perhaps more to the point, what would you like to do on the .NET side with a JavaScript `Date` object? Thanks!

    0 0

    I get a weird "Cannot access a disposed object." error which I cant track down for its evil root.

    Im stuck in not finding the cause and out of ideas.
    its going to be difficult to explain, but basically I have 2 VBScript Engines instances running the same code in a sequential, non-parallel order. like:

    ```
    var engine1 = new VBScriptEngine();
    engine1.Execute(..);
    engine1.Execute(..);
    try {
    engine1.Execute("engine1.Interrupt()");
    } catch (Exception e) {
    if (!(e is ScriptInterruptedException || e?.InnerException is ScriptInterruptedException))
    throw e;
    }
    engine1.Dispose();
    engine1 = null;

    var engine2 = new VBScriptEngine();
    engine2.Execute(..);
    engine2.Execute(..);
    try {
    engine2.Execute("engine2.Interrupt()");
    } catch (Exception e) {
    if (!(e is ScriptInterruptedException || e?.InnerException is ScriptInterruptedException))
    throw e;
    }
    engine2.Dispose();
    engine2 = null;

    ```

    If I dont call the Dispose() method after an engine finishes its job with a final Interrupt() call inside a loaded Script Document, everything is doing fine.

    but on calling the Dispose() method on the 1st VBScript Engine after it finishes all tasks and stops with an Interrupt() call, the 2nd VBScript Engine still makes it to end of all its user script including the final Interrupt() call from within a Script document, but than somehow hits an "Cannot access a disposed object" Error after the engine successfully catches the Interrupt Exception.

    I ve attached some screenshots where I think they might be better to further analyze the issue.

    in addition some short descriptions to the attached images:

    (se_all_intrptex.PNG)
    1st script engine runs all script code, finishes and finally calls Interrupt() inside a script document, hitting the breakpoint in WindowsScriptEngine.Site.cs:231.

    (se1_1oninvokeex.PNG)
    hits InvokeMethod(...):177
    and continues with Marshal.GetObjectForNativeVariant(...)

    (se1_ondisposeex.PNG)
    step-in next stops at CoTaskMemBlock.cs - Dispose():85
    NOTICE the exception in the Locals Window writes: Exception HRESULT 0x80020101

    (se1_errout.PNG + se1_errout_det.PNG)
    last significant break seems to be here, where the exception catched before is being thrown.


    when the 2nd script engine finishes all user script and receives the Interrupt() call, things go the same except that the Exception in the Locals Window (se2_2ondisposeex.PNG) now writes "Cannot access a disposed object..."

    further it continues and throws a TargetInvocationException with the "Cannot access a disposed object" inside as inner exception.

    the only difference I could catch here is that omitting the Dispose() call on the script engines produces all times a HRESULT 0x80020101 Exception as soon as CoTaskMemBlock.cs - Dispose():86 is hit.

    but by having the Dispose() calls, all scripts engines created afterwards will produce a "Cannot access a disposed object".

    one more to note: the object which is being noted as disposed is a: Microsoft.ClearScript.Windows.VBScriptEngine' object. the screenshots: se2_1oninvokeex.PNG, se2_2ondisposeex.PNG just suck in showing it.

    I tried to step trough into any line inside the clearscript implementation where the scriptengine.IsDisposed prop was set to true, but no luck. I could not find any context where the scriptengine was marked as IsDisposed=true before the exception "Cannot access a disposed object" was thrown.

    anyways, my quick fix so far is a simple exception check similar to:
    ```
    ...
    catch (Exception e) {
    if !(myFlag.IsScriptFinished && e.InnerException != null && e.InnerException.Message.Contains("Cannot access a disposed object."))
    throw e;
    }
    ...
    ```

    much appreciate any help. thanks






    0 0

    Hello,

    we are having issues with a portion of code that basically provokes an exception in user code called by clearscript, and then calls Interrupt on the V8 engine.

    It always crashes. Isn't this scenario supposed to function properly ? (I mean, Interrupt should not crash... ?)

    Should I explicitely wait before Interrupting in this case ? (but this would be some sort of workaround?)

    Cdlt,
    Julien.

    btw: reproduced on ClearScript 5.4.6 (Nuget version)

    ```
    [Test]
    public virtual void TestScriptTerminateCrash()
    {
    var ctx = new PropertyBag();
    using (var engine = new V8ScriptEngine("CrashScript"))
    {
    engine.AddHostObject("context", ctx);

    var eventW = new ManualResetEventSlim(initialState: false);
    var tokenSource = new CancellationTokenSource();

    // start notification only
    var startEvent = new ManualResetEventSlim(false);

    ThreadStart main = () =>
    {
    try
    {

    ctx["waitCode"] = new Action(() =>
    {
    // Waiting in the C# code : a cancel exception is generated here
    eventW.Wait(tokenSource.Token);

    });
    ctx["startEvent"] = startEvent;
    ctx["counter"] = 0;
    try
    {
    System.DateTime dtRun = System.DateTime.UtcNow;
    engine.Execute("dummyDocument.js", @"
    // Start
    context.counter = 1;

    context.startEvent.Set();

    context.counter = 2;

    context.waitCode();

    context.counter = 3;


    ");
    Assert.Inconclusive();
    }
    catch (Microsoft.ClearScript.ScriptInterruptedException si)
    {
    Assert.That(si.Message.Contains("interrupted"));
    }
    catch (Microsoft.ClearScript.ScriptEngineException segx)
    {
    if (segx.InnerException is System.Reflection.TargetInvocationException &&
    segx.InnerException.InnerException != null)
    throw segx.InnerException.InnerException;
    Assert.Fail();
    }
    }
    catch (OperationCanceledException)
    {
    }
    catch (Exception)
    {
    Assert.Fail();
    }

    };

    var t = new Thread(main);
    t.Start();
    Assert.That(startEvent.Wait(5000));

    // Cancel + interrupt
    tokenSource.Cancel();
    //Thread.Sleep(1000); // won't fail if we interrupt later
    engine.Interrupt();

    t.Join();

    Assert.AreEqual(2, (Int32)ctx["counter"]);
    }
    }

    ```

    Comments: Thanks for considering a fix. The real-life scenario was basically an user script that self destroys by closing its own container, so the cancellation exception was expected indeed.

    0 0

    Hello,

    we are having issues with a portion of code that basically provokes an exception in user code called by clearscript, and then calls Interrupt on the V8 engine.

    It always crashes. Isn't this scenario supposed to function properly ? (I mean, Interrupt should not crash... ?)

    Should I explicitely wait before Interrupting in this case ? (but this would be some sort of workaround?)

    Cdlt,
    Julien.

    btw: reproduced on ClearScript 5.4.6 (Nuget version)

    ```
    [Test]
    public virtual void TestScriptTerminateCrash()
    {
    var ctx = new PropertyBag();
    using (var engine = new V8ScriptEngine("CrashScript"))
    {
    engine.AddHostObject("context", ctx);

    var eventW = new ManualResetEventSlim(initialState: false);
    var tokenSource = new CancellationTokenSource();

    // start notification only
    var startEvent = new ManualResetEventSlim(false);

    ThreadStart main = () =>
    {
    try
    {

    ctx["waitCode"] = new Action(() =>
    {
    // Waiting in the C# code : a cancel exception is generated here
    eventW.Wait(tokenSource.Token);

    });
    ctx["startEvent"] = startEvent;
    ctx["counter"] = 0;
    try
    {
    System.DateTime dtRun = System.DateTime.UtcNow;
    engine.Execute("dummyDocument.js", @"
    // Start
    context.counter = 1;

    context.startEvent.Set();

    context.counter = 2;

    context.waitCode();

    context.counter = 3;


    ");
    Assert.Inconclusive();
    }
    catch (Microsoft.ClearScript.ScriptInterruptedException si)
    {
    Assert.That(si.Message.Contains("interrupted"));
    }
    catch (Microsoft.ClearScript.ScriptEngineException segx)
    {
    if (segx.InnerException is System.Reflection.TargetInvocationException &&
    segx.InnerException.InnerException != null)
    throw segx.InnerException.InnerException;
    Assert.Fail();
    }
    }
    catch (OperationCanceledException)
    {
    }
    catch (Exception)
    {
    Assert.Fail();
    }

    };

    var t = new Thread(main);
    t.Start();
    Assert.That(startEvent.Wait(5000));

    // Cancel + interrupt
    tokenSource.Cancel();
    //Thread.Sleep(1000); // won't fail if we interrupt later
    engine.Interrupt();

    t.Join();

    Assert.AreEqual(2, (Int32)ctx["counter"]);
    }
    }

    ```

    Comments: Actually, our upcoming change avoids throwing exceptions when script interruption is in progress. Because JavaScript object allocation fails when V8 is in that state, the JavaScript wrapper for the managed exception cannot be constructed. The fix eliminates the crash and should provide consistent behavior in this scenario.

    0 0

    I get a weird "Cannot access a disposed object." error which I cant track down for its evil root.

    Im stuck in not finding the cause and out of ideas.
    its going to be difficult to explain, but basically I have 2 VBScript Engines instances running the same code in a sequential, non-parallel order. like:

    ```
    var engine1 = new VBScriptEngine();
    engine1.Execute(..);
    engine1.Execute(..);
    try {
    engine1.Execute("engine1.Interrupt()");
    } catch (Exception e) {
    if (!(e is ScriptInterruptedException || e?.InnerException is ScriptInterruptedException))
    throw e;
    }
    engine1.Dispose();
    engine1 = null;

    var engine2 = new VBScriptEngine();
    engine2.Execute(..);
    engine2.Execute(..);
    try {
    engine2.Execute("engine2.Interrupt()");
    } catch (Exception e) {
    if (!(e is ScriptInterruptedException || e?.InnerException is ScriptInterruptedException))
    throw e;
    }
    engine2.Dispose();
    engine2 = null;

    ```

    If I dont call the Dispose() method after an engine finishes its job with a final Interrupt() call inside a loaded Script Document, everything is doing fine.

    but on calling the Dispose() method on the 1st VBScript Engine after it finishes all tasks and stops with an Interrupt() call, the 2nd VBScript Engine still makes it to end of all its user script including the final Interrupt() call from within a Script document, but than somehow hits an "Cannot access a disposed object" Error after the engine successfully catches the Interrupt Exception.

    I ve attached some screenshots where I think they might be better to further analyze the issue.

    in addition some short descriptions to the attached images:

    (se_all_intrptex.PNG)
    1st script engine runs all script code, finishes and finally calls Interrupt() inside a script document, hitting the breakpoint in WindowsScriptEngine.Site.cs:231.

    (se1_1oninvokeex.PNG)
    hits InvokeMethod(...):177
    and continues with Marshal.GetObjectForNativeVariant(...)

    (se1_ondisposeex.PNG)
    step-in next stops at CoTaskMemBlock.cs - Dispose():85
    NOTICE the exception in the Locals Window writes: Exception HRESULT 0x80020101

    (se1_errout.PNG + se1_errout_det.PNG)
    last significant break seems to be here, where the exception catched before is being thrown.


    when the 2nd script engine finishes all user script and receives the Interrupt() call, things go the same except that the Exception in the Locals Window (se2_2ondisposeex.PNG) now writes "Cannot access a disposed object..."

    further it continues and throws a TargetInvocationException with the "Cannot access a disposed object" inside as inner exception.

    the only difference I could catch here is that omitting the Dispose() call on the script engines produces all times a HRESULT 0x80020101 Exception as soon as CoTaskMemBlock.cs - Dispose():86 is hit.

    but by having the Dispose() calls, all scripts engines created afterwards will produce a "Cannot access a disposed object".

    one more to note: the object which is being noted as disposed is a: Microsoft.ClearScript.Windows.VBScriptEngine' object. the screenshots: se2_1oninvokeex.PNG, se2_2ondisposeex.PNG just suck in showing it.

    I tried to step trough into any line inside the clearscript implementation where the scriptengine.IsDisposed prop was set to true, but no luck. I could not find any context where the scriptengine was marked as IsDisposed=true before the exception "Cannot access a disposed object" was thrown.

    anyways, my quick fix so far is a simple exception check similar to:
    ```
    ...
    catch (Exception e) {
    if !(myFlag.IsScriptFinished && e.InnerException != null && e.InnerException.Message.Contains("Cannot access a disposed object."))
    throw e;
    }
    ...
    ```

    much appreciate any help. thanks





    Comments: Greetings! The following test code, based on your sample, fails to reproduce any issue: ``` C# for (var index = 0; index < 100; index++) { var engine1 = new VBScriptEngine(); engine1.AddHostObject("lib", HostItemFlags.GlobalMembers, new HostTypeCollection("mscorlib")) engine1.Script.engine1 = engine1; engine1.Execute("System.Console.WriteLine(\"aaa\")"); engine1.Execute("System.Console.WriteLine(\"bbb\")"); try { engine1.Execute("engine1.Interrupt()"); } catch (Exception e) { if (!(e is ScriptInterruptedException || e.InnerException is ScriptInterruptedException)) throw e; } engine1.Dispose(); var engine2 = new VBScriptEngine(); engine2.AddHostObject("lib", HostItemFlags.GlobalMembers, new HostTypeCollection("mscorlib")) engine2.Script.engine2 = engine2; engine2.Execute("System.Console.WriteLine(\"ccc\")"); engine2.Execute("System.Console.WriteLine(\"ddd\")"); try { engine2.Execute("engine2.Interrupt()"); } catch (Exception e) { if (!(e is ScriptInterruptedException || e.InnerException is ScriptInterruptedException)) throw e; } engine2.Dispose(); } ``` We've also tried replacing the `for` loop with [`Parallel.For`](https://msdn.microsoft.com/en-us/library/system.threading.tasks.parallel.for(v=vs.110).aspx), but the test still ran to completion every time. Is there something you're doing differently? For example, in your scenario, do the engines refer to each other by some means? A small sample that reproduces the issue could go a long way. If that's not possible, then a stack trace might help. Thanks!

    0 0

    Hello,

    I'm trying to create/parse date from a JS evaluate and return them as strings back into c# code as such:

    ```
    using (var engine = new V8ScriptEngine())
    {
    resultEval = engine.Evaluate(expression);
    }
    ```

    where my `expression` is

    `new Date()`

    and it return an "Microsoft.ClearScript.V8.V8ScriptItem" object with an "UnderlyingSystemType" saying:

    '((Microsoft.ClearScript.ScriptItem)resultEval).UnderlyingSystemType' threw an exception of type 'System.NotImplementedException'

    Now, I feel like this *should* work, but it's not. Any ideas? I don't think anything went wrong during the build/reference process. Other JS libraries such as Math work flawlessly.

    Also, this is only an issue when trying to create a `new` date. Calling `Date()` works, but it only displays today's date.
    Comments: Hi, thanks for taking the time to answer. We have a web application and want to have a scripting interface for the user where they can manipulate and compare dates (as well as do any other scripting) as they would easily be able in VBS with DateAdd(). Now, I understand you can't flat out return a JavaScript `Date` object into .NET and expect it to work, so the issue is with the return type. But then why does `Date()` work? Is it implementing DateTime.Now? I think that's a bit confusing. After thinking about this, it does seem that JS `Date()` directly returns a string, which would explain this behaviour. What I was expecting to return would be a string (that we could convert into DateTime when back in .NET), or a DateTime object. It looks like I'll have to instruct users to use .toString() instead of returning the JavaScript `Date` object directly. Thanks.

    0 0

    Hello,

    I'm trying to create/parse date from a JS evaluate and return them as strings back into c# code as such:

    ```
    using (var engine = new V8ScriptEngine())
    {
    resultEval = engine.Evaluate(expression);
    }
    ```

    where my `expression` is

    `new Date()`

    and it return an "Microsoft.ClearScript.V8.V8ScriptItem" object with an "UnderlyingSystemType" saying:

    '((Microsoft.ClearScript.ScriptItem)resultEval).UnderlyingSystemType' threw an exception of type 'System.NotImplementedException'

    Now, I feel like this *should* work, but it's not. Any ideas? I don't think anything went wrong during the build/reference process. Other JS libraries such as Math work flawlessly.

    Also, this is only an issue when trying to create a `new` date. Calling `Date()` works, but it only displays today's date.
    Comments: Also, I'll explain the full use-case. 1. We have a .NET DateTime object we want to expose to the user. To do this, we expose a macro to the user that we then convert into a JS Date object as such: `new Date(" + dateTimeValue.Year.ToString() + "," + dateTimeValue.Month.ToString() + "," + dateTimeValue.Day.ToString() + "," + dateTimeValue.Hour.ToString() + "," + dateTimeValue.Minute.ToString() + "," + dateTimeValue.Second.ToString() + "," + dateTimeValue.Millisecond + ")";` 2. We want the user to be able to manipulate the date in JS 3. We want the user to be able to return the manipulated date (or a new date) back into .NET At this point, is the best solution to use JS `.toString` and then DateTime.TryParse? because we also want to support user returning strings and numeric datatypes. Thanks!

    0 0

    Hello,

    I'm trying to create/parse date from a JS evaluate and return them as strings back into c# code as such:

    ```
    using (var engine = new V8ScriptEngine())
    {
    resultEval = engine.Evaluate(expression);
    }
    ```

    where my `expression` is

    `new Date()`

    and it return an "Microsoft.ClearScript.V8.V8ScriptItem" object with an "UnderlyingSystemType" saying:

    '((Microsoft.ClearScript.ScriptItem)resultEval).UnderlyingSystemType' threw an exception of type 'System.NotImplementedException'

    Now, I feel like this *should* work, but it's not. Any ideas? I don't think anything went wrong during the build/reference process. Other JS libraries such as Math work flawlessly.

    Also, this is only an issue when trying to create a `new` date. Calling `Date()` works, but it only displays today's date.
    Comments: Hi again, ​ >Now, I understand you can't flat out return a JavaScript Date object into .NET and expect it to work, so the issue is with the return type. But then why does Date() work? Is it implementing DateTime.Now? I think that's a bit confusing. ​ Sorry about the confusion. ClearScript doesn't convert automatically between JavaScript's `Date` and .NET's `DateTime`. It aims instead to provide full access to all objects on both sides. You ask why `new Date()` works. It works because it's 100% valid JavaScript. To evaluate it, ClearScript invokes the V8 script engine, but it isn't involved beyond that. Now, when a `Date` or any other script object is returned to the host, ClearScript wraps it in a [dynamic](https://msdn.microsoft.com/en-us/library/dd264736.aspx) proxy that provides full access to the script object. Here's a sample that demonstrates the best way to convert `DateTime` to `Date` in script code and perform the opposite conversion in C#: ``` C# // create .NET DateTime var clrNow = DateTime.Now; Console.WriteLine(clrNow); // .NET DateTime -> JavaScript Date engine.Script.clrNow = clrNow; engine.AddHostType(typeof(Console)); engine.Execute(@" jsNow = new Date(clrNow.ToUniversalTime().ToString('o')); Console.WriteLine(jsNow.toString()); "); // JavaScript Date -> .NET DateTime dynamic jsNow = engine.Script.jsNow; var clrNow2 = DateTime.Parse(jsNow.toISOString()); Console.WriteLine(clrNow2); ``` Good luck!

    0 0

    Hello,

    I'm trying to create/parse date from a JS evaluate and return them as strings back into c# code as such:

    ```
    using (var engine = new V8ScriptEngine())
    {
    resultEval = engine.Evaluate(expression);
    }
    ```

    where my `expression` is

    `new Date()`

    and it return an "Microsoft.ClearScript.V8.V8ScriptItem" object with an "UnderlyingSystemType" saying:

    '((Microsoft.ClearScript.ScriptItem)resultEval).UnderlyingSystemType' threw an exception of type 'System.NotImplementedException'

    Now, I feel like this *should* work, but it's not. Any ideas? I don't think anything went wrong during the build/reference process. Other JS libraries such as Math work flawlessly.

    Also, this is only an issue when trying to create a `new` date. Calling `Date()` works, but it only displays today's date.
    Comments: BTW, you could also avoid string formatting and parsing altogether: ``` C# public static class DateTimeUtil { private static readonly DateTime _epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); public static double ToEpochOffset(this DateTime dateTime) { return (dateTime.ToUniversalTime() - _epoch).TotalMilliseconds; } public static DateTime FromEpochOffset(double offset) { return (_epoch + TimeSpan.FromMilliseconds(offset)).ToLocalTime(); } } ``` and then: ``` C# // export .NET types engine.AddHostType(typeof(DateTimeUtil)); engine.AddHostType(typeof(Console)); // create .NET DateTime var clrNow = DateTime.Now; Console.WriteLine(clrNow); // .NET DateTime -> JavaScript Date engine.Script.clrNow = clrNow; engine.Execute(@" jsNow = new Date(clrNow.ToEpochOffset()); Console.WriteLine(jsNow.toString()); "); // JavaScript Date -> .NET DateTime dynamic jsNow = engine.Script.jsNow; var clrNow2 = DateTimeUtil.FromEpochOffset(jsNow.valueOf()); Console.WriteLine(clrNow2); ``` Cheers!

    0 0

    I get a weird "Cannot access a disposed object." error which I cant track down for its evil root.

    Im stuck in not finding the cause and out of ideas.
    its going to be difficult to explain, but basically I have 2 VBScript Engines instances running the same code in a sequential, non-parallel order. like:

    ```
    var engine1 = new VBScriptEngine();
    engine1.Execute(..);
    engine1.Execute(..);
    try {
    engine1.Execute("engine1.Interrupt()");
    } catch (Exception e) {
    if (!(e is ScriptInterruptedException || e?.InnerException is ScriptInterruptedException))
    throw e;
    }
    engine1.Dispose();
    engine1 = null;

    var engine2 = new VBScriptEngine();
    engine2.Execute(..);
    engine2.Execute(..);
    try {
    engine2.Execute("engine2.Interrupt()");
    } catch (Exception e) {
    if (!(e is ScriptInterruptedException || e?.InnerException is ScriptInterruptedException))
    throw e;
    }
    engine2.Dispose();
    engine2 = null;

    ```

    If I dont call the Dispose() method after an engine finishes its job with a final Interrupt() call inside a loaded Script Document, everything is doing fine.

    but on calling the Dispose() method on the 1st VBScript Engine after it finishes all tasks and stops with an Interrupt() call, the 2nd VBScript Engine still makes it to end of all its user script including the final Interrupt() call from within a Script document, but than somehow hits an "Cannot access a disposed object" Error after the engine successfully catches the Interrupt Exception.

    I ve attached some screenshots where I think they might be better to further analyze the issue.

    in addition some short descriptions to the attached images:

    (se_all_intrptex.PNG)
    1st script engine runs all script code, finishes and finally calls Interrupt() inside a script document, hitting the breakpoint in WindowsScriptEngine.Site.cs:231.

    (se1_1oninvokeex.PNG)
    hits InvokeMethod(...):177
    and continues with Marshal.GetObjectForNativeVariant(...)

    (se1_ondisposeex.PNG)
    step-in next stops at CoTaskMemBlock.cs - Dispose():85
    NOTICE the exception in the Locals Window writes: Exception HRESULT 0x80020101

    (se1_errout.PNG + se1_errout_det.PNG)
    last significant break seems to be here, where the exception catched before is being thrown.


    when the 2nd script engine finishes all user script and receives the Interrupt() call, things go the same except that the Exception in the Locals Window (se2_2ondisposeex.PNG) now writes "Cannot access a disposed object..."

    further it continues and throws a TargetInvocationException with the "Cannot access a disposed object" inside as inner exception.

    the only difference I could catch here is that omitting the Dispose() call on the script engines produces all times a HRESULT 0x80020101 Exception as soon as CoTaskMemBlock.cs - Dispose():86 is hit.

    but by having the Dispose() calls, all scripts engines created afterwards will produce a "Cannot access a disposed object".

    one more to note: the object which is being noted as disposed is a: Microsoft.ClearScript.Windows.VBScriptEngine' object. the screenshots: se2_1oninvokeex.PNG, se2_2ondisposeex.PNG just suck in showing it.

    I tried to step trough into any line inside the clearscript implementation where the scriptengine.IsDisposed prop was set to true, but no luck. I could not find any context where the scriptengine was marked as IsDisposed=true before the exception "Cannot access a disposed object" was thrown.

    anyways, my quick fix so far is a simple exception check similar to:
    ```
    ...
    catch (Exception e) {
    if !(myFlag.IsScriptFinished && e.InnerException != null && e.InnerException.Message.Contains("Cannot access a disposed object."))
    throw e;
    }
    ...
    ```

    much appreciate any help. thanks





    Comments: Thanks for the fast reply. Allright I will dig deeper. sorry for spamming. thanks again

    0 0

    Hi,

    I am using a modified version of node-inspector which is a V8-compatible debugger.

    I think this is a thread related issue because I made another test using delegates.

    Here is the related C# code:
            public delegate void FormEvent(string eventName, object sender, EventArgs e);
            private FormEvent callbacks;
    
            public void RegisterToFormEvents(FormEvent eventHandler)
            {
                callbacks += eventHandler;
            }
    
            private void MainForm_Resize(object sender, EventArgs e)
            {
                    new Thread(() =>
                    {
                        if (callbacks != null)
                            callbacks("Resize", sender, e);
                    }).Start();           
            }
    
    
    And here is the Javascript code:
    var callback1 = host.del(FormEvent, function (eventName, sender, e) {
        Console.WriteLine(eventName + " triggered");
    });
    main.RegisterToFormEvents(callback1);
    I run the script and put a breakpoint at "Console.WriteLine" line.

    The following calling method makes the Winforms application hang when it hits the breakpoint:
                        if (callbacks != null)
                            callbacks("Resize", sender, e);
    
    If I call it in a new thread, it works fine:
                    new Thread(() =>
                    {
                        if (callbacks != null)
                            callbacks("Resize", sender, e);
                    }).Start();           
    

    0 0

    If you mean "call stack" by "stack trace", the following is the one I copied when the application hanged by using Ctrl-Break.

    [Managed to Native Transition]
    ClearScriptV8-32.dll!Microsoft.ClearScript.V8.V8ObjectImpl.Invoke(object[] gcArgs, bool asConstructor) + 0x8e bytes 
    ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptItem.TryBindAndInvoke(System.Dynamic.DynamicMetaObjectBinder binder, object[] args, out object result) + 0x1d0 bytes   
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryWrappedBindAndInvoke.AnonymousMethod__0() + 0x5a bytes  
    ClearScript.dll!Microsoft.ClearScript.ScriptEngine.ScriptInvoke<bool>(System.Func<bool> func) + 0x47 bytes  
    ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.ScriptInvoke<bool>.AnonymousMethod__24() + 0xf bytes    
    ClearScriptV8-32.dll!<Module>.Microsoft.ClearScript.V8.?A0x792c8756.LockCallback(void* pvArg) + 0xa bytes   
    [Native to Managed Transition]  
    [Managed to Native Transition]  
    ClearScriptV8-32.dll!Microsoft.ClearScript.V8.V8ContextProxyImpl.InvokeWithLock(System.Action gcAction) + 0xb1 bytes    
    ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.ScriptInvoke<bool>(System.Func<bool> func) + 0x5a bytes 
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryWrappedBindAndInvoke(System.Dynamic.DynamicMetaObjectBinder binder, object[] wrappedArgs, out object result) + 0x81 bytes   
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryWrappedInvokeOrInvokeMember(System.Dynamic.DynamicMetaObjectBinder binder, System.Reflection.ParameterInfo[] parameters, object[] args, out object result) + 0x17c bytes    
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryInvoke(System.Dynamic.InvokeBinder binder, object[] args, out object result) + 0x79 bytes   
    [Lightweight Function]  
    System.Core.dll!System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3<object,object,System.EventArgs>(System.Runtime.CompilerServices.CallSite site, object arg0, object arg1, System.EventArgs arg2) + 0x2bc bytes  
    ClearScript.dll!Microsoft.ClearScript.DelegateFactory.ProcShim<object,System.EventArgs,System.EventHandler>.InvokeTarget.AnonymousMethod__29() + 0x191 bytes    
    ClearScript.dll!Microsoft.ClearScript.ScriptEngine.SyncInvoke(System.Action action) + 0xa bytes 
    ClearScript.dll!Microsoft.ClearScript.DelegateFactory.ProcShim.Invoke(System.Action action) + 0xb bytes 
    ClearScript.dll!Microsoft.ClearScript.DelegateFactory.ProcShim<object,System.EventArgs,System.EventHandler>.InvokeTarget(object a1, System.EventArgs a2) + 0xbd bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.OnSizeChanged(System.EventArgs e) + 0x9d bytes    

    0 0

    Hi again,

    With your application in the hung state, try attaching the Visual Studio debugger (Debug -> Attach to Process), selecting both Native and Managed (v4.x) debugging modes. With Visual Studio attached, click "Debug -> Break All" and use the Threads and Call Stack windows to find the relevant stack.

    Good luck!

    0 0

    And here are the threads. I hope this is what you want.

    Not Flagged 13452 0 Worker Thread <No Name> Highest
    Not Flagged 11228 6 Worker Thread vshost.RunParkingWindow [Managed to Native Transition] Normal
    Not Flagged 12812 7 Worker Thread .NET SystemEvents [Managed to Native Transition] Normal
    Not Flagged > 14896 8 Main Thread Main Thread CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc Normal
    Not Flagged 10356 9 Worker Thread <No Name> Normal
    Not Flagged 8572 10 Worker Thread <No Name> Normal
    Not Flagged 12764 15 Worker Thread <No Name> CefSharp.Internals.MethodRunnerQueue.ConsumeTasks Normal
    Not Flagged 14768 16 Worker Thread ImageAnimator System.Threading.Thread.Sleep() Normal
    Not Flagged 6692 18 Worker Thread <No Name> CefSharp.Internals.MethodRunnerQueue.ConsumeTasks Normal
    Not Flagged 12992 19 Worker Thread Worker Thread [Managed to Native Transition] Normal
    Not Flagged 3440 11 Worker Thread <No Name> CefSharp.Internals.MethodRunnerQueue.ConsumeTasks Normal
    Not Flagged 11748 0 Worker Thread <No Name> Normal
    Not Flagged 4720 86 Worker Thread <No Name> Normal
    Not Flagged 5960 88 Worker Thread <No Name> OpenBrowser.MainForm.RunCallbacks.AnonymousMethod__0 Normal

    0 0

    Ah, thanks for posting that call stack, but it looks like the deadlock is in ClearScript or V8's native code. Can you post a mixed (native + managed) call stack? A native-only one could provide a clue as well.

    0 0

    ntdll.dll!776ac27c()
    [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
    KernelBase.dll!75002cc7()   
    KernelBase.dll!75002c02()   
    v8-ia32.dll!0f41e03a()  
    v8-ia32.dll!0f37195c()  
    v8-ia32.dll!0f37304f()  
    v8-ia32.dll!0f371ef7()  
    v8-ia32.dll!0f36e513()  
    v8-ia32.dll!0f4876f4()  
    v8-ia32.dll!0f4b75a3()  
    v8-ia32.dll!0f318965()  
    v8-ia32.dll!0f318207()  
    v8-ia32.dll!0f342b86()  
    v8-ia32.dll!0f342984()  
    ClearScriptV8-32.dll!56e46544()     
    ClearScriptV8-32.dll!56e6123a()     
    ClearScriptV8-32.dll!56e6079e()     
    v8-ia32.dll!0f318207()  
    v8-ia32.dll!0f342b86()  
    v8-ia32.dll!0f342984()  
    ClearScriptV8-32.dll!56e46544()     
    ClearScriptV8-32.dll!56e6123a()     
    ClearScriptV8-32.dll!56e6079e()     
    v8-ia32.dll!0f342b86()  
    v8-ia32.dll!0f342984()  
    ClearScriptV8-32.dll!56e46544()     
    ClearScriptV8-32.dll!56e6123a()     
    ClearScriptV8-32.dll!56e6079e()     
    v8-ia32.dll!0f342984()  
    ClearScriptV8-32.dll!56e46544()     
    ClearScriptV8-32.dll!56e6123a()     
    ClearScriptV8-32.dll!56e6079e()     
    ClearScriptV8-32.dll!56e46544()     
    ClearScriptV8-32.dll!56e6123a()     
    ClearScriptV8-32.dll!56e6079e()     
    [Managed to Native Transition]  
    ClearScriptV8-32.dll!Microsoft.ClearScript.V8.V8ObjectImpl.Invoke(object[] gcArgs, bool asConstructor) + 0x8e bytes 
    ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptItem.TryBindAndInvoke(System.Dynamic.DynamicMetaObjectBinder binder, object[] args, out object result) + 0x1d0 bytes   
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryWrappedBindAndInvoke.AnonymousMethod__0() + 0x5a bytes  
    ClearScript.dll!Microsoft.ClearScript.ScriptEngine.ScriptInvoke<bool>(System.Func<bool> func) + 0x47 bytes  
    ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.ScriptInvoke<bool>.AnonymousMethod__24() + 0xf bytes    
    ClearScriptV8-32.dll!<Module>.Microsoft.ClearScript.V8.?A0x792c8756.LockCallback(void* pvArg) + 0xa bytes   
    ClearScriptV8-32.dll!56e44837()     
    [Managed to Native Transition]  
    ClearScriptV8-32.dll!Microsoft.ClearScript.V8.V8ContextProxyImpl.InvokeWithLock(System.Action gcAction) + 0xb1 bytes    
    ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.ScriptInvoke<bool>(System.Func<bool> func) + 0x5a bytes 
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryWrappedBindAndInvoke(System.Dynamic.DynamicMetaObjectBinder binder, object[] wrappedArgs, out object result) + 0x81 bytes   
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryWrappedInvokeOrInvokeMember(System.Dynamic.DynamicMetaObjectBinder binder, System.Reflection.ParameterInfo[] parameters, object[] args, out object result) + 0x17c bytes    
    ClearScript.dll!Microsoft.ClearScript.ScriptItem.TryInvoke(System.Dynamic.InvokeBinder binder, object[] args, out object result) + 0x79 bytes   
    [Lightweight Function]  
    System.Core.dll!System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3<object,object,System.EventArgs>(System.Runtime.CompilerServices.CallSite site, object arg0, object arg1, System.EventArgs arg2) + 0x2bc bytes  
    ClearScript.dll!Microsoft.ClearScript.DelegateFactory.ProcShim<object,System.EventArgs,System.EventHandler>.InvokeTarget.AnonymousMethod__29() + 0x191 bytes    
    ClearScript.dll!Microsoft.ClearScript.ScriptEngine.SyncInvoke(System.Action action) + 0xa bytes 
    ClearScript.dll!Microsoft.ClearScript.DelegateFactory.ProcShim.Invoke(System.Action action) + 0xb bytes 
    ClearScript.dll!Microsoft.ClearScript.DelegateFactory.ProcShim<object,System.EventArgs,System.EventHandler>.InvokeTarget(object a1, System.EventArgs a2) + 0xbd bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.OnSizeChanged(System.EventArgs e) + 0x9d bytes    
    System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds(int x, int y, int width, int height, int clientWidth, int clientHeight) + 0xa7 bytes 
    System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds() + 0xcd bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x381 bytes 
    System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m) + 0x30 bytes    
    System.Windows.Forms.dll!System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message m) + 0x6a bytes 
    System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x13 bytes    
    System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x35 bytes  
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x80 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0xfb bytes  
    CefSharp.WinForms.dll!CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc(ref System.Windows.Forms.Message m) Line 231 + 0xb bytes C#
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x80 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0xfb bytes  
    CefSharp.WinForms.dll!CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc(ref System.Windows.Forms.Message m) Line 231 + 0xb bytes C#
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x80 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0xfb bytes  
    CefSharp.WinForms.dll!CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc(ref System.Windows.Forms.Message m) Line 231 + 0xb bytes C#
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x5e bytes 
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!751177ce()   
    user32.dll!750f55df()   
    user32.dll!750ec2df()   
    uxtheme.dll!74862e1b()  
    uxtheme.dll!74862e58()  
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!750e90d1()   
    user32.dll!751177ce()   
    user32.dll!750f55df()   
    user32.dll!750ec2df()   
    uxtheme.dll!74862e1b()  
    uxtheme.dll!74862e58()  
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!751177ce()   
    user32.dll!750f55df()   
    user32.dll!750ec2df()   
    uxtheme.dll!74862e1b()  
    uxtheme.dll!74862e58()  
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!750f55df()   
    user32.dll!750ec2df()   
    uxtheme.dll!74862e1b()  
    uxtheme.dll!74862e58()  
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!750ec2df()   
    uxtheme.dll!74862e1b()  
    uxtheme.dll!74862e58()  
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    uxtheme.dll!74862e1b()  
    uxtheme.dll!74862e58()  
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    uxtheme.dll!74862e58()  
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!750ec275()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!750e8e71()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!750e90d1()   
    user32.dll!750ed6c5()   
    user32.dll!750ed6c5()   
    [Managed to Native Transition]  
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0x56 bytes  
    System.Windows.Forms.dll!System.Windows.Forms.Form.DefWndProc(ref System.Windows.Forms.Message m) + 0x60 bytes  
    System.Windows.Forms.dll!System.Windows.Forms.Control.WmWindowPosChanged(ref System.Windows.Forms.Message m) + 0x16 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x29c bytes 
    System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m) + 0x30 bytes    
    System.Windows.Forms.dll!System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message m) + 0x19b bytes    
    System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x13 bytes    
    System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x35 bytes  
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x80 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0xfb bytes  
    CefSharp.WinForms.dll!CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc(ref System.Windows.Forms.Message m) Line 231 + 0xb bytes C#
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x80 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0xfb bytes  
    CefSharp.WinForms.dll!CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc(ref System.Windows.Forms.Message m) Line 231 + 0xb bytes C#
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x80 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0xfb bytes  
    CefSharp.WinForms.dll!CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc(ref System.Windows.Forms.Message m) Line 231 + 0xb bytes C#
    

older | 1 | .... | 105 | 106 | (Page 107) | 108 | 109 | .... | 115 | newer