New Version of XLLoop (0.3.2) Available

A new version of XLLoop is now available at the XLLoop SourceForge Page.

This release adds the ability to configure multiple function servers (providers) in one addin. The benefit is that you can deploy a single XLLoop addin to your users and (if necessary) logically separate your functions into separate server groups. This improves function isolation and scalability.

An example of the INI configuration for multiple server providers (from the XLLoop SourceForge page):

providers=Java,Python,Ruby,PHP
include.volatile=false

[Java]
server=localhost

[Python]
server=localhost:5460
function.name=PY

[Ruby]
server=localhost:5470
function.name=RB

[Erlang]
server=localhost:5480
function.name=ERL

[PHP]
protocol=http
url=http://xlloop.sourceforge.net/servers/php/TestServer.php
send.caller.info=true
function.name=LP

Also note that the source code for XLLoop has now moved to GitHub. Head over to the XLoop GitHub Page to view/download/fork.

New Version of WinRun4J (0.4.3) Available

Head over to the WinRun4J Sourceforge Page to download.

This includes the following fixes/improvements:

  • Fixed loading issue with Java 7
  • Added a standalone java service wrapper

Edit: Also note that the source code for WinRun4J has now moved to GitHub. Head over to the WinRun4J Github Page to view/download/fork.

A new version of WinRun4J is available. …

A new version of WinRun4J is available. It contains the following fixes and new features:

  • Major new feature is the dynamic native binding. This provides the ability to use native Windows API functions without having to write any JNI/native code. See native binding examples for more information.
  • Fixed a race condition in the service implementation for quick starting applications.
  • The launcher java library now requires java 1.5 minimum (due to use of annotations). The launcher executable is compatible with java 1.4 and above.
  • Fixed lowercased key issue with INI file
  • Fixed max heap size issue on 64-bit VM
  • Added option to set console title via INI file
  • Added option to suppress error popups
  • DDE activate message sends command line

The following shows a simple example of the native binding:

package org.boris.winrun4j.test;

import org.boris.winrun4j.PInvoke;
import org.boris.winrun4j.PInvoke.DllImport;
import org.boris.winrun4j.PInvoke.UIntPtr;

public class BindingExample1
{
    @DllImport("kernel32")
    public static native boolean GetComputerName(StringBuilder lpBuffer, UIntPtr lpnSize);
    
    public static void main(String[] args) throws Exception {
        StringBuilder name = new StringBuilder();
        UIntPtr size = new UIntPtr(100);
        if (GetComputerName(name, size)) {
            System.out.println(name);
        }
    }

    static {
        PInvoke.bind(BindingExample1.class);
    }
}

You can download the new version from the WinRun4J Sourceforge Site.

Thanks to everyone who found bugs and gave suggestions.

XLLoop Without the INI File

The following post shows you how you can customize the XLLoop XLL addin without having to deploy the INI file along-side the XLL. It involves embedded the INI file inside the XLL addin.

The steps are:

1. Download WinRun4J from winrun4j.sourceforge.net.

2. Unpack the zip file and grab RCEDIT.exe

3. If you run RCEDIT without any arguments you will see the following usage information:

WinRun4J Resource Editor v1.0 (winrun4j.sf.net)

Edits resources in executables (EXE) and dynamic link-libraries (DLL).

RCEDIT <option>  [resource]

  filename      Specifies the filename of the EXE/DLL.
  resource      Specifies the name of the resource to add to the EXE/DLL.
  /I            Set the icon as the default icon for the executable.
  /A            Adds an icon to the EXE/DLL.
  /N            Sets the INI file.
  /J            Adds a JAR file.
  /E            Extracts a JAR file from the EXE/DLL.
  /S            Sets the splash image.
  /H            Adds an HTML file the EXE/DLL.
  /C            Clears all resources from the EXE/DLL.
  /L            Lists the resources in the EXE/DLL.
  /P            Outputs the contents of the INI file in the EXE.
  /R            Loads a script file listing resource settings.
  /W            Same as /R but clears all resources first.
  /D            Further help on /R command.

The option you need is /N. This allows you to embed your INI file inside the XLL.

4. Run the following command:

RCEDIT.exe /N xlloop.xll xlloop.ini

Where “xlloop.xll” is the name of the XLLoop XLL file and “xlloop.ini” is the name of the INI file.

XLLoop 0.3.1 Released

A new version of XLLoop is now available at the sourceforge site: xlloop.sf.net.

The main changes are:

  • Added round-robin connection mode for multiple servers in binary mode
  • Added retry ability to binary mode
  • Added annotation support for function information to reflection-based java functions
  • Java server framework now requires Java 1.5 (for annotations)
  • Generic function category can be customized
  • Added ability to load INI keys from an external file
  • Added ability to load INI keys from the registry

XLLoop 0.3.0 Released

A new version of XLLoop is now available at the sourceforge site: xlloop.sf.net.

The main changes are:

  • Added JSON over HTTP(S) protocol support
  • Added native PHP server
  • Added support for multiple servers in binary protocol mode
  • Functions can now support up to 30 arguments (and variable length)
  • Added ability to send caller information (sending sheet and cell)
  • Improvements in reliability of binary protocol
  • Addin name now defaults to the filename (minus .xll)
  • Added an Initialize call when addin first connects. This can send user information
    (for initializing a user session)

WinRun4J 0.3.3 Released

A new version of WinRun4J is available. It contains the following fixes and new features:

  • Moved service name, description and controls accepted to INI file
  • Refactored Service interface and added AbstractService helper class
  • Implemented FileAssociations helper class
  • Greatly improved the Registry API
  • Option to log to console and file
  • Log file rolling
  • Fix for relative log file path

The Registry API has been refactored to be easier to use (no need to open/close).

The Service API is now also much easier to use, with an AbstractService class. This makes the example service implementation much simpler:

package org.boris.winrun4j.test;

import org.boris.winrun4j.AbstractService;
import org.boris.winrun4j.EventLog;
import org.boris.winrun4j.ServiceException;

/**
 * A basic service.
 */
public class ServiceTest extends AbstractService
{
    public int serviceMain(String[] args) throws ServiceException {
        int count = 0;
        while (!shutdown) {
            try {
                Thread.sleep(6000);
            } catch (InterruptedException e) {
            }

            if (++count % 10 == 0)
                EventLog.report("WinRun4J Test Service", 
                      EventLog.INFORMATION, "Ping");
        }

        return 0;
    }
}

The shutdown variable is set to true when the service is requested to close by the service control manager.

You can download the new version from the WinRun4J Sourceforge Site.