Well, my .dll now works. The problem was that I was compiling my .dll in release mode and my project that was using the .dll was in debug mode.