I did not import 
<span style>ntoskrnl.lib because I'm trying to do everything in user mode and there I have access to ntdll.dll which contains ntunmapviewofsection. Thats why I started using implib to create an ntdll.dll import library but I couldn't get it to work.</span><div>
<span style><br></span></div><div><span style>It's good to know that it actually returns the right function pointer. Now I only have to find where the real problem is :)</span></div><div><span style>Thank you for your help.</span></div>