ikvmc

"Mohr, Christian" <[email protected]> Fri, 21 Oct 2016 06:48:18 +0000
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
I'm searching for help when using ikvmc of version 8.1.57.17.0.
My Java application references some jar files that I have created from .NET DLLs using ikvmstub.
After using them I wanted to convert the resulting jar back with ikvmc. It worked out and I got a resulting DLL.
Unfortunately the code inside this DLL does not work on my .NET 4.5.2 environment. The reason is that ikvmc introduces a lot of unboxing conversions to the coding that my c# environment is not able to resolve.
Example:
The line
empMetaData.Id = exampleNodeId;
in my Java application turns into
((EmpMetaData) (object) (EmpMetaData) this.empMetaData).Id = (__Null) EMPJavaExampleImplementation.exampleNodeId;
In the resulting DLL.
But to make it run it should look like this:
empMetaData.Id = exampleNodeId;

EMPMetaData is a struct in c#.
exampleNodeId is a static variable of my java class.

Can anybody give me a hint how my Java code has to look like to prevent ikvmc from unboxing ?
Best regards
Christian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers