An error occurred in script '/home/yhr1ef23xez5/public_html/web2/app/model/bannerhit.php' on line 17:
Undefined index: HTTP_REFERER

Array
(
    [type] => solution
    [name] => ht-roslyn
)

WinWrap® | Compile Scripts in Your Application
logo WinWrap®

Compile Scripts in Your Application

Compile and Run WWB.NET/5+ Script in Your Application

  • Uses .NET 6+ Roslyn Compiler
  • Requires WinWrap® Basic v10.53+
  • Application Certificate options A, B and F required
  • Compile and Run WWB.NET/5+ and WWB.NET/5+/Compiled scripts

Roslyn .NET 6+

The minimum set of DLLs essential to compiling with Roslyn are included in the WinWrap® Basic install's REDIST\Roslyn\net6.0 directory. By default WinWrap& Basic looks for the Roslyn DLLs in the Roslyn\net6.0 directory that exists in where WW10_32W.DLL or WW10_64.DLL exist. Deploy your application with that directory structure to your customer's machines.

For .NET 5+ Host applications use nuget to install the Visual Basic compiler as part of your application's project. Deploy the Visual Basic Compiler associated files with your application.

WinWrap® Basic Application Certificate Options

Options A, B and F are required for compiling and running WWB.NET/5+/Compiled scripts. These options can be add to your existing Application Certificates from the Annual Fee page.

MacroCompileAndRun Instruction

New with WinWrap® Basic v10.53 is the MacroCompileAndRun instruction. Please read the information in the link above to see what this instruction can do.

Why Compile Scripts?

Speed! A compiled script could execute 30 to 100 times faster than a normal script. WinWrap Director can execute scripts or compile and run scripts. Here's a sample script:

'#Language "WWB.NET" Sub Main Dim t0 As Date = Date.Now Dim i As Integer, j As Integer For i = 1 To 100000000 j += 1 Next Dim t1 As Date = Date.Now Debug.Print (i / (t1 - t0).TotalMilliseconds) \ 1000 & " million/second" End Sub
This script executes 25 million loops per second. Not bad for an interpreted script.

To compile the script, just change the first line:

'#Language "WWB.NET/5+/Compiled"
Now, the compiled script executes 1637 million loops per second. That's over 50 times faster.

Why Not Always Compile?

The hallmark of a scripting language is ease of coding. The scripts can be debugged, changed and refined quickly. A compiled WinWrap® Basic script can't be debugged. It will execute really fast, but you should work with it as a script until it's rock solid.

Copyright Polar Engineering, Inc.