# Tuesday, November 15, 2011
« IKVM.NET 7.0 Release Candidate 0 | Main | New Development Snapshot »
New Development Snapshot

Hot on the heels of the 7.0 release candidate, the first development snapshot of 7.1. The most visible change is a new feature. The ikvm.lang.DllExport annotation to export static methods as unmanaged entry points.

Here's a crazy example:

import ikvm.lang.DllExport;
import cli.System.Runtime.InteropServices.DllImportAttribute;

public class test {
  @DllExport(name = "Foo", ordinal = 42)
  static void Dummy() {
    System.out.println("Hello World");

  static native void Foo();

  public static void main(String[] args) {

Compile as follows:

ikvmstub mscorlib
javac -cp \ikvm\lib\ikvm-api.jar;mscorlib.jar test.java
ikvmc test.class -r:mscorlib -platform:x86

The DllExport annotation only works when you explicitly specify -platform:x86 or -platform:x64. In the future ARM will also be supported, but I'll need to have an ARM Windows 8 system first. Since it emits an unmanaged entry point, the resulting assembly is a platform specific mixed assembly.


  • Updated version to 7.1.4336.0.
  • Added ikvmc warnings for referencing non-primary assembly in shared class loader group and duplicate references.
  • Removed ikvmc -platform:Itanium option.
  • Added ikvm.lang.DllExport annotation to export static methods as unmanaged exports.
  • Implemented a different pinning scheme for GetPrimitiveArrayCritical() that tolerates broken code that passes back the wrong pointer to Release. Should also perform better in most cases. GetStringCritical() now also pins instead of copies. Note that we intentionally ignore the mode parameter in ReleasePrimitiveArrayCritical() as HotSpot does the same.
  • Added include stdarg.h to jni.h make the header file compile by itself.
  • Added JNI_TRUE and JNI_FALSE to jni.h.
  • IKVM.Reflection: Fixed various assembly name parsing bugs in managed Fusion CompareAssemblyIdentity.
  • IKVM.Reflection: Re-implemented (most of) AssemblyName without dependency on System.Reflection.AssemblyName.

Binaries available here: ikvmbin-7.1.4336.zip

Tuesday, November 15, 2011 7:25:45 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
Wednesday, November 30, 2011 9:23:14 AM (W. Europe Standard Time, UTC+01:00)
First thank you for an excellent translation system which we are using a lot with great success.

I have tried out the latest snapshot as we would like to access an IKVMed dll directly from Excel VBA. Up to now we have done this by wrapping the IKVMed jar inC#. Making the methods COM-visible works fine, but the system crashes when trying to run the code. Our platform is Windows XP and Excel 2007.

The event is:
Event Type: Error
Event Source: Microsoft Office 12
Event Category: None
Event ID: 1000
Date: 30.11.2011
Time: 09:14:13
User: N/A
Computer: X5KNY
Faulting application excel.exe, version 12.0.6565.5003, stamp 4e5fe1a6, faulting module kernel32.dll, version 5.1.2600.5781, stamp 49c4f482, debug? 0, fault address 0x00012afb.

Do you have any hint to what the problem might be?

Kim Kolstad
Comments are closed.