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.
However this is a boring process and if you have a lot of exported functions this task should be automated.