My problem was how to do it for 64bits. Here you go.
1) you IlDAsm your assembly into il code.
2) Edit the IL and change header to look like this
.corflags 0x00000002 .vtfixup  int32 fromunmanaged at VT_01 .data VT_01 = int32for 64bit
.corflags 0x00000008 .vtfixup  int64 fromunmanaged at VT_01 .data VT_01 = int643) Header of your exported method would look similar to this. This is same for 32bit version.
.vtentry 1 : 1 .export  as Java_net_sf_jni4net_Bridge_initDotNet4) You IlAsm the file back into DLL. For x64 you use /x64 flag.