Using .net .dlls in max?

Archives Forums/Win32 Discussion/Using .net .dlls in max?

AntonyWells(Posted 2005) [#1]
Is it possible to link to .NET .dll class libraries? I'm not sure how they differ from regular .dll? But it would be great if this was possible at all.

I'm guessing it's not since Bmax is build upon a C++ abstraction layer (or so it would appear, probably way off)
but I'm sure I remember posting about trying it..can't remember how succesful he was?


Sweenie(Posted 2005) [#2]
You can modify the il code generated by the CLR compiler and convert the managed code into unmanaged(just a matter of tweaking some flags and adding some definitions.
However this is a boring process and if you have a lot of exported functions this task should be automated.


Bot Builder(Posted 2005) [#3]
a .net dll is totally different than a regular PE dll. Not only the structure, but the code. its all really high level bytecodes sorta like java bytecodes. In this way the same binary data can be run on many platforms.

I've been doing alot recently to do with .net low-level stuff.. Anyway, I only know how to do it with mono.

Assuming yourmonodirectory/lib/ is in your path variable:

mono --aot blah.dll

This will convert the dll to being a normal dll. I have never used a dll that has been converted with a non-.net language but I imagine it will be ugly. Perhaps for stuff like ints/longs/floats it'll be ok with parameters, but anything complicated, like say, a string I have no idea how you would manage it.

P.S. this isnt win32 only discussion. .net dlls are cross platform.