You can't link to kernelbase from drivers, nor any user space libraries. Direct linking is probably fine, as you had it earlier (unless you know there's a version restriction), but you can't use heap APIs; you need ExAllocatePool()/ExFreePool() instead.