Reputation: 101
I am trying to create a driver using WDK.I need to use malloc in that driver.When I try to use that I got an error like malloc unresolved external symbol.I think that I have to include some library.But I am not sure .How can I resolve this error?
Upvotes: 0
Views: 5641
Reputation: 104589
Windows Device drivers don't normally link with the C-Runtime. The build environment for the DDK/WDK doesn't link with MSVCRT. But there are memory allocation routines that can be used in kernel and driver programming.
See this link for more details.
Side note:
I'm a bit worried that you did not mention that "free" was also an unresolved symbol. That suggests that you never call it, hence a memory leak in device driver code. ;) Or does the WDK pull in an implementation of free() from somewhere?
Upvotes: 9