3

Possible Duplicate:
Converting .NET App to x86 native code

is there a way to create a standard (not .NET Assembly type) 32Bit DLL for Windows using C# or Java? And for WinCE ?? Thank you

Community
  • 1
  • 1
  • It seems unlikely you'd be able to create a non-.NET assembly using a .Net language like C#, but I may be wrong. – podiluska Sep 01 '12 at 18:09
  • Create a c/c++ DLL project and export some functions. That can be invoked by .net with interop. – rekire Sep 01 '12 at 18:13
  • 1
    For .NET see http://stackoverflow.com/questions/1778878/converting-net-app-to-x86-native-code and Java see http://stackoverflow.com/questions/2011664/compiling-a-java-program-into-an-exe (and the questions linked from there). – Tim S. Sep 01 '12 at 18:13
  • When you compile it in Java don't forget to make and export table. – Roman C Sep 01 '12 at 18:20
  • Is your requirement to allow native DLL loading (i.e. `GetProcAddress`) to work, or to run without the runtime dependencies of a virtual machine? – Ben Voigt Sep 01 '12 at 18:33

1 Answers1

1

This was referenced in one of the comments, but I wanted to post it as an answer:

For C#: https://stackoverflow.com/a/1779505/490561

Basically, the idea is to use Mono and then Ahead Of Time Compilation. I think that'd do the trick.

For Java, the idea is similar: https://stackoverflow.com/a/2011727/490561

Community
  • 1
  • 1
Ryan
  • 2,948
  • 3
  • 30
  • 41