Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Using ClearScript. WebApplication problem

0
0
Please try the following in V8Proxy.cs.

First, make sure the NativeMethods class looks like exactly like this:
privatestaticclass NativeMethods
{
    [DllImport("kernel32", ExactSpelling = true, SetLastError = true)]
    publicstaticextern IntPtr LoadLibraryW(
        [In] [MarshalAs(UnmanagedType.LPWStr)] string path
    );
}
Then, in LoadNativeLibrary, call Marshal.GetLastWin32Error to get the error code when LoadLibraryW fails. For example, the loop might look something like this:
foreach (var path in paths)
{
    hLibrary = NativeMethods.LoadLibraryW(path);
    if (hLibrary != IntPtr.Zero)
    {
        break;
    }

    var error = Marshal.GetLastWin32Error();
    Console.WriteLine(error); // breakpoint here
}
Remember to rebuild everything and update the ClearScript files in your web project. You should then be able to set a breakpoint at the location indicated above and examine the error code. Please let us know what you find!

Thanks!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images