I think you need to add "win32" to the end of every function in both the dll and main program source.
I also think you need to have GCEnter() as the first line of every dll function.
I also think you need to have GCEnter() as the first line of every dll function.