Thanks for your input Irwin. I removed the msvcrt dependency from my project and changed the malloc function call to HeapAlloc since I read on MSDN that GlobalAlloc wasn't recommended.
Another question you may be able to answear on: Is it possible to link a program using the Visual Studio linker without linking with msvcrt.lib? I have set the entry point to main, but still got two linker errors I can't get rid of. So I guess it is impossible, right?
Error 1 error LNK2001: unresolved external symbol __RTC_Shutdown main.obj
Error 2 error LNK2001: unresolved external symbol __RTC_InitBase main.obj