Are you checking GetProcAddress's return? I'm guessing that without "extern C" your getting a very different name exported than the "testfunc" you're expecting.