Made dll fixup into a c function.